PsecPolicyPrototype struct { // The unique identifier for this IPsec policy. ID *string `json:"id,omitempty"` // The IPsec policy's canonical URL. Href *string `json:"href,omitempty"` } func (*VPNGatewayConnectionIPsecPolicyPrototype) isaVPNGatewayConnectionIPsecPolicyPrototype() bool { return true } type VPNGatewayConnectionIPsecPolicyPrototypeIntf interface { isaVPNGatewayConnectionIPsecPolicyPrototype() bool } // UnmarshalVPNGatewayConnectionIPsecPolicyPrototype unmarshals an instance of VPNGatewayConnectionIPsecPolicyPrototype from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIPsecPolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIPsecPolicyPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionLocalCIDRs : VPNGatewayConnectionLocalCIDRs struct type VPNGatewayConnectionLocalCIDRs struct { // The local CIDRs for this resource. LocalCIDRs []string `json:"local_cidrs,omitempty"` } // UnmarshalVPNGatewayConnectionLocalCIDRs unmarshals an instance of VPNGatewayConnectionLocalCIDRs from the specified map of raw messages. func UnmarshalVPNGatewayConnectionLocalCIDRs(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionLocalCIDRs) err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionPatch : VPNGatewayConnectionPatch struct // Models which "extend" this model: // - VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch type VPNGatewayConnectionPatch struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up,omitempty"` // The Dead Peer Detection settings. DeadPeerDetection *VPNGatewayConnectionDpdPatch `json:"dead_peer_detection,omitempty"` // The IKE policy to use. Specify `null` to remove any existing policy, [resulting in // auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). IkePolicy VPNGatewayConnectionIkePolicyPatchIntf `json:"ike_policy,omitempty"` // The IPsec policy to use. Specify `null` to remove any existing policy, [resulting in // auto-negotiation](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2). IpsecPolicy VPNGatewayConnectionIPsecPolicyPatchIntf `json:"ipsec_policy,omitempty"` // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address,omitempty"` // The pre-shared key. Psk *string `json:"psk,omitempty"` // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` } // Constants associated with the VPNGatewayConnectionPatch.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( VPNGatewayConnectionPatchRoutingProtocolNoneConst = "none" ) func (*VPNGatewayConnectionPatch) isaVPNGatewayConnectionPatch() bool { return true } type VPNGatewayConnectionPatchIntf interface { isaVPNGatewayConnectionPatch() bool } // UnmarshalVPNGatewayConnectionPatch unmarshals an instance of VPNGatewayConnectionPatch from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPatch) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPatch) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPatch) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPatch) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VPNGatewayConnectionPatch func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(vpnGatewayConnectionPatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct type VPNGatewayConnectionPeerCIDRs struct { // The peer CIDRs for this resource. PeerCIDRs []string `json:"peer_cidrs,omitempty"` } // UnmarshalVPNGatewayConnectionPeerCIDRs unmarshals an instance of VPNGatewayConnectionPeerCIDRs from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPeerCIDRs(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPeerCIDRs) err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionPrototype : VPNGatewayConnectionPrototype struct // Models which "extend" this model: // - VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype // - VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype type VPNGatewayConnectionPrototype struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up,omitempty"` // The Dead Peer Detection settings. DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` // The IKE policy to use. If unspecified, [auto-negotiation will be // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` // The IPsec policy to use. If unspecified, [auto-negotiation will be // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2). IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"` // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // The pre-shared key. Psk *string `json:"psk" validate:"required"` // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` // The local CIDRs for this resource. LocalCIDRs []string `json:"local_cidrs,omitempty"` // The peer CIDRs for this resource. PeerCIDRs []string `json:"peer_cidrs,omitempty"` } // Constants associated with the VPNGatewayConnectionPrototype.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( VPNGatewayConnectionPrototypeRoutingProtocolNoneConst = "none" ) func (*VPNGatewayConnectionPrototype) isaVPNGatewayConnectionPrototype() bool { return true } type VPNGatewayConnectionPrototypeIntf interface { isaVPNGatewayConnectionPrototype() bool } // UnmarshalVPNGatewayConnectionPrototype unmarshals an instance of VPNGatewayConnectionPrototype from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPrototype) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionReference : VPNGatewayConnectionReference struct type VPNGatewayConnectionReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNGatewayConnectionReferenceDeleted `json:"deleted,omitempty"` // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway connection. ID *string `json:"id" validate:"required"` // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the VPNGatewayConnectionReference.ResourceType property. // The resource type. const ( VPNGatewayConnectionReferenceResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection" ) // UnmarshalVPNGatewayConnectionReference unmarshals an instance of VPNGatewayConnectionReference from the specified map of raw messages. func UnmarshalVPNGatewayConnectionReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionReferenceDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VPNGatewayConnectionReferenceDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVPNGatewayConnectionReferenceDeleted unmarshals an instance of VPNGatewayConnectionReferenceDeleted from the specified map of raw messages. func UnmarshalVPNGatewayConnectionReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionStaticRouteModeTunnel : VPNGatewayConnectionStaticRouteModeTunnel struct type VPNGatewayConnectionStaticRouteModeTunnel struct { // The IP address of the VPN gateway member in which the tunnel resides. PublicIP *IP `json:"public_ip" validate:"required"` // The status of the VPN Tunnel. Status *string `json:"status" validate:"required"` } // Constants associated with the VPNGatewayConnectionStaticRouteModeTunnel.Status property. // The status of the VPN Tunnel. const ( VPNGatewayConnectionStaticRouteModeTunnelStatusDownConst = "down" VPNGatewayConnectionStaticRouteModeTunnelStatusUpConst = "up" ) // UnmarshalVPNGatewayConnectionStaticRouteModeTunnel unmarshals an instance of VPNGatewayConnectionStaticRouteModeTunnel from the specified map of raw messages. func UnmarshalVPNGatewayConnectionStaticRouteModeTunnel(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionStaticRouteModeTunnel) err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayMember : VPNGatewayMember struct type VPNGatewayMember struct { // The reserved IP address assigned to the VPN gateway member. // // This property will be present only when the VPN gateway status is `available`. PrivateIP *ReservedIPReference `json:"private_ip" validate:"required"` // The public IP address assigned to the VPN gateway member. PublicIP *IP `json:"public_ip" validate:"required"` // The high availability role assigned to the VPN gateway member. Role *string `json:"role" validate:"required"` // The status of the VPN gateway member. Status *string `json:"status" validate:"required"` } // Constants associated with the VPNGatewayMember.Role property. // The high availability role assigned to the VPN gateway member. const ( VPNGatewayMemberRoleActiveConst = "active" VPNGatewayMemberRoleStandbyConst = "standby" ) // Constants associated with the VPNGatewayMember.Status property. // The status of the VPN gateway member. const ( VPNGatewayMemberStatusAvailableConst = "available" VPNGatewayMemberStatusDeletingConst = "deleting" VPNGatewayMemberStatusFailedConst = "failed" VPNGatewayMemberStatusPendingConst = "pending" ) // UnmarshalVPNGatewayMember unmarshals an instance of VPNGatewayMember from the specified map of raw messages. func UnmarshalVPNGatewayMember(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayMember) err = core.UnmarshalModel(m, "private_ip", &obj.PrivateIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalModel(m, "public_ip", &obj.PublicIP, UnmarshalIP) if err != nil { return } err = core.UnmarshalPrimitive(m, "role", &obj.Role) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayPatch : VPNGatewayPatch struct type VPNGatewayPatch struct { // The name for this VPN gateway. The name must not be used by another VPN gateway in the VPC. Name *string `json:"name,omitempty"` } // UnmarshalVPNGatewayPatch unmarshals an instance of VPNGatewayPatch from the specified map of raw messages. func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayPatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VPNGatewayPatch func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(vpnGatewayPatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VPNGatewayPrototype : VPNGatewayPrototype struct // Models which "extend" this model: // - VPNGatewayPrototypeVPNGatewayRouteModePrototype // - VPNGatewayPrototypeVPNGatewayPolicyModePrototype type VPNGatewayPrototype struct { // The name for this VPN gateway. The name must not be used by another VPN gateway in the VPC. If unspecified, the name // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The resource group to use. If unspecified, the account's [default resource // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Identifies a subnet by a unique property. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` // Route mode VPN gateway. Mode *string `json:"mode,omitempty"` } // Constants associated with the VPNGatewayPrototype.Mode property. // Route mode VPN gateway. const ( VPNGatewayPrototypeModeRouteConst = "route" ) func (*VPNGatewayPrototype) isaVPNGatewayPrototype() bool { return true } type VPNGatewayPrototypeIntf interface { isaVPNGatewayPrototype() bool } // UnmarshalVPNGatewayPrototype unmarshals an instance of VPNGatewayPrototype from the specified map of raw messages. func UnmarshalVPNGatewayPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayReferenceDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VPNGatewayReferenceDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVPNGatewayReferenceDeleted unmarshals an instance of VPNGatewayReferenceDeleted from the specified map of raw messages. func UnmarshalVPNGatewayReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServer : VPNServer struct type VPNServer struct { // The certificate instance for this VPN server. Certificate *CertificateInstanceReference `json:"certificate" validate:"required"` // The methods used to authenticate VPN clients to this VPN server. VPN clients must authenticate against all specified // methods. ClientAuthentication []VPNServerAuthenticationIntf `json:"client_authentication" validate:"required"` // Indicates whether disconnected VPN clients will be automatically deleted after // `client_auto_delete_timeout` hours have passed. At present, this is always `true`, but may be modifiable in the // future. ClientAutoDelete *bool `json:"client_auto_delete" validate:"required"` // If `client_auto_delete` is `true`, the hours after which disconnected VPN clients will be automatically deleted. If // the value is `0`, disconnected VPN clients will be deleted immediately. This value may be modifiable in the future. ClientAutoDeleteTimeout *int64 `json:"client_auto_delete_timeout" validate:"required"` // The DNS server addresses that will be provided to VPN clients that are connected to this VPN server. ClientDnsServerIps []IP `json:"client_dns_server_ips" validate:"required"` // The seconds a VPN client can be idle before this VPN server will disconnect it. If `0`, the server will not // disconnect idle clients. ClientIdleTimeout *int64 `json:"client_idle_timeout" validate:"required"` // The VPN client IPv4 address pool, expressed in CIDR format. ClientIPPool *string `json:"client_ip_pool" validate:"required"` // The date and time that the VPN server was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The CRN for this VPN server. CRN *string `json:"crn" validate:"required"` // Indicates whether the split tunneling is enabled on this VPN server. EnableSplitTunneling *bool `json:"enable_split_tunneling" validate:"required"` // The health of this resource. // - `ok`: No abnormal behavior detected // - `degraded`: Experiencing compromised performance, capacity, or connectivity // - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated // - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a // lifecycle state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also // have this state. HealthState *string `json:"health_state" validate:"required"` // Fully qualified domain name assigned to this VPN server. Hostname *string `json:"hostname" validate:"required"` // The URL for this VPN server. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN server. ID *string `json:"id" validate:"required"` // The lifecycle state of the VPN server. LifecycleState *string `json:"lifecycle_state" validate:"required"` // The name for this VPN server. The name is unique across all VPN servers in the VPC. Name *string `json:"name" validate:"required"` // The port number used by this VPN server. Port *int64 `json:"port" validate:"required"` // The reserved IPs bound to this VPN server. PrivateIps []ReservedIPReference `json:"private_ips" validate:"required"` // The transport protocol used by this VPN server. Protocol *string `json:"protocol" validate:"required"` // The resource group for this VPN server. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The security groups targeting this VPN server. SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"` // The subnets this VPN server is provisioned in. Subnets []SubnetReference `json:"subnets" validate:"required"` // The VPC this VPN server resides in. VPC *VPCReference `json:"vpc" validate:"required"` } // Constants associated with the VPNServer.HealthState property. // The health of this resource. // - `ok`: No abnormal behavior detected // - `degraded`: Experiencing compromised performance, capacity, or connectivity // - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated // - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a lifecycle // state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also have this // state. const ( VPNServerHealthStateDegradedConst = "degraded" VPNServerHealthStateFaultedConst = "faulted" VPNServerHealthStateInapplicableConst = "inapplicable" VPNServerHealthStateOkConst = "ok" ) // Constants associated with the VPNServer.LifecycleState property. // The lifecycle state of the VPN server. const ( VPNServerLifecycleStateDeletingConst = "deleting" VPNServerLifecycleStateFailedConst = "failed" VPNServerLifecycleStatePendingConst = "pending" VPNServerLifecycleStateStableConst = "stable" VPNServerLifecycleStateSuspendedConst = "suspended" VPNServerLifecycleStateUpdatingConst = "updating" VPNServerLifecycleStateWaitingConst = "waiting" ) // Constants associated with the VPNServer.Protocol property. // The transport protocol used by this VPN server. const ( VPNServerProtocolTCPConst = "tcp" VPNServerProtocolUDPConst = "udp" ) // Constants associated with the VPNServer.ResourceType property. // The resource type. const ( VPNServerResourceTypeVPNServerConst = "vpn_server" ) // UnmarshalVPNServer unmarshals an instance of VPNServer from the specified map of raw messages. func UnmarshalVPNServer(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServer) err = core.UnmarshalModel(m, "certificate", &obj.Certificate, UnmarshalCertificateInstanceReference) if err != nil { return } err = core.UnmarshalModel(m, "client_authentication", &obj.ClientAuthentication, UnmarshalVPNServerAuthentication) if err != nil { return } err = core.UnmarshalPrimitive(m, "client_auto_delete", &obj.ClientAutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "client_auto_delete_timeout", &obj.ClientAutoDeleteTimeout) if err != nil { return } err = core.UnmarshalModel(m, "client_dns_server_ips", &obj.ClientDnsServerIps, UnmarshalIP) if err != nil { return } err = core.UnmarshalPrimitive(m, "client_idle_timeout", &obj.ClientIdleTimeout) if err != nil { return } err = core.UnmarshalPrimitive(m, "client_ip_pool", &obj.ClientIPPool) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_split_tunneling", &obj.EnableSplitTunneling) if err != nil { return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { return } err = core.UnmarshalPrimitive(m, "hostname", &obj.Hostname) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { return } err = core.UnmarshalModel(m, "private_ips", &obj.PrivateIps, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthentication : An authentication method for this VPN server. // Models which "extend" this model: // - VPNServerAuthenticationByUsername // - VPNServerAuthenticationByCertificate type VPNServerAuthentication struct { // The type of authentication. Method *string `json:"method" validate:"required"` // The type of identity provider to be used by VPN client. IdentityProvider VPNServerAuthenticationByUsernameIDProviderIntf `json:"identity_provider,omitempty"` // The certificate instance used for the VPN client certificate authority (CA). ClientCa *CertificateInstanceReference `json:"client_ca,omitempty"` // The certificate revocation list contents, encoded in PEM format. Crl *string `json:"crl,omitempty"` } // Constants associated with the VPNServerAuthentication.Method property. // The type of authentication. const ( VPNServerAuthenticationMethodCertificateConst = "certificate" VPNServerAuthenticationMethodUsernameConst = "username" ) func (*VPNServerAuthentication) isaVPNServerAuthentication() bool { return true } type VPNServerAuthenticationIntf interface { isaVPNServerAuthentication() bool } // UnmarshalVPNServerAuthentication unmarshals an instance of VPNServerAuthentication from the specified map of raw messages. func UnmarshalVPNServerAuthentication(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthentication) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { return } err = core.UnmarshalModel(m, "identity_provider", &obj.IdentityProvider, UnmarshalVPNServerAuthenticationByUsernameIDProvider) if err != nil { return } err = core.UnmarshalModel(m, "client_ca", &obj.ClientCa, UnmarshalCertificateInstanceReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "crl", &obj.Crl) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationByUsernameIDProvider : The type of identity provider to be used by VPN client. // Models which "extend" this model: // - VPNServerAuthenticationByUsernameIDProviderByIam type VPNServerAuthenticationByUsernameIDProvider struct { // The type of identity provider to be used by the VPN client. // - `iam`: IBM identity and access management // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the route on which the // unexpected property value was encountered. ProviderType *string `json:"provider_type,omitempty"` } // Constants associated with the VPNServerAuthenticationByUsernameIDProvider.ProviderType property. // The type of identity provider to be used by the VPN client. // - `iam`: IBM identity and access management // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the route on which the // unexpected property value was encountered. const ( VPNServerAuthenticationByUsernameIDProviderProviderTypeIamConst = "iam" ) func (*VPNServerAuthenticationByUsernameIDProvider) isaVPNServerAuthenticationByUsernameIDProvider() bool { return true } type VPNServerAuthenticationByUsernameIDProviderIntf interface { isaVPNServerAuthenticationByUsernameIDProvider() bool } // UnmarshalVPNServerAuthenticationByUsernameIDProvider unmarshals an instance of VPNServerAuthenticationByUsernameIDProvider from the specified map of raw messages. func UnmarshalVPNServerAuthenticationByUsernameIDProvider(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthenticationByUsernameIDProvider) err = core.UnmarshalPrimitive(m, "provider_type", &obj.ProviderType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationPrototype : An authentication method for this VPN server. // Models which "extend" this model: // - VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype // - VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype type VPNServerAuthenticationPrototype struct { // The type of authentication. Method *string `json:"method" validate:"required"` // The type of identity provider to be used by VPN client. IdentityProvider VPNServerAuthenticationByUsernameIDProviderIntf `json:"identity_provider,omitempty"` // The certificate instance to use for the VPN client certificate authority (CA). ClientCa CertificateInstanceIdentityIntf `json:"client_ca,omitempty"` // The certificate revocation list contents, encoded in PEM format. Crl *string `json:"crl,omitempty"` } // Constants associated with the VPNServerAuthenticationPrototype.Method property. // The type of authentication. const ( VPNServerAuthenticationPrototypeMethodCertificateConst = "certificate" VPNServerAuthenticationPrototypeMethodUsernameConst = "username" ) func (*VPNServerAuthenticationPrototype) isaVPNServerAuthenticationPrototype() bool { return true } type VPNServerAuthenticationPrototypeIntf interface { isaVPNServerAuthenticationPrototype() bool } // UnmarshalVPNServerAuthenticationPrototype unmarshals an instance of VPNServerAuthenticationPrototype from the specified map of raw messages. func UnmarshalVPNServerAuthenticationPrototype(m map[string]json.RawMessage, result interface{}) (err error) { // Retrieve discriminator value to determine correct "subclass". var discValue string err = core.UnmarshalPrimitive(m, "method", &discValue) if err != nil { err = fmt.Errorf("error unmarshalling discriminator property 'method': %s", err.Error()) return } if discValue == "" { err = fmt.Errorf("required discriminator property 'method' not found in JSON object") return } if discValue == "certificate" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype) } else if discValue == "username" { err = core.UnmarshalModel(m, "", result, UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype) } else { err = fmt.Errorf("unrecognized value for discriminator property 'method': %s", discValue) } return } // VPNServerClient : VPNServerClient struct type VPNServerClient struct { // The IP address assigned to this VPN client from `client_ip_pool`. ClientIP *IP `json:"client_ip" validate:"required"` // The common name of client certificate that the VPN client provided when connecting to the server. // // This property will be present only when the `certificate` client authentication method is enabled on the VPN server. CommonName *string `json:"common_name,omitempty"` // The date and time that the VPN client was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The date and time that the VPN client was disconnected. // // This property will be present only when the client `status` is `disconnected`. DisconnectedAt *strfmt.DateTime `json:"disconnected_at,omitempty"` // The URL for this VPN client. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN client. ID *string `json:"id" validate:"required"` // The remote IP address of this VPN client. RemoteIP *IP `json:"remote_ip" validate:"required"` // The remote port of this VPN client. RemotePort *int64 `json:"remote_port" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the VPN client: // - `connected`: the VPN client is `connected` to this VPN server. // - `disconnected`: the VPN client is `disconnected` from this VPN server. // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the VPN client on which the // unexpected property value was encountered. Status *string `json:"status" validate:"required"` // The username that this VPN client provided when connecting to the VPN server. // // This property will be present only when the `username` client authentication method is enabled on the VPN server. Username *string `json:"username,omitempty"` } // Constants associated with the VPNServerClient.ResourceType property. // The resource type. const ( VPNServerClientResourceTypeVPNServerClientConst = "vpn_server_client" ) // Constants associated with the VPNServerClient.Status property. // The status of the VPN client: // - `connected`: the VPN client is `connected` to this VPN server. // - `disconnected`: the VPN client is `disconnected` from this VPN server. // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the VPN client on which the // unexpected property value was encountered. const ( VPNServerClientStatusConnectedConst = "connected" VPNServerClientStatusDisconnectedConst = "disconnected" ) // UnmarshalVPNServerClient unmarshals an instance of VPNServerClient from the specified map of raw messages. func UnmarshalVPNServerClient(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerClient) err = core.UnmarshalModel(m, "client_ip", &obj.ClientIP, UnmarshalIP) if err != nil { return } err = core.UnmarshalPrimitive(m, "common_name", &obj.CommonName) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "disconnected_at", &obj.DisconnectedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "remote_ip", &obj.RemoteIP, UnmarshalIP) if err != nil { return } err = core.UnmarshalPrimitive(m, "remote_port", &obj.RemotePort) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "username", &obj.Username) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerClientCollection : VPNServerClientCollection struct type VPNServerClientCollection struct { // Collection of VPN clients. Clients []VPNServerClient `json:"clients" validate:"required"` // A link to the first page of resources. First *VPNServerClientCollectionFirst `json:"first" validate:"required"` // The maximum number of resources that can be returned by the request. Limit *int64 `json:"limit" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. Next *VPNServerClientCollectionNext `json:"next,omitempty"` // The total number of resources across all pages. TotalCount *int64 `json:"total_count" validate:"required"` } // UnmarshalVPNServerClientCollection unmarshals an instance of VPNServerClientCollection from the specified map of raw messages. func UnmarshalVPNServerClientCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerClientCollection) err = core.UnmarshalModel(m, "clients", &obj.Clients, UnmarshalVPNServerClient) if err != nil { return } err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNServerClientCollectionFirst) if err != nil { return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNServerClientCollectionNext) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Retrieve the value to be passed to a request to access the next page of results func (resp *VPNServerClientCollection) GetNextStart() (*string, error) { if core.IsNil(resp.Next) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") if err != nil || start == nil { return nil, err } return start, nil } // VPNServerClientCollectionFirst : A link to the first page of resources. type VPNServerClientCollectionFirst struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVPNServerClientCollectionFirst unmarshals an instance of VPNServerClientCollectionFirst from the specified map of raw messages. func UnmarshalVPNServerClientCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerClientCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerClientCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. type VPNServerClientCollectionNext struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVPNServerClientCollectionNext unmarshals an instance of VPNServerClientCollectionNext from the specified map of raw messages. func UnmarshalVPNServerClientCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerClientCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerCollection : VPNServerCollection struct type VPNServerCollection struct { // A link to the first page of resources. First *VPNServerCollectionFirst `json:"first" validate:"required"` // The maximum number of resources that can be returned by the request. Limit *int64 `json:"limit" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. Next *VPNServerCollectionNext `json:"next,omitempty"` // The total number of resources across all pages. TotalCount *int64 `json:"total_count" validate:"required"` // Collection of VPN servers. VPNServers []VPNServer `json:"vpn_servers" validate:"required"` } // UnmarshalVPNServerCollection unmarshals an instance of VPNServerCollection from the specified map of raw messages. func UnmarshalVPNServerCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNServerCollectionFirst) if err != nil { return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNServerCollectionNext) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { return } err = core.UnmarshalModel(m, "vpn_servers", &obj.VPNServers, UnmarshalVPNServer) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Retrieve the value to be passed to a request to access the next page of results func (resp *VPNServerCollection) GetNextStart() (*string, error) { if core.IsNil(resp.Next) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") if err != nil || start == nil { return nil, err } return start, nil } // VPNServerCollectionFirst : A link to the first page of resources. type VPNServerCollectionFirst struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVPNServerCollectionFirst unmarshals an instance of VPNServerCollectionFirst from the specified map of raw messages. func UnmarshalVPNServerCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. type VPNServerCollectionNext struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVPNServerCollectionNext unmarshals an instance of VPNServerCollectionNext from the specified map of raw messages. func UnmarshalVPNServerCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerPatch : VPNServerPatch struct type VPNServerPatch struct { // The certificate instance for this VPN server. Certificate CertificateInstanceIdentityIntf `json:"certificate,omitempty"` // The authentication methods to use to authenticate VPN client on this VPN server // (replacing any existing methods). ClientAuthentication []VPNServerAuthenticationPrototypeIntf `json:"client_authentication,omitempty"` // The DNS server addresses that will be provided to VPN clients connected to this VPN server (replacing any existing // addresses). ClientDnsServerIps []IP `json:"client_dns_server_ips,omitempty"` // The seconds a VPN client can be idle before this VPN server will disconnect it. If `0`, the server will not // disconnect idle clients. ClientIdleTimeout *int64 `json:"client_idle_timeout,omitempty"` // The VPN client IPv4 address pool, expressed in CIDR format. The request must not overlap with any existing address // prefixes in the VPC or any of the following reserved address ranges: // - `127.0.0.0/8` (IPv4 loopback addresses) // - `161.26.0.0/16` (IBM services) // - `166.8.0.0/14` (Cloud Service Endpoints) // - `169.254.0.0/16` (IPv4 link-local addresses) // - `224.0.0.0/4` (IPv4 multicast addresses) // // The prefix length of the client IP address pool's CIDR must be between // `/9` (8,388,608 addresses) and `/22` (1024 addresses). A CIDR block that contains twice the number of IP addresses // that are required to enable the maximum number of concurrent connections is recommended. ClientIPPool *string `json:"client_ip_pool,omitempty"` // Indicates whether the split tunneling is enabled on this VPN server. EnableSplitTunneling *bool `json:"enable_split_tunneling,omitempty"` // The name for this VPN server. The name must not be used by another VPN server in the VPC. Name *string `json:"name,omitempty"` // The port number used by this VPN server. Port *int64 `json:"port,omitempty"` // The transport protocol used by this VPN server. Protocol *string `json:"protocol,omitempty"` // The subnets to provision this VPN server in (replacing the existing subnets). Subnets []SubnetIdentityIntf `json:"subnets,omitempty"` } // Constants associated with the VPNServerPatch.Protocol property. // The transport protocol used by this VPN server. const ( VPNServerPatchProtocolTCPConst = "tcp" VPNServerPatchProtocolUDPConst = "udp" ) // UnmarshalVPNServerPatch unmarshals an instance of VPNServerPatch from the specified map of raw messages. func UnmarshalVPNServerPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerPatch) err = core.UnmarshalModel(m, "certificate", &obj.Certificate, UnmarshalCertificateInstanceIdentity) if err != nil { return } err = core.UnmarshalModel(m, "client_authentication", &obj.ClientAuthentication, UnmarshalVPNServerAuthenticationPrototype) if err != nil { return } err = core.UnmarshalModel(m, "client_dns_server_ips", &obj.ClientDnsServerIps, UnmarshalIP) if err != nil { return } err = core.UnmarshalPrimitive(m, "client_idle_timeout", &obj.ClientIdleTimeout) if err != nil { return } err = core.UnmarshalPrimitive(m, "client_ip_pool", &obj.ClientIPPool) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_split_tunneling", &obj.EnableSplitTunneling) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "port", &obj.Port) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VPNServerPatch func (vpnServerPatch *VPNServerPatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(vpnServerPatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VPNServerReferenceDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VPNServerReferenceDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVPNServerReferenceDeleted unmarshals an instance of VPNServerReferenceDeleted from the specified map of raw messages. func UnmarshalVPNServerReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerRoute : VPNServerRoute struct type VPNServerRoute struct { // The action to perform with a packet matching the VPN route: // - `translate`: translate the source IP address to one of the private IP addresses of the VPN server. // - `deliver`: deliver the packet into the VPC. // - `drop`: drop the packet // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the VPN route on which the // unexpected property value was encountered. Action *string `json:"action" validate:"required"` // The date and time that the VPN route was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination for this VPN route in the VPN server. If an incoming packet does not match any destination, it will // be dropped. Destination *string `json:"destination" validate:"required"` // The URL for this VPN route. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN route. ID *string `json:"id" validate:"required"` // The lifecycle state of the VPN route. LifecycleState *string `json:"lifecycle_state" validate:"required"` // The name for this VPN route. The name is unique across all routes for a VPN server. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the VPNServerRoute.Action property. // The action to perform with a packet matching the VPN route: // - `translate`: translate the source IP address to one of the private IP addresses of the VPN server. // - `deliver`: deliver the packet into the VPC. // - `drop`: drop the packet // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the VPN route on which the // unexpected property value was encountered. const ( VPNServerRouteActionDeliverConst = "deliver" VPNServerRouteActionDropConst = "drop" VPNServerRouteActionTranslateConst = "translate" ) // Constants associated with the VPNServerRoute.LifecycleState property. // The lifecycle state of the VPN route. const ( VPNServerRouteLifecycleStateDeletingConst = "deleting" VPNServerRouteLifecycleStateFailedConst = "failed" VPNServerRouteLifecycleStatePendingConst = "pending" VPNServerRouteLifecycleStateStableConst = "stable" VPNServerRouteLifecycleStateSuspendedConst = "suspended" VPNServerRouteLifecycleStateUpdatingConst = "updating" VPNServerRouteLifecycleStateWaitingConst = "waiting" ) // Constants associated with the VPNServerRoute.ResourceType property. // The resource type. const ( VPNServerRouteResourceTypeVPNServerRouteConst = "vpn_server_route" ) // UnmarshalVPNServerRoute unmarshals an instance of VPNServerRoute from the specified map of raw messages. func UnmarshalVPNServerRoute(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerRoute) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerRouteCollection : VPNServerRouteCollection struct type VPNServerRouteCollection struct { // A link to the first page of resources. First *VPNServerRouteCollectionFirst `json:"first" validate:"required"` // The maximum number of resources that can be returned by the request. Limit *int64 `json:"limit" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. Next *VPNServerRouteCollectionNext `json:"next,omitempty"` // Collection of VPN routes. Routes []VPNServerRoute `json:"routes" validate:"required"` // The total number of resources across all pages. TotalCount *int64 `json:"total_count" validate:"required"` } // UnmarshalVPNServerRouteCollection unmarshals an instance of VPNServerRouteCollection from the specified map of raw messages. func UnmarshalVPNServerRouteCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerRouteCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVPNServerRouteCollectionFirst) if err != nil { return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVPNServerRouteCollectionNext) if err != nil { return } err = core.UnmarshalModel(m, "routes", &obj.Routes, UnmarshalVPNServerRoute) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Retrieve the value to be passed to a request to access the next page of results func (resp *VPNServerRouteCollection) GetNextStart() (*string, error) { if core.IsNil(resp.Next) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") if err != nil || start == nil { return nil, err } return start, nil } // VPNServerRouteCollectionFirst : A link to the first page of resources. type VPNServerRouteCollectionFirst struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVPNServerRouteCollectionFirst unmarshals an instance of VPNServerRouteCollectionFirst from the specified map of raw messages. func UnmarshalVPNServerRouteCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerRouteCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerRouteCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. type VPNServerRouteCollectionNext struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVPNServerRouteCollectionNext unmarshals an instance of VPNServerRouteCollectionNext from the specified map of raw messages. func UnmarshalVPNServerRouteCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerRouteCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerRoutePatch : VPNServerRoutePatch struct type VPNServerRoutePatch struct { // The name for this VPN server route. The name must not be used by another route for the VPN server. Name *string `json:"name,omitempty"` } // UnmarshalVPNServerRoutePatch unmarshals an instance of VPNServerRoutePatch from the specified map of raw messages. func UnmarshalVPNServerRoutePatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerRoutePatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VPNServerRoutePatch func (vpnServerRoutePatch *VPNServerRoutePatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(vpnServerRoutePatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VirtualNetworkInterface : VirtualNetworkInterface struct type VirtualNetworkInterface struct { // Indicates whether this virtual network interface will be automatically deleted when // `target` is deleted. AutoDelete *bool `json:"auto_delete" validate:"required"` // The date and time that the virtual network interface was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The CRN for this virtual network interface. CRN *string `json:"crn" validate:"required"` // The URL for this virtual network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this virtual network interface. ID *string `json:"id" validate:"required"` // The lifecycle state of the virtual network interface. LifecycleState *string `json:"lifecycle_state" validate:"required"` // The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. Name *string `json:"name" validate:"required"` // The reserved IP for this virtual network interface. PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource group for this virtual network interface. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The security groups for this virtual network interface. SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"` // The associated subnet. Subnet *SubnetReference `json:"subnet" validate:"required"` // The target of this virtual network interface. // // If absent, this virtual network interface is not attached to a target. Target VirtualNetworkInterfaceTargetIntf `json:"target,omitempty"` // The VPC this virtual network interface resides in. VPC *VPCReference `json:"vpc" validate:"required"` // The zone this virtual network interface resides in. Zone *ZoneReference `json:"zone" validate:"required"` } // Constants associated with the VirtualNetworkInterface.LifecycleState property. // The lifecycle state of the virtual network interface. const ( VirtualNetworkInterfaceLifecycleStateDeletingConst = "deleting" VirtualNetworkInterfaceLifecycleStateFailedConst = "failed" VirtualNetworkInterfaceLifecycleStatePendingConst = "pending" VirtualNetworkInterfaceLifecycleStateStableConst = "stable" VirtualNetworkInterfaceLifecycleStateSuspendedConst = "suspended" VirtualNetworkInterfaceLifecycleStateUpdatingConst = "updating" VirtualNetworkInterfaceLifecycleStateWaitingConst = "waiting" ) // Constants associated with the VirtualNetworkInterface.ResourceType property. // The resource type. const ( VirtualNetworkInterfaceResourceTypeVirtualNetworkInterfaceConst = "virtual_network_interface" ) // UnmarshalVirtualNetworkInterface unmarshals an instance of VirtualNetworkInterface from the specified map of raw messages. func UnmarshalVirtualNetworkInterface(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterface) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "lifecycle_state", &obj.LifecycleState) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalVirtualNetworkInterfaceTarget) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceCollection : VirtualNetworkInterfaceCollection struct type VirtualNetworkInterfaceCollection struct { // A link to the first page of resources. First *VirtualNetworkInterfaceCollectionFirst `json:"first" validate:"required"` // The maximum number of resources that can be returned by the request. Limit *int64 `json:"limit" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. Next *VirtualNetworkInterfaceCollectionNext `json:"next,omitempty"` // The total number of resources across all pages. TotalCount *int64 `json:"total_count" validate:"required"` // Collection of virtual network interfaces. VirtualNetworkInterfaces []VirtualNetworkInterface `json:"virtual_network_interfaces" validate:"required"` } // UnmarshalVirtualNetworkInterfaceCollection unmarshals an instance of VirtualNetworkInterfaceCollection from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVirtualNetworkInterfaceCollectionFirst) if err != nil { return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVirtualNetworkInterfaceCollectionNext) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { return } err = core.UnmarshalModel(m, "virtual_network_interfaces", &obj.VirtualNetworkInterfaces, UnmarshalVirtualNetworkInterface) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Retrieve the value to be passed to a request to access the next page of results func (resp *VirtualNetworkInterfaceCollection) GetNextStart() (*string, error) { if core.IsNil(resp.Next) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") if err != nil || start == nil { return nil, err } return start, nil } // VirtualNetworkInterfaceCollectionFirst : A link to the first page of resources. type VirtualNetworkInterfaceCollectionFirst struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVirtualNetworkInterfaceCollectionFirst unmarshals an instance of VirtualNetworkInterfaceCollectionFirst from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. type VirtualNetworkInterfaceCollectionNext struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVirtualNetworkInterfaceCollectionNext unmarshals an instance of VirtualNetworkInterfaceCollectionNext from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfacePatch : VirtualNetworkInterfacePatch struct type VirtualNetworkInterfacePatch struct { // The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. Name *string `json:"name,omitempty"` } // UnmarshalVirtualNetworkInterfacePatch unmarshals an instance of VirtualNetworkInterfacePatch from the specified map of raw messages. func UnmarshalVirtualNetworkInterfacePatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfacePatch) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VirtualNetworkInterfacePatch func (virtualNetworkInterfacePatch *VirtualNetworkInterfacePatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(virtualNetworkInterfacePatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VirtualNetworkInterfacePrimaryIPPrototype : VirtualNetworkInterfacePrimaryIPPrototype struct // Models which "extend" this model: // - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext // - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext type VirtualNetworkInterfacePrimaryIPPrototype struct { // The unique identifier for this reserved IP. ID *string `json:"id,omitempty"` // The URL for this reserved IP. Href *string `json:"href,omitempty"` // The IP address to reserve, which must not already be reserved on the subnet. // // If unspecified, an available address on the subnet will automatically be selected. Address *string `json:"address,omitempty"` // Indicates whether this reserved IP member will be automatically deleted when either // `target` is deleted, or the reserved IP is unbound. AutoDelete *bool `json:"auto_delete,omitempty"` // The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with // `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated // list of randomly-selected words. Name *string `json:"name,omitempty"` } func (*VirtualNetworkInterfacePrimaryIPPrototype) isaVirtualNetworkInterfacePrimaryIPPrototype() bool { return true } type VirtualNetworkInterfacePrimaryIPPrototypeIntf interface { isaVirtualNetworkInterfacePrimaryIPPrototype() bool } // UnmarshalVirtualNetworkInterfacePrimaryIPPrototype unmarshals an instance of VirtualNetworkInterfacePrimaryIPPrototype from the specified map of raw messages. func UnmarshalVirtualNetworkInterfacePrimaryIPPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfacePrimaryIPPrototype) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceReferenceAttachmentContext : VirtualNetworkInterfaceReferenceAttachmentContext struct type VirtualNetworkInterfaceReferenceAttachmentContext struct { // The CRN for this virtual network interface. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VirtualNetworkInterfaceReferenceAttachmentContextDeleted `json:"deleted,omitempty"` // The URL for this virtual network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this virtual network interface. ID *string `json:"id" validate:"required"` // The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the VirtualNetworkInterfaceReferenceAttachmentContext.ResourceType property. // The resource type. const ( VirtualNetworkInterfaceReferenceAttachmentContextResourceTypeVirtualNetworkInterfaceConst = "virtual_network_interface" ) // UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext unmarshals an instance of VirtualNetworkInterfaceReferenceAttachmentContext from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceReferenceAttachmentContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceReferenceAttachmentContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVirtualNetworkInterfaceReferenceAttachmentContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceReferenceAttachmentContextDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VirtualNetworkInterfaceReferenceAttachmentContextDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVirtualNetworkInterfaceReferenceAttachmentContextDeleted unmarshals an instance of VirtualNetworkInterfaceReferenceAttachmentContextDeleted from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceReferenceAttachmentContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceReferenceAttachmentContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceReferenceDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VirtualNetworkInterfaceReferenceDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVirtualNetworkInterfaceReferenceDeleted unmarshals an instance of VirtualNetworkInterfaceReferenceDeleted from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted unmarshals an instance of VirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceTarget : A virtual network interface target. // // The resource types that can be virtual network interface targets are expected to expand in the future. When iterating // over virtual network interface targets, do not assume that every target resource will be from a known set of resource // types. Optionally halt processing and surface an error, or bypass resources of unrecognized types. // Models which "extend" this model: // - VirtualNetworkInterfaceTargetShareMountTargetReference type VirtualNetworkInterfaceTarget struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *ShareMountTargetReferenceDeleted `json:"deleted,omitempty"` // The URL for this share mount target. Href *string `json:"href,omitempty"` // The unique identifier for this share mount target. ID *string `json:"id,omitempty"` // The name for this share mount target. The name is unique across all mount targets for the file share. Name *string `json:"name,omitempty"` // The resource type. ResourceType *string `json:"resource_type,omitempty"` } // Constants associated with the VirtualNetworkInterfaceTarget.ResourceType property. // The resource type. const ( VirtualNetworkInterfaceTargetResourceTypeShareMountTargetConst = "share_mount_target" ) func (*VirtualNetworkInterfaceTarget) isaVirtualNetworkInterfaceTarget() bool { return true } type VirtualNetworkInterfaceTargetIntf interface { isaVirtualNetworkInterfaceTarget() bool } // UnmarshalVirtualNetworkInterfaceTarget unmarshals an instance of VirtualNetworkInterfaceTarget from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceTarget(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceTarget) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalShareMountTargetReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Volume : Volume struct type Volume struct { // Indicates whether a running virtual server instance has an attachment to this volume. Active *bool `json:"active" validate:"required"` // The attachment state of the volume // - `unattached`: Not attached to any virtual server instances // - `attached`: Attached to a virtual server instance (even if the instance is stopped) // - `unusable`: Not able to be attached to any virtual server instances. AttachmentState *string `json:"attachment_state" validate:"required"` // The maximum bandwidth (in megabits per second) for the volume. Bandwidth *int64 `json:"bandwidth" validate:"required"` // Indicates whether this volume is performing an operation that must be serialized. This must be `false` to perform an // operation that is specified to require serialization. Busy *bool `json:"busy" validate:"required"` // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or // updating volumes may expand in the future. Capacity *int64 `json:"capacity" validate:"required"` // The date and time that the volume was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The CRN for this volume. CRN *string `json:"crn" validate:"required"` // The type of encryption used on the volume. Encryption *string `json:"encryption" validate:"required"` // The root key used to wrap the data encryption key for the volume. // // This property will be present for volumes with an `encryption` type of // `user_managed`. EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"` // The reasons for the current `health_state` (if any). // // The enumerated reason code values for this property will expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the // unexpected reason code was encountered. HealthReasons []VolumeHealthReason `json:"health_reasons" validate:"required"` // The health of this resource. // - `ok`: No abnormal behavior detected // - `degraded`: Experiencing compromised performance, capacity, or connectivity // - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated // - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a // lifecycle state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also // have this state. HealthState *string `json:"health_state" validate:"required"` // The URL for this volume. Href *string `json:"href" validate:"required"` // The unique identifier for this volume. ID *string `json:"id" validate:"required"` // The maximum I/O operations per second (IOPS) for this volume. Iops *int64 `json:"iops" validate:"required"` // The name for this volume. The name is unique across all volumes in the region. Name *string `json:"name" validate:"required"` // The operating system associated with this volume. If absent, this volume was not // created from an image, or the image did not include an operating system. OperatingSystem *OperatingSystem `json:"operating_system,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) for // this volume. Profile *VolumeProfileReference `json:"profile" validate:"required"` // The resource group for this volume. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The image from which this volume was created (this may be // [deleted](https://cloud.ibm.com/apidocs/vpc#deleted-resources)). // If absent, this volume was not created from an image. SourceImage *ImageReference `json:"source_image,omitempty"` // The snapshot from which this volume was cloned. SourceSnapshot *SnapshotReference `json:"source_snapshot,omitempty"` // The status of the volume. // // The enumerated values for this property will expand in the future. When processing this property, check for and log // unknown values. Optionally halt processing and surface the error, or bypass the volume on which the unexpected // property value was encountered. Status *string `json:"status" validate:"required"` // The reasons for the current status (if any). // // The enumerated reason code values for this property will expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the resource on which the // unexpected reason code was encountered. StatusReasons []VolumeStatusReason `json:"status_reasons" validate:"required"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags" validate:"required"` // The volume attachments for this volume. VolumeAttachments []VolumeAttachmentReferenceVolumeContext `json:"volume_attachments" validate:"required"` // The zone this volume resides in. Zone *ZoneReference `json:"zone" validate:"required"` } // Constants associated with the Volume.AttachmentState property. // The attachment state of the volume // - `unattached`: Not attached to any virtual server instances // - `attached`: Attached to a virtual server instance (even if the instance is stopped) // - `unusable`: Not able to be attached to any virtual server instances. const ( VolumeAttachmentStateAttachedConst = "attached" VolumeAttachmentStateUnattachedConst = "unattached" VolumeAttachmentStateUnusableConst = "unusable" ) // Constants associated with the Volume.Encryption property. // The type of encryption used on the volume. const ( VolumeEncryptionProviderManagedConst = "provider_managed" VolumeEncryptionUserManagedConst = "user_managed" ) // Constants associated with the Volume.HealthState property. // The health of this resource. // - `ok`: No abnormal behavior detected // - `degraded`: Experiencing compromised performance, capacity, or connectivity // - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated // - `inapplicable`: The health state does not apply because of the current lifecycle state. A resource with a lifecycle // state of `failed` or `deleting` will have a health state of `inapplicable`. A `pending` resource may also have this // state. const ( VolumeHealthStateDegradedConst = "degraded" VolumeHealthStateFaultedConst = "faulted" VolumeHealthStateInapplicableConst = "inapplicable" VolumeHealthStateOkConst = "ok" ) // Constants associated with the Volume.ResourceType property. // The resource type. const ( VolumeResourceTypeVolumeConst = "volume" ) // Constants associated with the Volume.Status property. // The status of the volume. // // The enumerated values for this property will expand in the future. When processing this property, check for and log // unknown values. Optionally halt processing and surface the error, or bypass the volume on which the unexpected // property value was encountered. const ( VolumeStatusAvailableConst = "available" VolumeStatusFailedConst = "failed" VolumeStatusPendingConst = "pending" VolumeStatusPendingDeletionConst = "pending_deletion" VolumeStatusUnusableConst = "unusable" VolumeStatusUpdatingConst = "updating" ) // UnmarshalVolume unmarshals an instance of Volume from the specified map of raw messages. func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(Volume) err = core.UnmarshalPrimitive(m, "active", &obj.Active) if err != nil { return } err = core.UnmarshalPrimitive(m, "attachment_state", &obj.AttachmentState) if err != nil { return } err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "busy", &obj.Busy) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) if err != nil { return } err = core.UnmarshalModel(m, "health_reasons", &obj.HealthReasons, UnmarshalVolumeHealthReason) if err != nil { return } err = core.UnmarshalPrimitive(m, "health_state", &obj.HealthState) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystem) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileReference) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "source_image", &obj.SourceImage, UnmarshalImageReference) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalModel(m, "status_reasons", &obj.StatusReasons, UnmarshalVolumeStatusReason) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentReferenceVolumeContext) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneReference) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachment : VolumeAttachment struct type VolumeAttachment struct { // The maximum bandwidth (in megabits per second) for the volume when attached to this instance. This may be lower than // the volume bandwidth depending on the configuration of the instance. Bandwidth *int64 `json:"bandwidth" validate:"required"` // The date and time that the volume was attached. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete" validate:"required"` // Information about how the volume is exposed to the instance operating system. // // This property may be absent if the volume attachment's `status` is not `attached`. Device *VolumeAttachmentDevice `json:"device,omitempty"` // The URL for this volume attachment. Href *string `json:"href" validate:"required"` // The unique identifier for this volume attachment. ID *string `json:"id" validate:"required"` // The name for this volume attachment. The name is unique across all volume attachments on the instance. Name *string `json:"name" validate:"required"` // The status of this volume attachment. Status *string `json:"status" validate:"required"` // The type of volume attachment. Type *string `json:"type" validate:"required"` // The attached volume. // // This property will be absent if the volume has not yet been provisioned. Volume *VolumeReferenceVolumeAttachmentContext `json:"volume,omitempty"` } // Constants associated with the VolumeAttachment.Status property. // The status of this volume attachment. const ( VolumeAttachmentStatusAttachedConst = "attached" VolumeAttachmentStatusAttachingConst = "attaching" VolumeAttachmentStatusDeletingConst = "deleting" VolumeAttachmentStatusDetachingConst = "detaching" ) // Constants associated with the VolumeAttachment.Type property. // The type of volume attachment. const ( VolumeAttachmentTypeBootConst = "boot" VolumeAttachmentTypeDataConst = "data" ) // UnmarshalVolumeAttachment unmarshals an instance of VolumeAttachment from the specified map of raw messages. func UnmarshalVolumeAttachment(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachment) err = core.UnmarshalPrimitive(m, "bandwidth", &obj.Bandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeReferenceVolumeAttachmentContext) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentCollection : VolumeAttachmentCollection struct type VolumeAttachmentCollection struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachment `json:"volume_attachments" validate:"required"` } // UnmarshalVolumeAttachmentCollection unmarshals an instance of VolumeAttachmentCollection from the specified map of raw messages. func UnmarshalVolumeAttachmentCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentCollection) err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachment) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentDevice : VolumeAttachmentDevice struct type VolumeAttachmentDevice struct { // A unique identifier for the device which is exposed to the instance operating system. ID *string `json:"id,omitempty"` } // UnmarshalVolumeAttachmentDevice unmarshals an instance of VolumeAttachmentDevice from the specified map of raw messages. func UnmarshalVolumeAttachmentDevice(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentDevice) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPatch : VolumeAttachmentPatch struct type VolumeAttachmentPatch struct { // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` // The name for this volume attachment. The name must not be used by another volume attachment on the instance. Name *string `json:"name,omitempty"` } // UnmarshalVolumeAttachmentPatch unmarshals an instance of VolumeAttachmentPatch from the specified map of raw messages. func UnmarshalVolumeAttachmentPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPatch) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VolumeAttachmentPatch func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(volumeAttachmentPatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VolumeAttachmentPrototype : VolumeAttachmentPrototype struct type VolumeAttachmentPrototype struct { // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` // The name for this volume attachment. The name must not be used by another volume attachment on the instance. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // An existing volume to attach to the instance, or a prototype object for a new volume. Volume VolumeAttachmentPrototypeVolumeIntf `json:"volume" validate:"required"` } // NewVolumeAttachmentPrototype : Instantiate VolumeAttachmentPrototype (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototype(volume VolumeAttachmentPrototypeVolumeIntf) (_model *VolumeAttachmentPrototype, err error) { _model = &VolumeAttachmentPrototype{ Volume: volume, } err = core.ValidateStruct(_model, "required parameters") return } // UnmarshalVolumeAttachmentPrototype unmarshals an instance of VolumeAttachmentPrototype from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototype) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeAttachmentPrototypeVolume) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeInstanceByImageContext : VolumeAttachmentPrototypeInstanceByImageContext struct type VolumeAttachmentPrototypeInstanceByImageContext struct { // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` // The name for this volume attachment. The name must not be used by another volume attachment on the instance. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // A prototype object for a new volume. Volume *VolumePrototypeInstanceByImageContext `json:"volume" validate:"required"` } // NewVolumeAttachmentPrototypeInstanceByImageContext : Instantiate VolumeAttachmentPrototypeInstanceByImageContext (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume *VolumePrototypeInstanceByImageContext) (_model *VolumeAttachmentPrototypeInstanceByImageContext, err error) { _model = &VolumeAttachmentPrototypeInstanceByImageContext{ Volume: volume, } err = core.ValidateStruct(_model, "required parameters") return } // UnmarshalVolumeAttachmentPrototypeInstanceByImageContext unmarshals an instance of VolumeAttachmentPrototypeInstanceByImageContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceByImageContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumePrototypeInstanceByImageContext) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeInstanceBySourceSnapshotContext : VolumeAttachmentPrototypeInstanceBySourceSnapshotContext struct type VolumeAttachmentPrototypeInstanceBySourceSnapshotContext struct { // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` // The name for this volume attachment. The name must not be used by another volume attachment on the instance. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // A prototype object for a new volume from a snapshot. Volume *VolumePrototypeInstanceBySourceSnapshotContext `json:"volume" validate:"required"` } // NewVolumeAttachmentPrototypeInstanceBySourceSnapshotContext : Instantiate VolumeAttachmentPrototypeInstanceBySourceSnapshotContext (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(volume *VolumePrototypeInstanceBySourceSnapshotContext) (_model *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, err error) { _model = &VolumeAttachmentPrototypeInstanceBySourceSnapshotContext{ Volume: volume, } err = core.ValidateStruct(_model, "required parameters") return } // UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext unmarshals an instance of VolumeAttachmentPrototypeInstanceBySourceSnapshotContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceBySourceSnapshotContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumePrototypeInstanceBySourceSnapshotContext) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeInstanceByVolumeContext : VolumeAttachmentPrototypeInstanceByVolumeContext struct type VolumeAttachmentPrototypeInstanceByVolumeContext struct { // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` // The name for this volume attachment. The name must not be used by another volume attachment on the instance. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // An existing volume to attach. Volume VolumeIdentityIntf `json:"volume" validate:"required"` } // NewVolumeAttachmentPrototypeInstanceByVolumeContext : Instantiate VolumeAttachmentPrototypeInstanceByVolumeContext (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeInstanceByVolumeContext(volume VolumeIdentityIntf) (_model *VolumeAttachmentPrototypeInstanceByVolumeContext, err error) { _model = &VolumeAttachmentPrototypeInstanceByVolumeContext{ Volume: volume, } err = core.ValidateStruct(_model, "required parameters") return } // UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext unmarshals an instance of VolumeAttachmentPrototypeInstanceByVolumeContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceByVolumeContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolume : An existing volume to attach to the instance, or a prototype object for a new volume. // Models which "extend" this model: // - VolumeAttachmentPrototypeVolumeVolumeIdentity // - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext type VolumeAttachmentPrototypeVolume struct { // The unique identifier for this volume. ID *string `json:"id,omitempty"` // The CRN for this volume. CRN *string `json:"crn,omitempty"` // The URL for this volume. Href *string `json:"href,omitempty"` // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to // use for this volume. Profile VolumeProfileIdentityIntf `json:"profile,omitempty"` // The resource group to use for this volume. If unspecified, the instance's resource // group will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or // updating volumes may expand in the future. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The snapshot from which to clone the volume. SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"` } func (*VolumeAttachmentPrototypeVolume) isaVolumeAttachmentPrototypeVolume() bool { return true } type VolumeAttachmentPrototypeVolumeIntf interface { isaVolumeAttachmentPrototypeVolume() bool } // UnmarshalVolumeAttachmentPrototypeVolume unmarshals an instance of VolumeAttachmentPrototypeVolume from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolume(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolume) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentReferenceInstanceContext : VolumeAttachmentReferenceInstanceContext struct type VolumeAttachmentReferenceInstanceContext struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VolumeAttachmentReferenceInstanceContextDeleted `json:"deleted,omitempty"` // Information about how the volume is exposed to the instance operating system. // // This property may be absent if the volume attachment's `status` is not `attached`. Device *VolumeAttachmentDevice `json:"device,omitempty"` // The URL for this volume attachment. Href *string `json:"href" validate:"required"` // The unique identifier for this volume attachment. ID *string `json:"id" validate:"required"` // The name for this volume attachment. The name is unique across all volume attachments on the instance. Name *string `json:"name" validate:"required"` // The attached volume. // // This property will be absent if the volume has not yet been provisioned. Volume *VolumeReferenceVolumeAttachmentContext `json:"volume,omitempty"` } // UnmarshalVolumeAttachmentReferenceInstanceContext unmarshals an instance of VolumeAttachmentReferenceInstanceContext from the specified map of raw messages. func UnmarshalVolumeAttachmentReferenceInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentReferenceInstanceContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeAttachmentReferenceInstanceContextDeleted) if err != nil { return } err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "volume", &obj.Volume, UnmarshalVolumeReferenceVolumeAttachmentContext) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentReferenceInstanceContextDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VolumeAttachmentReferenceInstanceContextDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVolumeAttachmentReferenceInstanceContextDeleted unmarshals an instance of VolumeAttachmentReferenceInstanceContextDeleted from the specified map of raw messages. func UnmarshalVolumeAttachmentReferenceInstanceContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentReferenceInstanceContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentReferenceVolumeContext : VolumeAttachmentReferenceVolumeContext struct type VolumeAttachmentReferenceVolumeContext struct { // Indicates whether deleting the instance will also delete the attached volume. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VolumeAttachmentReferenceVolumeContextDeleted `json:"deleted,omitempty"` // Information about how the volume is exposed to the instance operating system. // // This property may be absent if the volume attachment's `status` is not `attached`. Device *VolumeAttachmentDevice `json:"device,omitempty"` // The URL for this volume attachment. Href *string `json:"href" validate:"required"` // The unique identifier for this volume attachment. ID *string `json:"id" validate:"required"` // The attached instance. Instance *InstanceReference `json:"instance" validate:"required"` // The name for this volume attachment. The name is unique across all volume attachments on the instance. Name *string `json:"name" validate:"required"` // The type of volume attachment. Type *string `json:"type" validate:"required"` } // Constants associated with the VolumeAttachmentReferenceVolumeContext.Type property. // The type of volume attachment. const ( VolumeAttachmentReferenceVolumeContextTypeBootConst = "boot" VolumeAttachmentReferenceVolumeContextTypeDataConst = "data" ) // UnmarshalVolumeAttachmentReferenceVolumeContext unmarshals an instance of VolumeAttachmentReferenceVolumeContext from the specified map of raw messages. func UnmarshalVolumeAttachmentReferenceVolumeContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentReferenceVolumeContext) err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeAttachmentReferenceVolumeContextDeleted) if err != nil { return } err = core.UnmarshalModel(m, "device", &obj.Device, UnmarshalVolumeAttachmentDevice) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "instance", &obj.Instance, UnmarshalInstanceReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentReferenceVolumeContextDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VolumeAttachmentReferenceVolumeContextDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVolumeAttachmentReferenceVolumeContextDeleted unmarshals an instance of VolumeAttachmentReferenceVolumeContextDeleted from the specified map of raw messages. func UnmarshalVolumeAttachmentReferenceVolumeContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentReferenceVolumeContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeCollection : VolumeCollection struct type VolumeCollection struct { // A link to the first page of resources. First *VolumeCollectionFirst `json:"first" validate:"required"` // The maximum number of resources that can be returned by the request. Limit *int64 `json:"limit" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. Next *VolumeCollectionNext `json:"next,omitempty"` // The total number of resources across all pages. TotalCount *int64 `json:"total_count" validate:"required"` // Collection of volumes. Volumes []Volume `json:"volumes" validate:"required"` } // UnmarshalVolumeCollection unmarshals an instance of VolumeCollection from the specified map of raw messages. func UnmarshalVolumeCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVolumeCollectionFirst) if err != nil { return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVolumeCollectionNext) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { return } err = core.UnmarshalModel(m, "volumes", &obj.Volumes, UnmarshalVolume) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Retrieve the value to be passed to a request to access the next page of results func (resp *VolumeCollection) GetNextStart() (*string, error) { if core.IsNil(resp.Next) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") if err != nil || start == nil { return nil, err } return start, nil } // VolumeCollectionFirst : A link to the first page of resources. type VolumeCollectionFirst struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVolumeCollectionFirst unmarshals an instance of VolumeCollectionFirst from the specified map of raw messages. func UnmarshalVolumeCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. type VolumeCollectionNext struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVolumeCollectionNext unmarshals an instance of VolumeCollectionNext from the specified map of raw messages. func UnmarshalVolumeCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeHealthReason : VolumeHealthReason struct type VolumeHealthReason struct { // A snake case string succinctly identifying the reason for this health state. Code *string `json:"code" validate:"required"` // An explanation of the reason for this health state. Message *string `json:"message" validate:"required"` // Link to documentation about the reason for this health state. MoreInfo *string `json:"more_info,omitempty"` } // Constants associated with the VolumeHealthReason.Code property. // A snake case string succinctly identifying the reason for this health state. const ( VolumeHealthReasonCodeInitializingFromSnapshotConst = "initializing_from_snapshot" ) // UnmarshalVolumeHealthReason unmarshals an instance of VolumeHealthReason from the specified map of raw messages. func UnmarshalVolumeHealthReason(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeHealthReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeIdentity : Identifies a volume by a unique property. // Models which "extend" this model: // - VolumeIdentityByID // - VolumeIdentityByCRN // - VolumeIdentityByHref type VolumeIdentity struct { // The unique identifier for this volume. ID *string `json:"id,omitempty"` // The CRN for this volume. CRN *string `json:"crn,omitempty"` // The URL for this volume. Href *string `json:"href,omitempty"` } func (*VolumeIdentity) isaVolumeIdentity() bool { return true } type VolumeIdentityIntf interface { isaVolumeIdentity() bool } // UnmarshalVolumeIdentity unmarshals an instance of VolumeIdentity from the specified map of raw messages. func UnmarshalVolumeIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumePatch : VolumePatch struct type VolumePatch struct { // The capacity to use for the volume (in gigabytes). The volume must be attached to a running virtual server instance, // and the specified value must not be less than the current capacity. Additionally, if the volume is attached as a // boot volume, the maximum value is 250 gigabytes. // // The minimum and maximum capacity limits for creating or updating volumes may expand in the future. Capacity *int64 `json:"capacity,omitempty"` // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. The volume must be attached as a data volume to a running virtual server instance. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. Name *string `json:"name,omitempty"` // The profile to use for this volume. The requested profile must be in the same // `family` as the current profile. The volume must be attached as a data volume to // a running virtual server instance, and must have a `capacity` within the range // supported by the specified profile. Profile VolumeProfileIdentityIntf `json:"profile,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` } // UnmarshalVolumePatch unmarshals an instance of VolumePatch from the specified map of raw messages. func UnmarshalVolumePatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumePatch) err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VolumePatch func (volumePatch *VolumePatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(volumePatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VolumeProfile : VolumeProfile struct type VolumeProfile struct { // The product family this volume profile belongs to. // // The enumerated values for this property will expand in the future. When processing this property, check for and log // unknown values. Optionally halt processing and surface the error, or bypass the volume profile on which the // unexpected property value was encountered. Family *string `json:"family" validate:"required"` // The URL for this volume profile. Href *string `json:"href" validate:"required"` // The globally unique name for this volume profile. Name *string `json:"name" validate:"required"` } // Constants associated with the VolumeProfile.Family property. // The product family this volume profile belongs to. // // The enumerated values for this property will expand in the future. When processing this property, check for and log // unknown values. Optionally halt processing and surface the error, or bypass the volume profile on which the // unexpected property value was encountered. const ( VolumeProfileFamilyCustomConst = "custom" VolumeProfileFamilyTieredConst = "tiered" ) // UnmarshalVolumeProfile unmarshals an instance of VolumeProfile from the specified map of raw messages. func UnmarshalVolumeProfile(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfile) err = core.UnmarshalPrimitive(m, "family", &obj.Family) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeProfileCollection : VolumeProfileCollection struct type VolumeProfileCollection struct { // A link to the first page of resources. First *VolumeProfileCollectionFirst `json:"first" validate:"required"` // The maximum number of resources that can be returned by the request. Limit *int64 `json:"limit" validate:"required"` // A link to the next page of resources. This property is present for all pages // except the last page. Next *VolumeProfileCollectionNext `json:"next,omitempty"` // Collection of volume profiles. Profiles []VolumeProfile `json:"profiles" validate:"required"` // The total number of resources across all pages. TotalCount *int64 `json:"total_count" validate:"required"` } // UnmarshalVolumeProfileCollection unmarshals an instance of VolumeProfileCollection from the specified map of raw messages. func UnmarshalVolumeProfileCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileCollection) err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalVolumeProfileCollectionFirst) if err != nil { return } err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) if err != nil { return } err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalVolumeProfileCollectionNext) if err != nil { return } err = core.UnmarshalModel(m, "profiles", &obj.Profiles, UnmarshalVolumeProfile) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_count", &obj.TotalCount) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Retrieve the value to be passed to a request to access the next page of results func (resp *VolumeProfileCollection) GetNextStart() (*string, error) { if core.IsNil(resp.Next) { return nil, nil } start, err := core.GetQueryParam(resp.Next.Href, "start") if err != nil || start == nil { return nil, err } return start, nil } // VolumeProfileCollectionFirst : A link to the first page of resources. type VolumeProfileCollectionFirst struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVolumeProfileCollectionFirst unmarshals an instance of VolumeProfileCollectionFirst from the specified map of raw messages. func UnmarshalVolumeProfileCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileCollectionFirst) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeProfileCollectionNext : A link to the next page of resources. This property is present for all pages except the last page. type VolumeProfileCollectionNext struct { // The URL for a page of resources. Href *string `json:"href" validate:"required"` } // UnmarshalVolumeProfileCollectionNext unmarshals an instance of VolumeProfileCollectionNext from the specified map of raw messages. func UnmarshalVolumeProfileCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeProfileIdentity : Identifies a volume profile by a unique property. // Models which "extend" this model: // - VolumeProfileIdentityByName // - VolumeProfileIdentityByHref type VolumeProfileIdentity struct { // The globally unique name for this volume profile. Name *string `json:"name,omitempty"` // The URL for this volume profile. Href *string `json:"href,omitempty"` } func (*VolumeProfileIdentity) isaVolumeProfileIdentity() bool { return true } type VolumeProfileIdentityIntf interface { isaVolumeProfileIdentity() bool } // UnmarshalVolumeProfileIdentity unmarshals an instance of VolumeProfileIdentity from the specified map of raw messages. func UnmarshalVolumeProfileIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeProfileReference : VolumeProfileReference struct type VolumeProfileReference struct { // The URL for this volume profile. Href *string `json:"href" validate:"required"` // The globally unique name for this volume profile. Name *string `json:"name" validate:"required"` } // UnmarshalVolumeProfileReference unmarshals an instance of VolumeProfileReference from the specified map of raw messages. func UnmarshalVolumeProfileReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumePrototype : VolumePrototype struct // Models which "extend" this model: // - VolumePrototypeVolumeByCapacity // - VolumePrototypeVolumeBySourceSnapshot type VolumePrototype struct { // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to // use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use. If unspecified, the account's [default resource // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The zone this volume will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or // updating volumes may expand in the future. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The snapshot from which to clone the volume. SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"` } func (*VolumePrototype) isaVolumePrototype() bool { return true } type VolumePrototypeIntf interface { isaVolumePrototype() bool } // UnmarshalVolumePrototype unmarshals an instance of VolumePrototype from the specified map of raw messages. func UnmarshalVolumePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumePrototype) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumePrototypeInstanceByImageContext : VolumePrototypeInstanceByImageContext struct type VolumePrototypeInstanceByImageContext struct { // The capacity to use for the volume (in gigabytes). Must be at least the image's // `minimum_provisioned_size`. The maximum value may increase in the future. // // If unspecified, the capacity will be the image's `minimum_provisioned_size`. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to // use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use for this volume. If unspecified, the instance's resource // group will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` } // NewVolumePrototypeInstanceByImageContext : Instantiate VolumePrototypeInstanceByImageContext (Generic Model Constructor) func (*VpcbetaV1) NewVolumePrototypeInstanceByImageContext(profile VolumeProfileIdentityIntf) (_model *VolumePrototypeInstanceByImageContext, err error) { _model = &VolumePrototypeInstanceByImageContext{ Profile: profile, } err = core.ValidateStruct(_model, "required parameters") return } // UnmarshalVolumePrototypeInstanceByImageContext unmarshals an instance of VolumePrototypeInstanceByImageContext from the specified map of raw messages. func UnmarshalVolumePrototypeInstanceByImageContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumePrototypeInstanceByImageContext) err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumePrototypeInstanceBySourceSnapshotContext : VolumePrototypeInstanceBySourceSnapshotContext struct type VolumePrototypeInstanceBySourceSnapshotContext struct { // The capacity to use for the volume (in gigabytes). Must be at least the snapshot's // `minimum_capacity`. The maximum value may increase in the future. // // If unspecified, the capacity will be the source snapshot's `minimum_capacity`. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to // use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use for this volume. If unspecified, the instance's resource // group will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The snapshot from which to clone the volume. SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot" validate:"required"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` } // NewVolumePrototypeInstanceBySourceSnapshotContext : Instantiate VolumePrototypeInstanceBySourceSnapshotContext (Generic Model Constructor) func (*VpcbetaV1) NewVolumePrototypeInstanceBySourceSnapshotContext(profile VolumeProfileIdentityIntf, sourceSnapshot SnapshotIdentityIntf) (_model *VolumePrototypeInstanceBySourceSnapshotContext, err error) { _model = &VolumePrototypeInstanceBySourceSnapshotContext{ Profile: profile, SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") return } // UnmarshalVolumePrototypeInstanceBySourceSnapshotContext unmarshals an instance of VolumePrototypeInstanceBySourceSnapshotContext from the specified map of raw messages. func UnmarshalVolumePrototypeInstanceBySourceSnapshotContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumePrototypeInstanceBySourceSnapshotContext) err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeReference : VolumeReference struct type VolumeReference struct { // The CRN for this volume. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VolumeReferenceDeleted `json:"deleted,omitempty"` // The URL for this volume. Href *string `json:"href" validate:"required"` // The unique identifier for this volume. ID *string `json:"id" validate:"required"` // The name for this volume. The name is unique across all volumes in the region. Name *string `json:"name" validate:"required"` // If present, this property indicates that the resource associated with this reference // is remote and therefore may not be directly retrievable. Remote *VolumeRemote `json:"remote,omitempty"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the VolumeReference.ResourceType property. // The resource type. const ( VolumeReferenceResourceTypeVolumeConst = "volume" ) // UnmarshalVolumeReference unmarshals an instance of VolumeReference from the specified map of raw messages. func UnmarshalVolumeReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVolumeRemote) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeReferenceDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VolumeReferenceDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVolumeReferenceDeleted unmarshals an instance of VolumeReferenceDeleted from the specified map of raw messages. func UnmarshalVolumeReferenceDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeReferenceDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeReferenceVolumeAttachmentContext : VolumeReferenceVolumeAttachmentContext struct type VolumeReferenceVolumeAttachmentContext struct { // The CRN for this volume. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VolumeReferenceVolumeAttachmentContextDeleted `json:"deleted,omitempty"` // The URL for this volume. Href *string `json:"href" validate:"required"` // The unique identifier for this volume. ID *string `json:"id" validate:"required"` // The name for this volume. The name is unique across all volumes in the region. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the VolumeReferenceVolumeAttachmentContext.ResourceType property. // The resource type. const ( VolumeReferenceVolumeAttachmentContextResourceTypeVolumeConst = "volume" ) // UnmarshalVolumeReferenceVolumeAttachmentContext unmarshals an instance of VolumeReferenceVolumeAttachmentContext from the specified map of raw messages. func UnmarshalVolumeReferenceVolumeAttachmentContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeReferenceVolumeAttachmentContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceVolumeAttachmentContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeReferenceVolumeAttachmentContextDeleted : If present, this property indicates the referenced resource has been deleted, and provides some supplementary // information. type VolumeReferenceVolumeAttachmentContextDeleted struct { // Link to documentation about deleted resources. MoreInfo *string `json:"more_info" validate:"required"` } // UnmarshalVolumeReferenceVolumeAttachmentContextDeleted unmarshals an instance of VolumeReferenceVolumeAttachmentContextDeleted from the specified map of raw messages. func UnmarshalVolumeReferenceVolumeAttachmentContextDeleted(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeReferenceVolumeAttachmentContextDeleted) err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeRemote : If present, this property indicates that the resource associated with this reference is remote and therefore may not // be directly retrievable. type VolumeRemote struct { // If present, this property indicates that the referenced resource is remote to this // region, and identifies the native region. Region *RegionReference `json:"region,omitempty"` } // UnmarshalVolumeRemote unmarshals an instance of VolumeRemote from the specified map of raw messages. func UnmarshalVolumeRemote(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeRemote) err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeStatusReason : VolumeStatusReason struct type VolumeStatusReason struct { // A snake case string succinctly identifying the status reason. Code *string `json:"code" validate:"required"` // An explanation of the status reason. Message *string `json:"message" validate:"required"` // Link to documentation about this status reason. MoreInfo *string `json:"more_info,omitempty"` } // Constants associated with the VolumeStatusReason.Code property. // A snake case string succinctly identifying the status reason. const ( VolumeStatusReasonCodeEncryptionKeyDeletedConst = "encryption_key_deleted" ) // UnmarshalVolumeStatusReason unmarshals an instance of VolumeStatusReason from the specified map of raw messages. func UnmarshalVolumeStatusReason(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeStatusReason) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "message", &obj.Message) if err != nil { return } err = core.UnmarshalPrimitive(m, "more_info", &obj.MoreInfo) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // Zone : Zone struct type Zone struct { // The URL for this zone. Href *string `json:"href" validate:"required"` // The globally unique name for this zone. Name *string `json:"name" validate:"required"` // The region this zone resides in. Region *RegionReference `json:"region" validate:"required"` // The availability status of this zone. Status *string `json:"status" validate:"required"` } // Constants associated with the Zone.Status property. // The availability status of this zone. const ( ZoneStatusAvailableConst = "available" ZoneStatusImpairedConst = "impaired" ZoneStatusUnavailableConst = "unavailable" ) // UnmarshalZone unmarshals an instance of Zone from the specified map of raw messages. func UnmarshalZone(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(Zone) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "region", &obj.Region, UnmarshalRegionReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ZoneCollection : ZoneCollection struct type ZoneCollection struct { // Collection of zones. Zones []Zone `json:"zones" validate:"required"` } // UnmarshalZoneCollection unmarshals an instance of ZoneCollection from the specified map of raw messages. func UnmarshalZoneCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ZoneCollection) err = core.UnmarshalModel(m, "zones", &obj.Zones, UnmarshalZone) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ZoneIdentity : Identifies a zone by a unique property. // Models which "extend" this model: // - ZoneIdentityByName // - ZoneIdentityByHref type ZoneIdentity struct { // The globally unique name for this zone. Name *string `json:"name,omitempty"` // The URL for this zone. Href *string `json:"href,omitempty"` } func (*ZoneIdentity) isaZoneIdentity() bool { return true } type ZoneIdentityIntf interface { isaZoneIdentity() bool } // UnmarshalZoneIdentity unmarshals an instance of ZoneIdentity from the specified map of raw messages. func UnmarshalZoneIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ZoneIdentity) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ZoneReference : ZoneReference struct type ZoneReference struct { // The URL for this zone. Href *string `json:"href" validate:"required"` // The globally unique name for this zone. Name *string `json:"name" validate:"required"` } // UnmarshalZoneReference unmarshals an instance of ZoneReference from the specified map of raw messages. func UnmarshalZoneReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ZoneReference) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BackupPolicyJobSourceVolumeReference : BackupPolicyJobSourceVolumeReference struct // This model "extends" BackupPolicyJobSource type BackupPolicyJobSourceVolumeReference struct { // The CRN for this volume. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VolumeReferenceDeleted `json:"deleted,omitempty"` // The URL for this volume. Href *string `json:"href" validate:"required"` // The unique identifier for this volume. ID *string `json:"id" validate:"required"` // The name for this volume. The name is unique across all volumes in the region. Name *string `json:"name" validate:"required"` // If present, this property indicates that the resource associated with this reference // is remote and therefore may not be directly retrievable. Remote *VolumeRemote `json:"remote,omitempty"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the BackupPolicyJobSourceVolumeReference.ResourceType property. // The resource type. const ( BackupPolicyJobSourceVolumeReferenceResourceTypeVolumeConst = "volume" ) func (*BackupPolicyJobSourceVolumeReference) isaBackupPolicyJobSource() bool { return true } // UnmarshalBackupPolicyJobSourceVolumeReference unmarshals an instance of BackupPolicyJobSourceVolumeReference from the specified map of raw messages. func UnmarshalBackupPolicyJobSourceVolumeReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BackupPolicyJobSourceVolumeReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVolumeReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalVolumeRemote) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerBootTargetBareMetalServerDiskReference : BareMetalServerBootTargetBareMetalServerDiskReference struct // This model "extends" BareMetalServerBootTarget type BareMetalServerBootTargetBareMetalServerDiskReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *BareMetalServerDiskReferenceDeleted `json:"deleted,omitempty"` // The URL for this bare metal server disk. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server disk. ID *string `json:"id" validate:"required"` // The name for this bare metal server disk. The name is unique across all disks on the bare metal server. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the BareMetalServerBootTargetBareMetalServerDiskReference.ResourceType property. // The resource type. const ( BareMetalServerBootTargetBareMetalServerDiskReferenceResourceTypeBareMetalServerDiskConst = "bare_metal_server_disk" ) func (*BareMetalServerBootTargetBareMetalServerDiskReference) isaBareMetalServerBootTarget() bool { return true } // UnmarshalBareMetalServerBootTargetBareMetalServerDiskReference unmarshals an instance of BareMetalServerBootTargetBareMetalServerDiskReference from the specified map of raw messages. func UnmarshalBareMetalServerBootTargetBareMetalServerDiskReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerBootTargetBareMetalServerDiskReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerDiskReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount : BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount struct // This model "extends" BareMetalServerInitializationUserAccount type BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount struct { // The password at initialization, encrypted using `encryption_key`, and returned base64-encoded. EncryptedPassword *[]byte `json:"encrypted_password" validate:"required"` // The public SSH key used to encrypt the password. EncryptionKey *KeyReference `json:"encryption_key" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The username for the account created at initialization. Username *string `json:"username" validate:"required"` } // Constants associated with the BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount.ResourceType property. // The resource type. const ( BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccountResourceTypeHostUserAccountConst = "host_user_account" ) func (*BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount) isaBareMetalServerInitializationUserAccount() bool { return true } // UnmarshalBareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount unmarshals an instance of BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount from the specified map of raw messages. func UnmarshalBareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerInitializationUserAccountBareMetalServerInitializationHostUserAccount) err = core.UnmarshalPrimitive(m, "encrypted_password", &obj.EncryptedPassword) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalKeyReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "username", &obj.Username) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerNetworkInterfaceByHiperSocket : BareMetalServerNetworkInterfaceByHiperSocket struct // This model "extends" BareMetalServerNetworkInterface type BareMetalServerNetworkInterfaceByHiperSocket struct { // Indicates whether source IP spoofing is allowed on this bare metal server network interface. AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"` // The date and time that the bare metal server network interface was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // If `true`: // - The VPC infrastructure performs any needed NAT operations. // - `floating_ips` must not have more than one floating IP. // // If `false`: // - Packets are passed unchanged to/from the bare metal server network interface, // allowing the workload to perform any needed NAT operations. // - `allow_ip_spoofing` must be `false`. // - `interface_type` must not be `hipersocket`. EnableInfrastructureNat *bool `json:"enable_infrastructure_nat" validate:"required"` // The floating IPs associated with this bare metal server network interface. FloatingIps []FloatingIPReference `json:"floating_ips" validate:"required"` // The URL for this bare metal server network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server network interface. ID *string `json:"id" validate:"required"` // The MAC address of this bare metal server network interface. If the MAC address has not yet been selected, the value // will be an empty string. MacAddress *string `json:"mac_address" validate:"required"` // The name for this bare metal server network interface. Name *string `json:"name" validate:"required"` // The bare metal server network interface port speed in Mbps. PortSpeed *int64 `json:"port_speed" validate:"required"` PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The security groups targeting this bare metal server network interface. SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"` // The status of the bare metal server network interface. Status *string `json:"status" validate:"required"` // The associated subnet. Subnet *SubnetReference `json:"subnet" validate:"required"` // The type of this bare metal server network interface. Type *string `json:"type" validate:"required"` // - `hipersocket`: a virtual network device that provides high-speed TCP/IP connectivity // within a `s390x` based system. InterfaceType *string `json:"interface_type" validate:"required"` } // Constants associated with the BareMetalServerNetworkInterfaceByHiperSocket.ResourceType property. // The resource type. const ( BareMetalServerNetworkInterfaceByHiperSocketResourceTypeNetworkInterfaceConst = "network_interface" ) // Constants associated with the BareMetalServerNetworkInterfaceByHiperSocket.Status property. // The status of the bare metal server network interface. const ( BareMetalServerNetworkInterfaceByHiperSocketStatusAvailableConst = "available" BareMetalServerNetworkInterfaceByHiperSocketStatusDeletingConst = "deleting" BareMetalServerNetworkInterfaceByHiperSocketStatusFailedConst = "failed" BareMetalServerNetworkInterfaceByHiperSocketStatusPendingConst = "pending" ) // Constants associated with the BareMetalServerNetworkInterfaceByHiperSocket.Type property. // The type of this bare metal server network interface. const ( BareMetalServerNetworkInterfaceByHiperSocketTypePrimaryConst = "primary" BareMetalServerNetworkInterfaceByHiperSocketTypeSecondaryConst = "secondary" ) // Constants associated with the BareMetalServerNetworkInterfaceByHiperSocket.InterfaceType property. // - `hipersocket`: a virtual network device that provides high-speed TCP/IP connectivity // within a `s390x` based system. const ( BareMetalServerNetworkInterfaceByHiperSocketInterfaceTypeHipersocketConst = "hipersocket" ) func (*BareMetalServerNetworkInterfaceByHiperSocket) isaBareMetalServerNetworkInterface() bool { return true } // UnmarshalBareMetalServerNetworkInterfaceByHiperSocket unmarshals an instance of BareMetalServerNetworkInterfaceByHiperSocket from the specified map of raw messages. func UnmarshalBareMetalServerNetworkInterfaceByHiperSocket(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerNetworkInterfaceByHiperSocket) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerNetworkInterfaceByPci : BareMetalServerNetworkInterfaceByPci struct // This model "extends" BareMetalServerNetworkInterface type BareMetalServerNetworkInterfaceByPci struct { // Indicates whether source IP spoofing is allowed on this bare metal server network interface. AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"` // The date and time that the bare metal server network interface was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // If `true`: // - The VPC infrastructure performs any needed NAT operations. // - `floating_ips` must not have more than one floating IP. // // If `false`: // - Packets are passed unchanged to/from the bare metal server network interface, // allowing the workload to perform any needed NAT operations. // - `allow_ip_spoofing` must be `false`. // - `interface_type` must not be `hipersocket`. EnableInfrastructureNat *bool `json:"enable_infrastructure_nat" validate:"required"` // The floating IPs associated with this bare metal server network interface. FloatingIps []FloatingIPReference `json:"floating_ips" validate:"required"` // The URL for this bare metal server network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server network interface. ID *string `json:"id" validate:"required"` // The MAC address of this bare metal server network interface. If the MAC address has not yet been selected, the value // will be an empty string. MacAddress *string `json:"mac_address" validate:"required"` // The name for this bare metal server network interface. Name *string `json:"name" validate:"required"` // The bare metal server network interface port speed in Mbps. PortSpeed *int64 `json:"port_speed" validate:"required"` PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The security groups targeting this bare metal server network interface. SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"` // The status of the bare metal server network interface. Status *string `json:"status" validate:"required"` // The associated subnet. Subnet *SubnetReference `json:"subnet" validate:"required"` // The type of this bare metal server network interface. Type *string `json:"type" validate:"required"` // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. AllowedVlans []int64 `json:"allowed_vlans" validate:"required"` // - `pci`: a physical PCI device which can only be created or deleted when the bare metal // server is stopped // - Has an `allowed_vlans` property which controls the VLANs that will be permitted // to use the PCI interface // - Cannot directly use an IEEE 802.1q VLAN tag. InterfaceType *string `json:"interface_type" validate:"required"` } // Constants associated with the BareMetalServerNetworkInterfaceByPci.ResourceType property. // The resource type. const ( BareMetalServerNetworkInterfaceByPciResourceTypeNetworkInterfaceConst = "network_interface" ) // Constants associated with the BareMetalServerNetworkInterfaceByPci.Status property. // The status of the bare metal server network interface. const ( BareMetalServerNetworkInterfaceByPciStatusAvailableConst = "available" BareMetalServerNetworkInterfaceByPciStatusDeletingConst = "deleting" BareMetalServerNetworkInterfaceByPciStatusFailedConst = "failed" BareMetalServerNetworkInterfaceByPciStatusPendingConst = "pending" ) // Constants associated with the BareMetalServerNetworkInterfaceByPci.Type property. // The type of this bare metal server network interface. const ( BareMetalServerNetworkInterfaceByPciTypePrimaryConst = "primary" BareMetalServerNetworkInterfaceByPciTypeSecondaryConst = "secondary" ) // Constants associated with the BareMetalServerNetworkInterfaceByPci.InterfaceType property. // - `pci`: a physical PCI device which can only be created or deleted when the bare metal // server is stopped // - Has an `allowed_vlans` property which controls the VLANs that will be permitted // to use the PCI interface // - Cannot directly use an IEEE 802.1q VLAN tag. const ( BareMetalServerNetworkInterfaceByPciInterfaceTypePciConst = "pci" ) func (*BareMetalServerNetworkInterfaceByPci) isaBareMetalServerNetworkInterface() bool { return true } // UnmarshalBareMetalServerNetworkInterfaceByPci unmarshals an instance of BareMetalServerNetworkInterfaceByPci from the specified map of raw messages. func UnmarshalBareMetalServerNetworkInterfaceByPci(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerNetworkInterfaceByPci) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerNetworkInterfaceByVlan : BareMetalServerNetworkInterfaceByVlan struct // This model "extends" BareMetalServerNetworkInterface type BareMetalServerNetworkInterfaceByVlan struct { // Indicates whether source IP spoofing is allowed on this bare metal server network interface. AllowIPSpoofing *bool `json:"allow_ip_spoofing" validate:"required"` // The date and time that the bare metal server network interface was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // If `true`: // - The VPC infrastructure performs any needed NAT operations. // - `floating_ips` must not have more than one floating IP. // // If `false`: // - Packets are passed unchanged to/from the bare metal server network interface, // allowing the workload to perform any needed NAT operations. // - `allow_ip_spoofing` must be `false`. // - `interface_type` must not be `hipersocket`. EnableInfrastructureNat *bool `json:"enable_infrastructure_nat" validate:"required"` // The floating IPs associated with this bare metal server network interface. FloatingIps []FloatingIPReference `json:"floating_ips" validate:"required"` // The URL for this bare metal server network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server network interface. ID *string `json:"id" validate:"required"` // The MAC address of this bare metal server network interface. If the MAC address has not yet been selected, the value // will be an empty string. MacAddress *string `json:"mac_address" validate:"required"` // The name for this bare metal server network interface. Name *string `json:"name" validate:"required"` // The bare metal server network interface port speed in Mbps. PortSpeed *int64 `json:"port_speed" validate:"required"` PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The security groups targeting this bare metal server network interface. SecurityGroups []SecurityGroupReference `json:"security_groups" validate:"required"` // The status of the bare metal server network interface. Status *string `json:"status" validate:"required"` // The associated subnet. Subnet *SubnetReference `json:"subnet" validate:"required"` // The type of this bare metal server network interface. Type *string `json:"type" validate:"required"` // Indicates if the interface can float to any other server within the same // `resource_group`. The interface will float automatically if the network detects a GARP or RARP on another bare metal // server in the resource group. Applies only to `vlan` type interfaces. AllowInterfaceToFloat *bool `json:"allow_interface_to_float" validate:"required"` // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array // of `allowed_vlans`. // - Must use an IEEE 802.1q tag. // - Has its own security groups and does not inherit those of the PCI device through // which traffic flows. InterfaceType *string `json:"interface_type" validate:"required"` // Indicates the 802.1Q VLAN ID tag that must be used for all traffic on this interface. Vlan *int64 `json:"vlan" validate:"required"` } // Constants associated with the BareMetalServerNetworkInterfaceByVlan.ResourceType property. // The resource type. const ( BareMetalServerNetworkInterfaceByVlanResourceTypeNetworkInterfaceConst = "network_interface" ) // Constants associated with the BareMetalServerNetworkInterfaceByVlan.Status property. // The status of the bare metal server network interface. const ( BareMetalServerNetworkInterfaceByVlanStatusAvailableConst = "available" BareMetalServerNetworkInterfaceByVlanStatusDeletingConst = "deleting" BareMetalServerNetworkInterfaceByVlanStatusFailedConst = "failed" BareMetalServerNetworkInterfaceByVlanStatusPendingConst = "pending" ) // Constants associated with the BareMetalServerNetworkInterfaceByVlan.Type property. // The type of this bare metal server network interface. const ( BareMetalServerNetworkInterfaceByVlanTypePrimaryConst = "primary" BareMetalServerNetworkInterfaceByVlanTypeSecondaryConst = "secondary" ) // Constants associated with the BareMetalServerNetworkInterfaceByVlan.InterfaceType property. // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array // of `allowed_vlans`. // - Must use an IEEE 802.1q tag. // - Has its own security groups and does not inherit those of the PCI device through // which traffic flows. const ( BareMetalServerNetworkInterfaceByVlanInterfaceTypeVlanConst = "vlan" ) func (*BareMetalServerNetworkInterfaceByVlan) isaBareMetalServerNetworkInterface() bool { return true } // UnmarshalBareMetalServerNetworkInterfaceByVlan unmarshals an instance of BareMetalServerNetworkInterfaceByVlan from the specified map of raw messages. func UnmarshalBareMetalServerNetworkInterfaceByVlan(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerNetworkInterfaceByVlan) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { return } err = core.UnmarshalModel(m, "floating_ips", &obj.FloatingIps, UnmarshalFloatingIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "mac_address", &obj.MacAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_speed", &obj.PortSpeed) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "allow_interface_to_float", &obj.AllowInterfaceToFloat) if err != nil { return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype : BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype struct // This model "extends" BareMetalServerNetworkInterfacePrototype type BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype struct { // Indicates whether source IP spoofing is allowed on this bare metal server network interface. AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"` // If `true`: // - The VPC infrastructure performs any needed NAT operations. // - `floating_ips` must not have more than one floating IP. // // If `false`: // - Packets are passed unchanged to/from the bare metal server network interface, // allowing the workload to perform any needed NAT operations. // - `allow_ip_spoofing` must be `false`. // - `interface_type` must not be `hipersocket`. EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"` // The name for this bare metal server network interface. The name must not be used by another network interface on the // bare metal server. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The primary IP address to bind to the bare metal server network interface. This can be specified using an existing // reserved IP, or a prototype object for a new reserved IP. // // If an existing reserved IP or a prototype object with an address is specified, it must be available on the bare // metal server network interface's subnet. Otherwise, an available address on the subnet will be automatically // selected and reserved. PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"` // The security groups to use for this bare metal server network interface. If unspecified, the VPC's default security // group is used. SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"` // The associated subnet. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` // - `hipersocket`: a virtual network device that provides high-speed TCP/IP connectivity // within a `s390x` based system. // - Not supported on bare metal servers with a `cpu.architecture` of `amd64`. InterfaceType *string `json:"interface_type" validate:"required"` } // Constants associated with the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype.InterfaceType property. // - `hipersocket`: a virtual network device that provides high-speed TCP/IP connectivity // within a `s390x` based system. // - Not supported on bare metal servers with a `cpu.architecture` of `amd64`. const ( BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototypeInterfaceTypeHipersocketConst = "hipersocket" ) // NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype : Instantiate BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(subnet SubnetIdentityIntf, interfaceType string) (_model *BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype, err error) { _model = &BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype{ Subnet: subnet, InterfaceType: core.StringPtr(interfaceType), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype) isaBareMetalServerNetworkInterfacePrototype() bool { return true } // UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype unmarshals an instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype from the specified map of raw messages. func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByHiperSocketPrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype : BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype struct // This model "extends" BareMetalServerNetworkInterfacePrototype type BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype struct { // Indicates whether source IP spoofing is allowed on this bare metal server network interface. AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"` // If `true`: // - The VPC infrastructure performs any needed NAT operations. // - `floating_ips` must not have more than one floating IP. // // If `false`: // - Packets are passed unchanged to/from the bare metal server network interface, // allowing the workload to perform any needed NAT operations. // - `allow_ip_spoofing` must be `false`. // - `interface_type` must not be `hipersocket`. EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"` // The name for this bare metal server network interface. The name must not be used by another network interface on the // bare metal server. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The primary IP address to bind to the bare metal server network interface. This can be specified using an existing // reserved IP, or a prototype object for a new reserved IP. // // If an existing reserved IP or a prototype object with an address is specified, it must be available on the bare // metal server network interface's subnet. Otherwise, an available address on the subnet will be automatically // selected and reserved. PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"` // The security groups to use for this bare metal server network interface. If unspecified, the VPC's default security // group is used. SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"` // The associated subnet. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` // Indicates what VLAN IDs (for VLAN type only) can use this physical (PCI type) interface. AllowedVlans []int64 `json:"allowed_vlans,omitempty"` // - `pci`: a physical PCI device which can only be created or deleted when the bare metal // server is stopped // - Has an `allowed_vlans` property which controls the VLANs that will be permitted // to use the PCI interface // - Cannot directly use an IEEE 802.1q VLAN tag. // - Not supported on bare metal servers with a `cpu.architecture` of `s390x`. InterfaceType *string `json:"interface_type" validate:"required"` } // Constants associated with the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype.InterfaceType property. // - `pci`: a physical PCI device which can only be created or deleted when the bare metal // server is stopped // - Has an `allowed_vlans` property which controls the VLANs that will be permitted // to use the PCI interface // - Cannot directly use an IEEE 802.1q VLAN tag. // - Not supported on bare metal servers with a `cpu.architecture` of `s390x`. const ( BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototypeInterfaceTypePciConst = "pci" ) // NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype : Instantiate BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype(subnet SubnetIdentityIntf, interfaceType string) (_model *BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype, err error) { _model = &BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype{ Subnet: subnet, InterfaceType: core.StringPtr(interfaceType), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype) isaBareMetalServerNetworkInterfacePrototype() bool { return true } // UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype unmarshals an instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype from the specified map of raw messages. func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByPciPrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "allowed_vlans", &obj.AllowedVlans) if err != nil { return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype : BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype struct // This model "extends" BareMetalServerNetworkInterfacePrototype type BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype struct { // Indicates whether source IP spoofing is allowed on this bare metal server network interface. AllowIPSpoofing *bool `json:"allow_ip_spoofing,omitempty"` // If `true`: // - The VPC infrastructure performs any needed NAT operations. // - `floating_ips` must not have more than one floating IP. // // If `false`: // - Packets are passed unchanged to/from the bare metal server network interface, // allowing the workload to perform any needed NAT operations. // - `allow_ip_spoofing` must be `false`. // - `interface_type` must not be `hipersocket`. EnableInfrastructureNat *bool `json:"enable_infrastructure_nat,omitempty"` // The name for this bare metal server network interface. The name must not be used by another network interface on the // bare metal server. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The primary IP address to bind to the bare metal server network interface. This can be specified using an existing // reserved IP, or a prototype object for a new reserved IP. // // If an existing reserved IP or a prototype object with an address is specified, it must be available on the bare // metal server network interface's subnet. Otherwise, an available address on the subnet will be automatically // selected and reserved. PrimaryIP NetworkInterfaceIPPrototypeIntf `json:"primary_ip,omitempty"` // The security groups to use for this bare metal server network interface. If unspecified, the VPC's default security // group is used. SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"` // The associated subnet. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` // Indicates if the interface can float to any other server within the same // `resource_group`. The interface will float automatically if the network detects a GARP or RARP on another bare metal // server in the resource group. Applies only to `vlan` type interfaces. AllowInterfaceToFloat *bool `json:"allow_interface_to_float,omitempty"` // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array // of `allowed_vlans`. // - Must use an IEEE 802.1q tag. // - Has its own security groups and does not inherit those of the PCI device through // which traffic flows. // - Not supported on bare metal servers with a `cpu.architecture` of `s390x`. InterfaceType *string `json:"interface_type" validate:"required"` // Indicates the 802.1Q VLAN ID tag that must be used for all traffic on this interface. Vlan *int64 `json:"vlan" validate:"required"` } // Constants associated with the BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype.InterfaceType property. // - `vlan`: a virtual device, used through a `pci` device that has the `vlan` in its array // of `allowed_vlans`. // - Must use an IEEE 802.1q tag. // - Has its own security groups and does not inherit those of the PCI device through // which traffic flows. // - Not supported on bare metal servers with a `cpu.architecture` of `s390x`. const ( BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototypeInterfaceTypeVlanConst = "vlan" ) // NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype : Instantiate BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype(subnet SubnetIdentityIntf, interfaceType string, vlan int64) (_model *BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype, err error) { _model = &BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype{ Subnet: subnet, InterfaceType: core.StringPtr(interfaceType), Vlan: core.Int64Ptr(vlan), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype) isaBareMetalServerNetworkInterfacePrototype() bool { return true } // UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype unmarshals an instance of BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype from the specified map of raw messages. func UnmarshalBareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerNetworkInterfacePrototypeBareMetalServerNetworkInterfaceByVlanPrototype) err = core.UnmarshalPrimitive(m, "allow_ip_spoofing", &obj.AllowIPSpoofing) if err != nil { return } err = core.UnmarshalPrimitive(m, "enable_infrastructure_nat", &obj.EnableInfrastructureNat) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalNetworkInterfaceIPPrototype) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "allow_interface_to_float", &obj.AllowInterfaceToFloat) if err != nil { return } err = core.UnmarshalPrimitive(m, "interface_type", &obj.InterfaceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "vlan", &obj.Vlan) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileBandwidthDependent : The total bandwidth shared across the bare metal server network interfaces of a bare metal server with this profile // depends on its configuration. // This model "extends" BareMetalServerProfileBandwidth type BareMetalServerProfileBandwidthDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileBandwidthDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileBandwidthDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileBandwidthDependent) isaBareMetalServerProfileBandwidth() bool { return true } // UnmarshalBareMetalServerProfileBandwidthDependent unmarshals an instance of BareMetalServerProfileBandwidthDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileBandwidthDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileBandwidthEnum : The permitted total bandwidth values (in megabits per second) shared across the bare metal server network interfaces // of a bare metal server with this profile. // This model "extends" BareMetalServerProfileBandwidth type BareMetalServerProfileBandwidthEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the BareMetalServerProfileBandwidthEnum.Type property. // The type for this profile field. const ( BareMetalServerProfileBandwidthEnumTypeEnumConst = "enum" ) func (*BareMetalServerProfileBandwidthEnum) isaBareMetalServerProfileBandwidth() bool { return true } // UnmarshalBareMetalServerProfileBandwidthEnum unmarshals an instance of BareMetalServerProfileBandwidthEnum from the specified map of raw messages. func UnmarshalBareMetalServerProfileBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileBandwidthEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileBandwidthFixed : The total bandwidth (in megabits per second) shared across the bare metal server network interfaces of a bare metal // server with this profile. // This model "extends" BareMetalServerProfileBandwidth type BareMetalServerProfileBandwidthFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the BareMetalServerProfileBandwidthFixed.Type property. // The type for this profile field. const ( BareMetalServerProfileBandwidthFixedTypeFixedConst = "fixed" ) func (*BareMetalServerProfileBandwidthFixed) isaBareMetalServerProfileBandwidth() bool { return true } // UnmarshalBareMetalServerProfileBandwidthFixed unmarshals an instance of BareMetalServerProfileBandwidthFixed from the specified map of raw messages. func UnmarshalBareMetalServerProfileBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileBandwidthFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileBandwidthRange : The permitted total bandwidth range (in megabits per second) shared across the bare metal server network interfaces // of a bare metal server with this profile. // This model "extends" BareMetalServerProfileBandwidth type BareMetalServerProfileBandwidthRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileBandwidthRange.Type property. // The type for this profile field. const ( BareMetalServerProfileBandwidthRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileBandwidthRange) isaBareMetalServerProfileBandwidth() bool { return true } // UnmarshalBareMetalServerProfileBandwidthRange unmarshals an instance of BareMetalServerProfileBandwidthRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileBandwidthRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuCoreCountDependent : The CPU core count for a bare metal server with this profile depends on its configuration. // This model "extends" BareMetalServerProfileCpuCoreCount type BareMetalServerProfileCpuCoreCountDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuCoreCountDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuCoreCountDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileCpuCoreCountDependent) isaBareMetalServerProfileCpuCoreCount() bool { return true } // UnmarshalBareMetalServerProfileCpuCoreCountDependent unmarshals an instance of BareMetalServerProfileCpuCoreCountDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuCoreCountDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuCoreCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuCoreCountEnum : The permitted values for CPU cores for a bare metal server with this profile. // This model "extends" BareMetalServerProfileCpuCoreCount type BareMetalServerProfileCpuCoreCountEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuCoreCountEnum.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuCoreCountEnumTypeEnumConst = "enum" ) func (*BareMetalServerProfileCpuCoreCountEnum) isaBareMetalServerProfileCpuCoreCount() bool { return true } // UnmarshalBareMetalServerProfileCpuCoreCountEnum unmarshals an instance of BareMetalServerProfileCpuCoreCountEnum from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuCoreCountEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuCoreCountEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuCoreCountFixed : The CPU core count for a bare metal server with this profile. // This model "extends" BareMetalServerProfileCpuCoreCount type BareMetalServerProfileCpuCoreCountFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuCoreCountFixed.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuCoreCountFixedTypeFixedConst = "fixed" ) func (*BareMetalServerProfileCpuCoreCountFixed) isaBareMetalServerProfileCpuCoreCount() bool { return true } // UnmarshalBareMetalServerProfileCpuCoreCountFixed unmarshals an instance of BareMetalServerProfileCpuCoreCountFixed from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuCoreCountFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuCoreCountFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuCoreCountRange : The permitted range for the number of CPU cores for a bare metal server with this profile. // This model "extends" BareMetalServerProfileCpuCoreCount type BareMetalServerProfileCpuCoreCountRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuCoreCountRange.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuCoreCountRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileCpuCoreCountRange) isaBareMetalServerProfileCpuCoreCount() bool { return true } // UnmarshalBareMetalServerProfileCpuCoreCountRange unmarshals an instance of BareMetalServerProfileCpuCoreCountRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuCoreCountRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuCoreCountRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuSocketCountDependent : The CPU socket count for a bare metal server with this profile depends on its configuration. // This model "extends" BareMetalServerProfileCpuSocketCount type BareMetalServerProfileCpuSocketCountDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuSocketCountDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuSocketCountDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileCpuSocketCountDependent) isaBareMetalServerProfileCpuSocketCount() bool { return true } // UnmarshalBareMetalServerProfileCpuSocketCountDependent unmarshals an instance of BareMetalServerProfileCpuSocketCountDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuSocketCountDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuSocketCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuSocketCountEnum : The permitted values for CPU sockets for a bare metal server with this profile. // This model "extends" BareMetalServerProfileCpuSocketCount type BareMetalServerProfileCpuSocketCountEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuSocketCountEnum.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuSocketCountEnumTypeEnumConst = "enum" ) func (*BareMetalServerProfileCpuSocketCountEnum) isaBareMetalServerProfileCpuSocketCount() bool { return true } // UnmarshalBareMetalServerProfileCpuSocketCountEnum unmarshals an instance of BareMetalServerProfileCpuSocketCountEnum from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuSocketCountEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuSocketCountEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuSocketCountFixed : The number of CPU sockets for a bare metal server with this profile. // This model "extends" BareMetalServerProfileCpuSocketCount type BareMetalServerProfileCpuSocketCountFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuSocketCountFixed.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuSocketCountFixedTypeFixedConst = "fixed" ) func (*BareMetalServerProfileCpuSocketCountFixed) isaBareMetalServerProfileCpuSocketCount() bool { return true } // UnmarshalBareMetalServerProfileCpuSocketCountFixed unmarshals an instance of BareMetalServerProfileCpuSocketCountFixed from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuSocketCountFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuSocketCountFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileCpuSocketCountRange : The permitted range for the number of CPU sockets for a bare metal server with this profile. // This model "extends" BareMetalServerProfileCpuSocketCount type BareMetalServerProfileCpuSocketCountRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileCpuSocketCountRange.Type property. // The type for this profile field. const ( BareMetalServerProfileCpuSocketCountRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileCpuSocketCountRange) isaBareMetalServerProfileCpuSocketCount() bool { return true } // UnmarshalBareMetalServerProfileCpuSocketCountRange unmarshals an instance of BareMetalServerProfileCpuSocketCountRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileCpuSocketCountRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileCpuSocketCountRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskQuantityDependent : The number of disks of this configuration for a bare metal server with this profile depends on its bare metal server // configuration. // This model "extends" BareMetalServerProfileDiskQuantity type BareMetalServerProfileDiskQuantityDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskQuantityDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskQuantityDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileDiskQuantityDependent) isaBareMetalServerProfileDiskQuantity() bool { return true } // UnmarshalBareMetalServerProfileDiskQuantityDependent unmarshals an instance of BareMetalServerProfileDiskQuantityDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskQuantityDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskQuantityDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskQuantityEnum : The permitted the number of disks of this configuration for a bare metal server with this profile. // This model "extends" BareMetalServerProfileDiskQuantity type BareMetalServerProfileDiskQuantityEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskQuantityEnum.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskQuantityEnumTypeEnumConst = "enum" ) func (*BareMetalServerProfileDiskQuantityEnum) isaBareMetalServerProfileDiskQuantity() bool { return true } // UnmarshalBareMetalServerProfileDiskQuantityEnum unmarshals an instance of BareMetalServerProfileDiskQuantityEnum from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskQuantityEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskQuantityEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskQuantityFixed : The number of disks of this configuration for a bare metal server with this profile. // This model "extends" BareMetalServerProfileDiskQuantity type BareMetalServerProfileDiskQuantityFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskQuantityFixed.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskQuantityFixedTypeFixedConst = "fixed" ) func (*BareMetalServerProfileDiskQuantityFixed) isaBareMetalServerProfileDiskQuantity() bool { return true } // UnmarshalBareMetalServerProfileDiskQuantityFixed unmarshals an instance of BareMetalServerProfileDiskQuantityFixed from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskQuantityFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskQuantityFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskQuantityRange : The permitted range for the number of disks of this configuration for a bare metal server with this profile. // This model "extends" BareMetalServerProfileDiskQuantity type BareMetalServerProfileDiskQuantityRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskQuantityRange.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskQuantityRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileDiskQuantityRange) isaBareMetalServerProfileDiskQuantity() bool { return true } // UnmarshalBareMetalServerProfileDiskQuantityRange unmarshals an instance of BareMetalServerProfileDiskQuantityRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskQuantityRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskQuantityRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskSizeDependent : The disk size in GB (gigabytes) of this configuration for a bare metal server with this profile depends on its bare // metal server configuration. // This model "extends" BareMetalServerProfileDiskSize type BareMetalServerProfileDiskSizeDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskSizeDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskSizeDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileDiskSizeDependent) isaBareMetalServerProfileDiskSize() bool { return true } // UnmarshalBareMetalServerProfileDiskSizeDependent unmarshals an instance of BareMetalServerProfileDiskSizeDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskSizeDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskSizeDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskSizeEnum : The permitted disk size in GB (gigabytes) of this configuration for a bare metal server with this profile. // This model "extends" BareMetalServerProfileDiskSize type BareMetalServerProfileDiskSizeEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskSizeEnum.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskSizeEnumTypeEnumConst = "enum" ) func (*BareMetalServerProfileDiskSizeEnum) isaBareMetalServerProfileDiskSize() bool { return true } // UnmarshalBareMetalServerProfileDiskSizeEnum unmarshals an instance of BareMetalServerProfileDiskSizeEnum from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskSizeEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskSizeEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskSizeFixed : The size of the disk in GB (gigabytes). // This model "extends" BareMetalServerProfileDiskSize type BareMetalServerProfileDiskSizeFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskSizeFixed.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskSizeFixedTypeFixedConst = "fixed" ) func (*BareMetalServerProfileDiskSizeFixed) isaBareMetalServerProfileDiskSize() bool { return true } // UnmarshalBareMetalServerProfileDiskSizeFixed unmarshals an instance of BareMetalServerProfileDiskSizeFixed from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskSizeFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskSizeFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileDiskSizeRange : The permitted range for the disk size of this configuration in GB (gigabytes) for a bare metal server with this // profile. // This model "extends" BareMetalServerProfileDiskSize type BareMetalServerProfileDiskSizeRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileDiskSizeRange.Type property. // The type for this profile field. const ( BareMetalServerProfileDiskSizeRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileDiskSizeRange) isaBareMetalServerProfileDiskSize() bool { return true } // UnmarshalBareMetalServerProfileDiskSizeRange unmarshals an instance of BareMetalServerProfileDiskSizeRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileDiskSizeRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileDiskSizeRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileIdentityByHref : BareMetalServerProfileIdentityByHref struct // This model "extends" BareMetalServerProfileIdentity type BareMetalServerProfileIdentityByHref struct { // The URL for this bare metal server profile. Href *string `json:"href" validate:"required"` } // NewBareMetalServerProfileIdentityByHref : Instantiate BareMetalServerProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerProfileIdentityByHref(href string) (_model *BareMetalServerProfileIdentityByHref, err error) { _model = &BareMetalServerProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerProfileIdentityByHref) isaBareMetalServerProfileIdentity() bool { return true } // UnmarshalBareMetalServerProfileIdentityByHref unmarshals an instance of BareMetalServerProfileIdentityByHref from the specified map of raw messages. func UnmarshalBareMetalServerProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileIdentityByName : BareMetalServerProfileIdentityByName struct // This model "extends" BareMetalServerProfileIdentity type BareMetalServerProfileIdentityByName struct { // The name for this bare metal server profile. Name *string `json:"name" validate:"required"` } // NewBareMetalServerProfileIdentityByName : Instantiate BareMetalServerProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerProfileIdentityByName(name string) (_model *BareMetalServerProfileIdentityByName, err error) { _model = &BareMetalServerProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerProfileIdentityByName) isaBareMetalServerProfileIdentity() bool { return true } // UnmarshalBareMetalServerProfileIdentityByName unmarshals an instance of BareMetalServerProfileIdentityByName from the specified map of raw messages. func UnmarshalBareMetalServerProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileMemoryDependent : The memory value for a bare metal server with this profile depends on its configuration. // This model "extends" BareMetalServerProfileMemory type BareMetalServerProfileMemoryDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileMemoryDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileMemoryDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileMemoryDependent) isaBareMetalServerProfileMemory() bool { return true } // UnmarshalBareMetalServerProfileMemoryDependent unmarshals an instance of BareMetalServerProfileMemoryDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileMemoryEnum : The permitted memory values (in gibibytes) for a bare metal server with this profile. // This model "extends" BareMetalServerProfileMemory type BareMetalServerProfileMemoryEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the BareMetalServerProfileMemoryEnum.Type property. // The type for this profile field. const ( BareMetalServerProfileMemoryEnumTypeEnumConst = "enum" ) func (*BareMetalServerProfileMemoryEnum) isaBareMetalServerProfileMemory() bool { return true } // UnmarshalBareMetalServerProfileMemoryEnum unmarshals an instance of BareMetalServerProfileMemoryEnum from the specified map of raw messages. func UnmarshalBareMetalServerProfileMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileMemoryFixed : The memory (in gibibytes) for a bare metal server with this profile. // This model "extends" BareMetalServerProfileMemory type BareMetalServerProfileMemoryFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the BareMetalServerProfileMemoryFixed.Type property. // The type for this profile field. const ( BareMetalServerProfileMemoryFixedTypeFixedConst = "fixed" ) func (*BareMetalServerProfileMemoryFixed) isaBareMetalServerProfileMemory() bool { return true } // UnmarshalBareMetalServerProfileMemoryFixed unmarshals an instance of BareMetalServerProfileMemoryFixed from the specified map of raw messages. func UnmarshalBareMetalServerProfileMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileMemoryRange : The permitted memory range (in gibibytes) for a bare metal server with this profile. // This model "extends" BareMetalServerProfileMemory type BareMetalServerProfileMemoryRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileMemoryRange.Type property. // The type for this profile field. const ( BareMetalServerProfileMemoryRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileMemoryRange) isaBareMetalServerProfileMemory() bool { return true } // UnmarshalBareMetalServerProfileMemoryRange unmarshals an instance of BareMetalServerProfileMemoryRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileNetworkInterfaceCountDependent : The number of bare metal server network interfaces supported on a bare metal server with this profile is dependent on // its configuration. // This model "extends" BareMetalServerProfileNetworkInterfaceCount type BareMetalServerProfileNetworkInterfaceCountDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileNetworkInterfaceCountDependent.Type property. // The type for this profile field. const ( BareMetalServerProfileNetworkInterfaceCountDependentTypeDependentConst = "dependent" ) func (*BareMetalServerProfileNetworkInterfaceCountDependent) isaBareMetalServerProfileNetworkInterfaceCount() bool { return true } // UnmarshalBareMetalServerProfileNetworkInterfaceCountDependent unmarshals an instance of BareMetalServerProfileNetworkInterfaceCountDependent from the specified map of raw messages. func UnmarshalBareMetalServerProfileNetworkInterfaceCountDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileNetworkInterfaceCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerProfileNetworkInterfaceCountRange : The number of bare metal server network interfaces supported on a bare metal server with this profile. // This model "extends" BareMetalServerProfileNetworkInterfaceCount type BareMetalServerProfileNetworkInterfaceCountRange struct { // The maximum value for this profile field. Max *int64 `json:"max,omitempty"` // The minimum value for this profile field. Min *int64 `json:"min,omitempty"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the BareMetalServerProfileNetworkInterfaceCountRange.Type property. // The type for this profile field. const ( BareMetalServerProfileNetworkInterfaceCountRangeTypeRangeConst = "range" ) func (*BareMetalServerProfileNetworkInterfaceCountRange) isaBareMetalServerProfileNetworkInterfaceCount() bool { return true } // UnmarshalBareMetalServerProfileNetworkInterfaceCountRange unmarshals an instance of BareMetalServerProfileNetworkInterfaceCountRange from the specified map of raw messages. func UnmarshalBareMetalServerProfileNetworkInterfaceCountRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerProfileNetworkInterfaceCountRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerPrototypeVPCVPCIdentityByCRN : BareMetalServerPrototypeVPCVPCIdentityByCRN struct // This model "extends" BareMetalServerPrototypeVPC type BareMetalServerPrototypeVPCVPCIdentityByCRN struct { // The CRN for this VPC. CRN *string `json:"crn" validate:"required"` } // NewBareMetalServerPrototypeVPCVPCIdentityByCRN : Instantiate BareMetalServerPrototypeVPCVPCIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerPrototypeVPCVPCIdentityByCRN(crn string) (_model *BareMetalServerPrototypeVPCVPCIdentityByCRN, err error) { _model = &BareMetalServerPrototypeVPCVPCIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerPrototypeVPCVPCIdentityByCRN) isaBareMetalServerPrototypeVPC() bool { return true } // UnmarshalBareMetalServerPrototypeVPCVPCIdentityByCRN unmarshals an instance of BareMetalServerPrototypeVPCVPCIdentityByCRN from the specified map of raw messages. func UnmarshalBareMetalServerPrototypeVPCVPCIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerPrototypeVPCVPCIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerPrototypeVPCVPCIdentityByHref : BareMetalServerPrototypeVPCVPCIdentityByHref struct // This model "extends" BareMetalServerPrototypeVPC type BareMetalServerPrototypeVPCVPCIdentityByHref struct { // The URL for this VPC. Href *string `json:"href" validate:"required"` } // NewBareMetalServerPrototypeVPCVPCIdentityByHref : Instantiate BareMetalServerPrototypeVPCVPCIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerPrototypeVPCVPCIdentityByHref(href string) (_model *BareMetalServerPrototypeVPCVPCIdentityByHref, err error) { _model = &BareMetalServerPrototypeVPCVPCIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerPrototypeVPCVPCIdentityByHref) isaBareMetalServerPrototypeVPC() bool { return true } // UnmarshalBareMetalServerPrototypeVPCVPCIdentityByHref unmarshals an instance of BareMetalServerPrototypeVPCVPCIdentityByHref from the specified map of raw messages. func UnmarshalBareMetalServerPrototypeVPCVPCIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerPrototypeVPCVPCIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // BareMetalServerPrototypeVPCVPCIdentityByID : BareMetalServerPrototypeVPCVPCIdentityByID struct // This model "extends" BareMetalServerPrototypeVPC type BareMetalServerPrototypeVPCVPCIdentityByID struct { // The unique identifier for this VPC. ID *string `json:"id" validate:"required"` } // NewBareMetalServerPrototypeVPCVPCIdentityByID : Instantiate BareMetalServerPrototypeVPCVPCIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewBareMetalServerPrototypeVPCVPCIdentityByID(id string) (_model *BareMetalServerPrototypeVPCVPCIdentityByID, err error) { _model = &BareMetalServerPrototypeVPCVPCIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*BareMetalServerPrototypeVPCVPCIdentityByID) isaBareMetalServerPrototypeVPC() bool { return true } // UnmarshalBareMetalServerPrototypeVPCVPCIdentityByID unmarshals an instance of BareMetalServerPrototypeVPCVPCIdentityByID from the specified map of raw messages. func UnmarshalBareMetalServerPrototypeVPCVPCIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(BareMetalServerPrototypeVPCVPCIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // CatalogOfferingIdentityCatalogOfferingByCRN : CatalogOfferingIdentityCatalogOfferingByCRN struct // This model "extends" CatalogOfferingIdentity type CatalogOfferingIdentityCatalogOfferingByCRN struct { // The CRN for this // [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering. CRN *string `json:"crn" validate:"required"` } // NewCatalogOfferingIdentityCatalogOfferingByCRN : Instantiate CatalogOfferingIdentityCatalogOfferingByCRN (Generic Model Constructor) func (*VpcbetaV1) NewCatalogOfferingIdentityCatalogOfferingByCRN(crn string) (_model *CatalogOfferingIdentityCatalogOfferingByCRN, err error) { _model = &CatalogOfferingIdentityCatalogOfferingByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*CatalogOfferingIdentityCatalogOfferingByCRN) isaCatalogOfferingIdentity() bool { return true } // UnmarshalCatalogOfferingIdentityCatalogOfferingByCRN unmarshals an instance of CatalogOfferingIdentityCatalogOfferingByCRN from the specified map of raw messages. func UnmarshalCatalogOfferingIdentityCatalogOfferingByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(CatalogOfferingIdentityCatalogOfferingByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN : CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN struct // This model "extends" CatalogOfferingVersionIdentity type CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN struct { // The CRN for this version of a // [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering. CRN *string `json:"crn" validate:"required"` } // NewCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN : Instantiate CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN (Generic Model Constructor) func (*VpcbetaV1) NewCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(crn string) (_model *CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN, err error) { _model = &CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN) isaCatalogOfferingVersionIdentity() bool { return true } // UnmarshalCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN unmarshals an instance of CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN from the specified map of raw messages. func UnmarshalCatalogOfferingVersionIdentityCatalogOfferingVersionByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(CatalogOfferingVersionIdentityCatalogOfferingVersionByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // CertificateInstanceIdentityByCRN : CertificateInstanceIdentityByCRN struct // This model "extends" CertificateInstanceIdentity type CertificateInstanceIdentityByCRN struct { // The CRN for this certificate instance. CRN *string `json:"crn" validate:"required"` } // NewCertificateInstanceIdentityByCRN : Instantiate CertificateInstanceIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewCertificateInstanceIdentityByCRN(crn string) (_model *CertificateInstanceIdentityByCRN, err error) { _model = &CertificateInstanceIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*CertificateInstanceIdentityByCRN) isaCertificateInstanceIdentity() bool { return true } // UnmarshalCertificateInstanceIdentityByCRN unmarshals an instance of CertificateInstanceIdentityByCRN from the specified map of raw messages. func UnmarshalCertificateInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(CertificateInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // CloudObjectStorageBucketIdentityByCRN : CloudObjectStorageBucketIdentityByCRN struct // This model "extends" CloudObjectStorageBucketIdentity type CloudObjectStorageBucketIdentityByCRN struct { // The CRN of this Cloud Object Storage bucket. CRN *string `json:"crn" validate:"required"` } // NewCloudObjectStorageBucketIdentityByCRN : Instantiate CloudObjectStorageBucketIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewCloudObjectStorageBucketIdentityByCRN(crn string) (_model *CloudObjectStorageBucketIdentityByCRN, err error) { _model = &CloudObjectStorageBucketIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*CloudObjectStorageBucketIdentityByCRN) isaCloudObjectStorageBucketIdentity() bool { return true } // UnmarshalCloudObjectStorageBucketIdentityByCRN unmarshals an instance of CloudObjectStorageBucketIdentityByCRN from the specified map of raw messages. func UnmarshalCloudObjectStorageBucketIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(CloudObjectStorageBucketIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName : CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName struct // This model "extends" CloudObjectStorageBucketIdentity type CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName struct { // The globally unique name of this Cloud Object Storage bucket. Name *string `json:"name" validate:"required"` } // NewCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName : Instantiate CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(name string) (_model *CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName, err error) { _model = &CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) isaCloudObjectStorageBucketIdentity() bool { return true } // UnmarshalCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName unmarshals an instance of CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName from the specified map of raw messages. func UnmarshalCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(CloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DnsInstanceIdentityByCRN : DnsInstanceIdentityByCRN struct // This model "extends" DnsInstanceIdentity type DnsInstanceIdentityByCRN struct { // The CRN for this DNS instance. CRN *string `json:"crn" validate:"required"` } // NewDnsInstanceIdentityByCRN : Instantiate DnsInstanceIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewDnsInstanceIdentityByCRN(crn string) (_model *DnsInstanceIdentityByCRN, err error) { _model = &DnsInstanceIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*DnsInstanceIdentityByCRN) isaDnsInstanceIdentity() bool { return true } // UnmarshalDnsInstanceIdentityByCRN unmarshals an instance of DnsInstanceIdentityByCRN from the specified map of raw messages. func UnmarshalDnsInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DnsInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DnsZoneIdentityByID : DnsZoneIdentityByID struct // This model "extends" DnsZoneIdentity type DnsZoneIdentityByID struct { ID *string `json:"id" validate:"required"` } // NewDnsZoneIdentityByID : Instantiate DnsZoneIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewDnsZoneIdentityByID(id string) (_model *DnsZoneIdentityByID, err error) { _model = &DnsZoneIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*DnsZoneIdentityByID) isaDnsZoneIdentity() bool { return true } // UnmarshalDnsZoneIdentityByID unmarshals an instance of DnsZoneIdentityByID from the specified map of raw messages. func UnmarshalDnsZoneIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DnsZoneIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostGroupIdentityByCRN : DedicatedHostGroupIdentityByCRN struct // This model "extends" DedicatedHostGroupIdentity type DedicatedHostGroupIdentityByCRN struct { // The CRN for this dedicated host group. CRN *string `json:"crn" validate:"required"` } // NewDedicatedHostGroupIdentityByCRN : Instantiate DedicatedHostGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostGroupIdentityByCRN(crn string) (_model *DedicatedHostGroupIdentityByCRN, err error) { _model = &DedicatedHostGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostGroupIdentityByCRN) isaDedicatedHostGroupIdentity() bool { return true } // UnmarshalDedicatedHostGroupIdentityByCRN unmarshals an instance of DedicatedHostGroupIdentityByCRN from the specified map of raw messages. func UnmarshalDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostGroupIdentityByHref : DedicatedHostGroupIdentityByHref struct // This model "extends" DedicatedHostGroupIdentity type DedicatedHostGroupIdentityByHref struct { // The URL for this dedicated host group. Href *string `json:"href" validate:"required"` } // NewDedicatedHostGroupIdentityByHref : Instantiate DedicatedHostGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostGroupIdentityByHref(href string) (_model *DedicatedHostGroupIdentityByHref, err error) { _model = &DedicatedHostGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostGroupIdentityByHref) isaDedicatedHostGroupIdentity() bool { return true } // UnmarshalDedicatedHostGroupIdentityByHref unmarshals an instance of DedicatedHostGroupIdentityByHref from the specified map of raw messages. func UnmarshalDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostGroupIdentityByID : DedicatedHostGroupIdentityByID struct // This model "extends" DedicatedHostGroupIdentity type DedicatedHostGroupIdentityByID struct { // The unique identifier for this dedicated host group. ID *string `json:"id" validate:"required"` } // NewDedicatedHostGroupIdentityByID : Instantiate DedicatedHostGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostGroupIdentityByID(id string) (_model *DedicatedHostGroupIdentityByID, err error) { _model = &DedicatedHostGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostGroupIdentityByID) isaDedicatedHostGroupIdentity() bool { return true } // UnmarshalDedicatedHostGroupIdentityByID unmarshals an instance of DedicatedHostGroupIdentityByID from the specified map of raw messages. func UnmarshalDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileIdentityByHref : DedicatedHostProfileIdentityByHref struct // This model "extends" DedicatedHostProfileIdentity type DedicatedHostProfileIdentityByHref struct { // The URL for this dedicated host profile. Href *string `json:"href" validate:"required"` } // NewDedicatedHostProfileIdentityByHref : Instantiate DedicatedHostProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostProfileIdentityByHref(href string) (_model *DedicatedHostProfileIdentityByHref, err error) { _model = &DedicatedHostProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostProfileIdentityByHref) isaDedicatedHostProfileIdentity() bool { return true } // UnmarshalDedicatedHostProfileIdentityByHref unmarshals an instance of DedicatedHostProfileIdentityByHref from the specified map of raw messages. func UnmarshalDedicatedHostProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileIdentityByName : DedicatedHostProfileIdentityByName struct // This model "extends" DedicatedHostProfileIdentity type DedicatedHostProfileIdentityByName struct { // The globally unique name for this dedicated host profile. Name *string `json:"name" validate:"required"` } // NewDedicatedHostProfileIdentityByName : Instantiate DedicatedHostProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostProfileIdentityByName(name string) (_model *DedicatedHostProfileIdentityByName, err error) { _model = &DedicatedHostProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostProfileIdentityByName) isaDedicatedHostProfileIdentity() bool { return true } // UnmarshalDedicatedHostProfileIdentityByName unmarshals an instance of DedicatedHostProfileIdentityByName from the specified map of raw messages. func UnmarshalDedicatedHostProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileMemoryDependent : The memory value for a dedicated host with this profile depends on its configuration. // This model "extends" DedicatedHostProfileMemory type DedicatedHostProfileMemoryDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the DedicatedHostProfileMemoryDependent.Type property. // The type for this profile field. const ( DedicatedHostProfileMemoryDependentTypeDependentConst = "dependent" ) func (*DedicatedHostProfileMemoryDependent) isaDedicatedHostProfileMemory() bool { return true } // UnmarshalDedicatedHostProfileMemoryDependent unmarshals an instance of DedicatedHostProfileMemoryDependent from the specified map of raw messages. func UnmarshalDedicatedHostProfileMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileMemoryEnum : The permitted memory values (in gibibytes) for a dedicated host with this profile. // This model "extends" DedicatedHostProfileMemory type DedicatedHostProfileMemoryEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the DedicatedHostProfileMemoryEnum.Type property. // The type for this profile field. const ( DedicatedHostProfileMemoryEnumTypeEnumConst = "enum" ) func (*DedicatedHostProfileMemoryEnum) isaDedicatedHostProfileMemory() bool { return true } // UnmarshalDedicatedHostProfileMemoryEnum unmarshals an instance of DedicatedHostProfileMemoryEnum from the specified map of raw messages. func UnmarshalDedicatedHostProfileMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileMemoryFixed : The memory (in gibibytes) for a dedicated host with this profile. // This model "extends" DedicatedHostProfileMemory type DedicatedHostProfileMemoryFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the DedicatedHostProfileMemoryFixed.Type property. // The type for this profile field. const ( DedicatedHostProfileMemoryFixedTypeFixedConst = "fixed" ) func (*DedicatedHostProfileMemoryFixed) isaDedicatedHostProfileMemory() bool { return true } // UnmarshalDedicatedHostProfileMemoryFixed unmarshals an instance of DedicatedHostProfileMemoryFixed from the specified map of raw messages. func UnmarshalDedicatedHostProfileMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileMemoryRange : The permitted memory range (in gibibytes) for a dedicated host with this profile. // This model "extends" DedicatedHostProfileMemory type DedicatedHostProfileMemoryRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the DedicatedHostProfileMemoryRange.Type property. // The type for this profile field. const ( DedicatedHostProfileMemoryRangeTypeRangeConst = "range" ) func (*DedicatedHostProfileMemoryRange) isaDedicatedHostProfileMemory() bool { return true } // UnmarshalDedicatedHostProfileMemoryRange unmarshals an instance of DedicatedHostProfileMemoryRange from the specified map of raw messages. func UnmarshalDedicatedHostProfileMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileSocketDependent : The CPU socket count for a dedicated host with this profile depends on its configuration. // This model "extends" DedicatedHostProfileSocket type DedicatedHostProfileSocketDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the DedicatedHostProfileSocketDependent.Type property. // The type for this profile field. const ( DedicatedHostProfileSocketDependentTypeDependentConst = "dependent" ) func (*DedicatedHostProfileSocketDependent) isaDedicatedHostProfileSocket() bool { return true } // UnmarshalDedicatedHostProfileSocketDependent unmarshals an instance of DedicatedHostProfileSocketDependent from the specified map of raw messages. func UnmarshalDedicatedHostProfileSocketDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileSocketDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileSocketEnum : The permitted values for CPU socket count for a dedicated host with this profile. // This model "extends" DedicatedHostProfileSocket type DedicatedHostProfileSocketEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the DedicatedHostProfileSocketEnum.Type property. // The type for this profile field. const ( DedicatedHostProfileSocketEnumTypeEnumConst = "enum" ) func (*DedicatedHostProfileSocketEnum) isaDedicatedHostProfileSocket() bool { return true } // UnmarshalDedicatedHostProfileSocketEnum unmarshals an instance of DedicatedHostProfileSocketEnum from the specified map of raw messages. func UnmarshalDedicatedHostProfileSocketEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileSocketEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileSocketFixed : The CPU socket count for a dedicated host with this profile. // This model "extends" DedicatedHostProfileSocket type DedicatedHostProfileSocketFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the DedicatedHostProfileSocketFixed.Type property. // The type for this profile field. const ( DedicatedHostProfileSocketFixedTypeFixedConst = "fixed" ) func (*DedicatedHostProfileSocketFixed) isaDedicatedHostProfileSocket() bool { return true } // UnmarshalDedicatedHostProfileSocketFixed unmarshals an instance of DedicatedHostProfileSocketFixed from the specified map of raw messages. func UnmarshalDedicatedHostProfileSocketFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileSocketFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileSocketRange : The permitted range for CPU socket count for a dedicated host with this profile. // This model "extends" DedicatedHostProfileSocket type DedicatedHostProfileSocketRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the DedicatedHostProfileSocketRange.Type property. // The type for this profile field. const ( DedicatedHostProfileSocketRangeTypeRangeConst = "range" ) func (*DedicatedHostProfileSocketRange) isaDedicatedHostProfileSocket() bool { return true } // UnmarshalDedicatedHostProfileSocketRange unmarshals an instance of DedicatedHostProfileSocketRange from the specified map of raw messages. func UnmarshalDedicatedHostProfileSocketRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileSocketRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileVcpuDependent : The VCPU count for a dedicated host with this profile depends on its configuration. // This model "extends" DedicatedHostProfileVcpu type DedicatedHostProfileVcpuDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the DedicatedHostProfileVcpuDependent.Type property. // The type for this profile field. const ( DedicatedHostProfileVcpuDependentTypeDependentConst = "dependent" ) func (*DedicatedHostProfileVcpuDependent) isaDedicatedHostProfileVcpu() bool { return true } // UnmarshalDedicatedHostProfileVcpuDependent unmarshals an instance of DedicatedHostProfileVcpuDependent from the specified map of raw messages. func UnmarshalDedicatedHostProfileVcpuDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileVcpuDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileVcpuEnum : The permitted values for VCPU count for a dedicated host with this profile. // This model "extends" DedicatedHostProfileVcpu type DedicatedHostProfileVcpuEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the DedicatedHostProfileVcpuEnum.Type property. // The type for this profile field. const ( DedicatedHostProfileVcpuEnumTypeEnumConst = "enum" ) func (*DedicatedHostProfileVcpuEnum) isaDedicatedHostProfileVcpu() bool { return true } // UnmarshalDedicatedHostProfileVcpuEnum unmarshals an instance of DedicatedHostProfileVcpuEnum from the specified map of raw messages. func UnmarshalDedicatedHostProfileVcpuEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileVcpuEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileVcpuFixed : The VCPU count for a dedicated host with this profile. // This model "extends" DedicatedHostProfileVcpu type DedicatedHostProfileVcpuFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the DedicatedHostProfileVcpuFixed.Type property. // The type for this profile field. const ( DedicatedHostProfileVcpuFixedTypeFixedConst = "fixed" ) func (*DedicatedHostProfileVcpuFixed) isaDedicatedHostProfileVcpu() bool { return true } // UnmarshalDedicatedHostProfileVcpuFixed unmarshals an instance of DedicatedHostProfileVcpuFixed from the specified map of raw messages. func UnmarshalDedicatedHostProfileVcpuFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileVcpuFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostProfileVcpuRange : The permitted range for VCPU count for a dedicated host with this profile. // This model "extends" DedicatedHostProfileVcpu type DedicatedHostProfileVcpuRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the DedicatedHostProfileVcpuRange.Type property. // The type for this profile field. const ( DedicatedHostProfileVcpuRangeTypeRangeConst = "range" ) func (*DedicatedHostProfileVcpuRange) isaDedicatedHostProfileVcpu() bool { return true } // UnmarshalDedicatedHostProfileVcpuRange unmarshals an instance of DedicatedHostProfileVcpuRange from the specified map of raw messages. func UnmarshalDedicatedHostProfileVcpuRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostProfileVcpuRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostPrototypeDedicatedHostByGroup : DedicatedHostPrototypeDedicatedHostByGroup struct // This model "extends" DedicatedHostPrototype type DedicatedHostPrototypeDedicatedHostByGroup struct { // If set to true, instances can be placed on this dedicated host. InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"` // The name for this dedicated host. The name must not be used by another dedicated host in the region. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) to use for this dedicated host. Profile DedicatedHostProfileIdentityIntf `json:"profile" validate:"required"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The dedicated host group for this dedicated host. Group DedicatedHostGroupIdentityIntf `json:"group" validate:"required"` } // NewDedicatedHostPrototypeDedicatedHostByGroup : Instantiate DedicatedHostPrototypeDedicatedHostByGroup (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostPrototypeDedicatedHostByGroup(profile DedicatedHostProfileIdentityIntf, group DedicatedHostGroupIdentityIntf) (_model *DedicatedHostPrototypeDedicatedHostByGroup, err error) { _model = &DedicatedHostPrototypeDedicatedHostByGroup{ Profile: profile, Group: group, } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostPrototypeDedicatedHostByGroup) isaDedicatedHostPrototype() bool { return true } // UnmarshalDedicatedHostPrototypeDedicatedHostByGroup unmarshals an instance of DedicatedHostPrototypeDedicatedHostByGroup from the specified map of raw messages. func UnmarshalDedicatedHostPrototypeDedicatedHostByGroup(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostPrototypeDedicatedHostByGroup) err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // DedicatedHostPrototypeDedicatedHostByZone : DedicatedHostPrototypeDedicatedHostByZone struct // This model "extends" DedicatedHostPrototype type DedicatedHostPrototypeDedicatedHostByZone struct { // If set to true, instances can be placed on this dedicated host. InstancePlacementEnabled *bool `json:"instance_placement_enabled,omitempty"` // The name for this dedicated host. The name must not be used by another dedicated host in the region. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-dh-profiles) to use for this dedicated host. Profile DedicatedHostProfileIdentityIntf `json:"profile" validate:"required"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` Group *DedicatedHostGroupPrototypeDedicatedHostByZoneContext `json:"group,omitempty"` // The zone this dedicated host will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewDedicatedHostPrototypeDedicatedHostByZone : Instantiate DedicatedHostPrototypeDedicatedHostByZone (Generic Model Constructor) func (*VpcbetaV1) NewDedicatedHostPrototypeDedicatedHostByZone(profile DedicatedHostProfileIdentityIntf, zone ZoneIdentityIntf) (_model *DedicatedHostPrototypeDedicatedHostByZone, err error) { _model = &DedicatedHostPrototypeDedicatedHostByZone{ Profile: profile, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*DedicatedHostPrototypeDedicatedHostByZone) isaDedicatedHostPrototype() bool { return true } // UnmarshalDedicatedHostPrototypeDedicatedHostByZone unmarshals an instance of DedicatedHostPrototypeDedicatedHostByZone from the specified map of raw messages. func UnmarshalDedicatedHostPrototypeDedicatedHostByZone(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(DedicatedHostPrototypeDedicatedHostByZone) err = core.UnmarshalPrimitive(m, "instance_placement_enabled", &obj.InstancePlacementEnabled) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalDedicatedHostProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalDedicatedHostGroupPrototypeDedicatedHostByZoneContext) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EncryptionKeyIdentityByCRN : EncryptionKeyIdentityByCRN struct // This model "extends" EncryptionKeyIdentity type EncryptionKeyIdentityByCRN struct { // The CRN of the [Key Protect Root // Key](https://cloud.ibm.com/docs/key-protect?topic=key-protect-getting-started-tutorial) or [Hyper Protect Crypto // Services Root Key](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started) for this resource. CRN *string `json:"crn" validate:"required"` } // NewEncryptionKeyIdentityByCRN : Instantiate EncryptionKeyIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewEncryptionKeyIdentityByCRN(crn string) (_model *EncryptionKeyIdentityByCRN, err error) { _model = &EncryptionKeyIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*EncryptionKeyIdentityByCRN) isaEncryptionKeyIdentity() bool { return true } // UnmarshalEncryptionKeyIdentityByCRN unmarshals an instance of EncryptionKeyIdentityByCRN from the specified map of raw messages. func UnmarshalEncryptionKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EncryptionKeyIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayReservedIPReservedIPIdentity : Identifies a reserved IP by a unique property. // Models which "extend" this model: // - EndpointGatewayReservedIPReservedIPIdentityByID // - EndpointGatewayReservedIPReservedIPIdentityByHref // This model "extends" EndpointGatewayReservedIP type EndpointGatewayReservedIPReservedIPIdentity struct { // The unique identifier for this reserved IP. ID *string `json:"id,omitempty"` // The URL for this reserved IP. Href *string `json:"href,omitempty"` } func (*EndpointGatewayReservedIPReservedIPIdentity) isaEndpointGatewayReservedIPReservedIPIdentity() bool { return true } type EndpointGatewayReservedIPReservedIPIdentityIntf interface { EndpointGatewayReservedIPIntf isaEndpointGatewayReservedIPReservedIPIdentity() bool } func (*EndpointGatewayReservedIPReservedIPIdentity) isaEndpointGatewayReservedIP() bool { return true } // UnmarshalEndpointGatewayReservedIPReservedIPIdentity unmarshals an instance of EndpointGatewayReservedIPReservedIPIdentity from the specified map of raw messages. func UnmarshalEndpointGatewayReservedIPReservedIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayReservedIPReservedIPIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayReservedIPReservedIPPrototypeTargetContext : EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct // This model "extends" EndpointGatewayReservedIP type EndpointGatewayReservedIPReservedIPPrototypeTargetContext struct { // The IP address to reserve, which must not already be reserved on the subnet. // // If unspecified, an available address on the subnet will automatically be selected. Address *string `json:"address,omitempty"` // Indicates whether this reserved IP member will be automatically deleted when either // `target` is deleted, or the reserved IP is unbound. AutoDelete *bool `json:"auto_delete,omitempty"` // The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with // `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated // list of randomly-selected words. Name *string `json:"name,omitempty"` // The subnet in which to create this reserved IP. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` } // NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext : Instantiate EndpointGatewayReservedIPReservedIPPrototypeTargetContext (Generic Model Constructor) func (*VpcbetaV1) NewEndpointGatewayReservedIPReservedIPPrototypeTargetContext(subnet SubnetIdentityIntf) (_model *EndpointGatewayReservedIPReservedIPPrototypeTargetContext, err error) { _model = &EndpointGatewayReservedIPReservedIPPrototypeTargetContext{ Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") return } func (*EndpointGatewayReservedIPReservedIPPrototypeTargetContext) isaEndpointGatewayReservedIP() bool { return true } // UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext unmarshals an instance of EndpointGatewayReservedIPReservedIPPrototypeTargetContext from the specified map of raw messages. func UnmarshalEndpointGatewayReservedIPReservedIPPrototypeTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayReservedIPReservedIPPrototypeTargetContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayTargetPrototypeProviderCloudServiceIdentity : EndpointGatewayTargetPrototypeProviderCloudServiceIdentity struct // Models which "extend" this model: // - EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN // This model "extends" EndpointGatewayTargetPrototype type EndpointGatewayTargetPrototypeProviderCloudServiceIdentity struct { // The type of target for this endpoint gateway. ResourceType *string `json:"resource_type" validate:"required"` // The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service. CRN *string `json:"crn,omitempty"` } // Constants associated with the EndpointGatewayTargetPrototypeProviderCloudServiceIdentity.ResourceType property. // The type of target for this endpoint gateway. const ( EndpointGatewayTargetPrototypeProviderCloudServiceIdentityResourceTypeProviderCloudServiceConst = "provider_cloud_service" EndpointGatewayTargetPrototypeProviderCloudServiceIdentityResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service" ) func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) isaEndpointGatewayTargetPrototypeProviderCloudServiceIdentity() bool { return true } type EndpointGatewayTargetPrototypeProviderCloudServiceIdentityIntf interface { EndpointGatewayTargetPrototypeIntf isaEndpointGatewayTargetPrototypeProviderCloudServiceIdentity() bool } func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) isaEndpointGatewayTargetPrototype() bool { return true } // UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity unmarshals an instance of EndpointGatewayTargetPrototypeProviderCloudServiceIdentity from the specified map of raw messages. func UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayTargetPrototypeProviderCloudServiceIdentity) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity : EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity struct // Models which "extend" this model: // - EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName // This model "extends" EndpointGatewayTargetPrototype type EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity struct { // The type of target for this endpoint gateway. ResourceType *string `json:"resource_type" validate:"required"` // The name of a provider infrastructure service. Must be: // - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM. Name *string `json:"name,omitempty"` } // Constants associated with the EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity.ResourceType property. // The type of target for this endpoint gateway. const ( EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityResourceTypeProviderCloudServiceConst = "provider_cloud_service" EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service" ) func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) isaEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity() bool { return true } type EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityIntf interface { EndpointGatewayTargetPrototypeIntf isaEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity() bool } func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) isaEndpointGatewayTargetPrototype() bool { return true } // UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity unmarshals an instance of EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity from the specified map of raw messages. func UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayTargetProviderCloudServiceReference : EndpointGatewayTargetProviderCloudServiceReference struct // This model "extends" EndpointGatewayTarget type EndpointGatewayTargetProviderCloudServiceReference struct { // The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service. CRN *string `json:"crn" validate:"required"` // The type of target. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the EndpointGatewayTargetProviderCloudServiceReference.ResourceType property. // The type of target. const ( EndpointGatewayTargetProviderCloudServiceReferenceResourceTypeProviderCloudServiceConst = "provider_cloud_service" ) func (*EndpointGatewayTargetProviderCloudServiceReference) isaEndpointGatewayTarget() bool { return true } // UnmarshalEndpointGatewayTargetProviderCloudServiceReference unmarshals an instance of EndpointGatewayTargetProviderCloudServiceReference from the specified map of raw messages. func UnmarshalEndpointGatewayTargetProviderCloudServiceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayTargetProviderCloudServiceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayTargetProviderInfrastructureServiceReference : The name of this provider infrastructure service. // This model "extends" EndpointGatewayTarget type EndpointGatewayTargetProviderInfrastructureServiceReference struct { // The name of a provider infrastructure service. Must be: // - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM. Name *string `json:"name" validate:"required"` // The type of target. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the EndpointGatewayTargetProviderInfrastructureServiceReference.ResourceType property. // The type of target. const ( EndpointGatewayTargetProviderInfrastructureServiceReferenceResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service" ) func (*EndpointGatewayTargetProviderInfrastructureServiceReference) isaEndpointGatewayTarget() bool { return true } // UnmarshalEndpointGatewayTargetProviderInfrastructureServiceReference unmarshals an instance of EndpointGatewayTargetProviderInfrastructureServiceReference from the specified map of raw messages. func UnmarshalEndpointGatewayTargetProviderInfrastructureServiceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayTargetProviderInfrastructureServiceReference) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPPrototypeFloatingIPByTarget : FloatingIPPrototypeFloatingIPByTarget struct // This model "extends" FloatingIPPrototype type FloatingIPPrototypeFloatingIPByTarget struct { // The name for this floating IP. The name must not be used by another floating IP in the region. If unspecified, the // name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The target resource to bind this floating IP to. // // The target resource must not already have a floating IP bound to it if the target // resource is: // // - an instance network interface // - a bare metal server network interface with `enable_infrastructure_nat` set to `true`. Target FloatingIPTargetPrototypeIntf `json:"target" validate:"required"` } // NewFloatingIPPrototypeFloatingIPByTarget : Instantiate FloatingIPPrototypeFloatingIPByTarget (Generic Model Constructor) func (*VpcbetaV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPTargetPrototypeIntf) (_model *FloatingIPPrototypeFloatingIPByTarget, err error) { _model = &FloatingIPPrototypeFloatingIPByTarget{ Target: target, } err = core.ValidateStruct(_model, "required parameters") return } func (*FloatingIPPrototypeFloatingIPByTarget) isaFloatingIPPrototype() bool { return true } // UnmarshalFloatingIPPrototypeFloatingIPByTarget unmarshals an instance of FloatingIPPrototypeFloatingIPByTarget from the specified map of raw messages. func UnmarshalFloatingIPPrototypeFloatingIPByTarget(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPPrototypeFloatingIPByTarget) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPTargetPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPPrototypeFloatingIPByZone : FloatingIPPrototypeFloatingIPByZone struct // This model "extends" FloatingIPPrototype type FloatingIPPrototypeFloatingIPByZone struct { // The name for this floating IP. The name must not be used by another floating IP in the region. If unspecified, the // name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The zone this floating IP will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewFloatingIPPrototypeFloatingIPByZone : Instantiate FloatingIPPrototypeFloatingIPByZone (Generic Model Constructor) func (*VpcbetaV1) NewFloatingIPPrototypeFloatingIPByZone(zone ZoneIdentityIntf) (_model *FloatingIPPrototypeFloatingIPByZone, err error) { _model = &FloatingIPPrototypeFloatingIPByZone{ Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*FloatingIPPrototypeFloatingIPByZone) isaFloatingIPPrototype() bool { return true } // UnmarshalFloatingIPPrototypeFloatingIPByZone unmarshals an instance of FloatingIPPrototypeFloatingIPByZone from the specified map of raw messages. func UnmarshalFloatingIPPrototypeFloatingIPByZone(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPPrototypeFloatingIPByZone) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPatchNetworkInterfaceIdentity : Identifies an instance network interface by a unique property. // Models which "extend" this model: // - FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID // - FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref // This model "extends" FloatingIPTargetPatch type FloatingIPTargetPatchNetworkInterfaceIdentity struct { // The unique identifier for this instance network interface. ID *string `json:"id,omitempty"` // The URL for this instance network interface. Href *string `json:"href,omitempty"` } func (*FloatingIPTargetPatchNetworkInterfaceIdentity) isaFloatingIPTargetPatchNetworkInterfaceIdentity() bool { return true } type FloatingIPTargetPatchNetworkInterfaceIdentityIntf interface { FloatingIPTargetPatchIntf isaFloatingIPTargetPatchNetworkInterfaceIdentity() bool } func (*FloatingIPTargetPatchNetworkInterfaceIdentity) isaFloatingIPTargetPatch() bool { return true } // UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentity unmarshals an instance of FloatingIPTargetPatchNetworkInterfaceIdentity from the specified map of raw messages. func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPatchNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPrototypeNetworkInterfaceIdentity : Identifies an instance network interface by a unique property. // Models which "extend" this model: // - FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID // - FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref // This model "extends" FloatingIPTargetPrototype type FloatingIPTargetPrototypeNetworkInterfaceIdentity struct { // The unique identifier for this instance network interface. ID *string `json:"id,omitempty"` // The URL for this instance network interface. Href *string `json:"href,omitempty"` } func (*FloatingIPTargetPrototypeNetworkInterfaceIdentity) isaFloatingIPTargetPrototypeNetworkInterfaceIdentity() bool { return true } type FloatingIPTargetPrototypeNetworkInterfaceIdentityIntf interface { FloatingIPTargetPrototypeIntf isaFloatingIPTargetPrototypeNetworkInterfaceIdentity() bool } func (*FloatingIPTargetPrototypeNetworkInterfaceIdentity) isaFloatingIPTargetPrototype() bool { return true } // UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentity unmarshals an instance of FloatingIPTargetPrototypeNetworkInterfaceIdentity from the specified map of raw messages. func UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPrototypeNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetBareMetalServerNetworkInterfaceReference : FloatingIPTargetBareMetalServerNetworkInterfaceReference struct // This model "extends" FloatingIPTarget type FloatingIPTargetBareMetalServerNetworkInterfaceReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *BareMetalServerNetworkInterfaceReferenceDeleted `json:"deleted,omitempty"` // The URL for this bare metal server network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server network interface. ID *string `json:"id" validate:"required"` // The name for this bare metal server network interface. Name *string `json:"name" validate:"required"` PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetBareMetalServerNetworkInterfaceReference.ResourceType property. // The resource type. const ( FloatingIPTargetBareMetalServerNetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) func (*FloatingIPTargetBareMetalServerNetworkInterfaceReference) isaFloatingIPTarget() bool { return true } // UnmarshalFloatingIPTargetBareMetalServerNetworkInterfaceReference unmarshals an instance of FloatingIPTargetBareMetalServerNetworkInterfaceReference from the specified map of raw messages. func UnmarshalFloatingIPTargetBareMetalServerNetworkInterfaceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetBareMetalServerNetworkInterfaceReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkInterfaceReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetNetworkInterfaceReference : FloatingIPTargetNetworkInterfaceReference struct // This model "extends" FloatingIPTarget type FloatingIPTargetNetworkInterfaceReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *NetworkInterfaceReferenceDeleted `json:"deleted,omitempty"` // The URL for this instance network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` // The name for this instance network interface. Name *string `json:"name" validate:"required"` PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetNetworkInterfaceReference.ResourceType property. // The resource type. const ( FloatingIPTargetNetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) func (*FloatingIPTargetNetworkInterfaceReference) isaFloatingIPTarget() bool { return true } // UnmarshalFloatingIPTargetNetworkInterfaceReference unmarshals an instance of FloatingIPTargetNetworkInterfaceReference from the specified map of raw messages. func UnmarshalFloatingIPTargetNetworkInterfaceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetNetworkInterfaceReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPublicGatewayReference : FloatingIPTargetPublicGatewayReference struct // This model "extends" FloatingIPTarget type FloatingIPTargetPublicGatewayReference struct { // The CRN for this public gateway. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *PublicGatewayReferenceDeleted `json:"deleted,omitempty"` // The URL for this public gateway. Href *string `json:"href" validate:"required"` // The unique identifier for this public gateway. ID *string `json:"id" validate:"required"` // The name for this public gateway. The name is unique across all public gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetPublicGatewayReference.ResourceType property. // The resource type. const ( FloatingIPTargetPublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway" ) func (*FloatingIPTargetPublicGatewayReference) isaFloatingIPTarget() bool { return true } // UnmarshalFloatingIPTargetPublicGatewayReference unmarshals an instance of FloatingIPTargetPublicGatewayReference from the specified map of raw messages. func UnmarshalFloatingIPTargetPublicGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPublicGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPublicGatewayReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeInstanceIdentity : Identifies a virtual server instance by a unique property. // Models which "extend" this model: // - FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID // - FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN // - FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref // This model "extends" FlowLogCollectorTargetPrototype type FlowLogCollectorTargetPrototypeInstanceIdentity struct { // The unique identifier for this virtual server instance. ID *string `json:"id,omitempty"` // The CRN for this virtual server instance. CRN *string `json:"crn,omitempty"` // The URL for this virtual server instance. Href *string `json:"href,omitempty"` } func (*FlowLogCollectorTargetPrototypeInstanceIdentity) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool { return true } type FlowLogCollectorTargetPrototypeInstanceIdentityIntf interface { FlowLogCollectorTargetPrototypeIntf isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool } func (*FlowLogCollectorTargetPrototypeInstanceIdentity) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentity from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeInstanceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity : Identifies an instance network interface by a unique property. // Models which "extend" this model: // - FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID // - FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref // This model "extends" FlowLogCollectorTargetPrototype type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity struct { // The unique identifier for this instance network interface. ID *string `json:"id,omitempty"` // The URL for this instance network interface. Href *string `json:"href,omitempty"` } func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool { return true } type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityIntf interface { FlowLogCollectorTargetPrototypeIntf isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool } func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeSubnetIdentity : Identifies a subnet by a unique property. // Models which "extend" this model: // - FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID // - FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN // - FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref // This model "extends" FlowLogCollectorTargetPrototype type FlowLogCollectorTargetPrototypeSubnetIdentity struct { // The unique identifier for this subnet. ID *string `json:"id,omitempty"` // The CRN for this subnet. CRN *string `json:"crn,omitempty"` // The URL for this subnet. Href *string `json:"href,omitempty"` } func (*FlowLogCollectorTargetPrototypeSubnetIdentity) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool { return true } type FlowLogCollectorTargetPrototypeSubnetIdentityIntf interface { FlowLogCollectorTargetPrototypeIntf isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool } func (*FlowLogCollectorTargetPrototypeSubnetIdentity) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentity from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeSubnetIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeVPCIdentity : Identifies a VPC by a unique property. // Models which "extend" this model: // - FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID // - FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN // - FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref // This model "extends" FlowLogCollectorTargetPrototype type FlowLogCollectorTargetPrototypeVPCIdentity struct { // The unique identifier for this VPC. ID *string `json:"id,omitempty"` // The CRN for this VPC. CRN *string `json:"crn,omitempty"` // The URL for this VPC. Href *string `json:"href,omitempty"` } func (*FlowLogCollectorTargetPrototypeVPCIdentity) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool { return true } type FlowLogCollectorTargetPrototypeVPCIdentityIntf interface { FlowLogCollectorTargetPrototypeIntf isaFlowLogCollectorTargetPrototypeVPCIdentity() bool } func (*FlowLogCollectorTargetPrototypeVPCIdentity) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentity from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeVPCIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetInstanceReference : FlowLogCollectorTargetInstanceReference struct // This model "extends" FlowLogCollectorTarget type FlowLogCollectorTargetInstanceReference struct { // The CRN for this virtual server instance. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *InstanceReferenceDeleted `json:"deleted,omitempty"` // The URL for this virtual server instance. Href *string `json:"href" validate:"required"` // The unique identifier for this virtual server instance. ID *string `json:"id" validate:"required"` // The name for this virtual server instance. The name is unique across all virtual server instances in the region. Name *string `json:"name" validate:"required"` } func (*FlowLogCollectorTargetInstanceReference) isaFlowLogCollectorTarget() bool { return true } // UnmarshalFlowLogCollectorTargetInstanceReference unmarshals an instance of FlowLogCollectorTargetInstanceReference from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetInstanceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext : FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext struct // This model "extends" FlowLogCollectorTarget type FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` // The URL for this instance network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` // The name for this instance network interface. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.ResourceType property. // The resource type. const ( FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" ) func (*FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext) isaFlowLogCollectorTarget() bool { return true } // UnmarshalFlowLogCollectorTargetNetworkInterfaceReferenceTargetContext unmarshals an instance of FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetSubnetReference : FlowLogCollectorTargetSubnetReference struct // This model "extends" FlowLogCollectorTarget type FlowLogCollectorTargetSubnetReference struct { // The CRN for this subnet. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *SubnetReferenceDeleted `json:"deleted,omitempty"` // The URL for this subnet. Href *string `json:"href" validate:"required"` // The unique identifier for this subnet. ID *string `json:"id" validate:"required"` // The name for this subnet. The name is unique across all subnets in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FlowLogCollectorTargetSubnetReference.ResourceType property. // The resource type. const ( FlowLogCollectorTargetSubnetReferenceResourceTypeSubnetConst = "subnet" ) func (*FlowLogCollectorTargetSubnetReference) isaFlowLogCollectorTarget() bool { return true } // UnmarshalFlowLogCollectorTargetSubnetReference unmarshals an instance of FlowLogCollectorTargetSubnetReference from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetSubnetReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetSubnetReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSubnetReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetVPCReference : FlowLogCollectorTargetVPCReference struct // This model "extends" FlowLogCollectorTarget type FlowLogCollectorTargetVPCReference struct { // The CRN for this VPC. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPCReferenceDeleted `json:"deleted,omitempty"` // The URL for this VPC. Href *string `json:"href" validate:"required"` // The unique identifier for this VPC. ID *string `json:"id" validate:"required"` // The name for this VPC. The name is unique across all VPCs in the region. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FlowLogCollectorTargetVPCReference.ResourceType property. // The resource type. const ( FlowLogCollectorTargetVPCReferenceResourceTypeVPCConst = "vpc" ) func (*FlowLogCollectorTargetVPCReference) isaFlowLogCollectorTarget() bool { return true } // UnmarshalFlowLogCollectorTargetVPCReference unmarshals an instance of FlowLogCollectorTargetVPCReference from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetVPCReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetVPCReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPCReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ImageIdentityByCRN : ImageIdentityByCRN struct // This model "extends" ImageIdentity type ImageIdentityByCRN struct { // The CRN for this image. CRN *string `json:"crn" validate:"required"` } // NewImageIdentityByCRN : Instantiate ImageIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewImageIdentityByCRN(crn string) (_model *ImageIdentityByCRN, err error) { _model = &ImageIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*ImageIdentityByCRN) isaImageIdentity() bool { return true } // UnmarshalImageIdentityByCRN unmarshals an instance of ImageIdentityByCRN from the specified map of raw messages. func UnmarshalImageIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ImageIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ImageIdentityByHref : ImageIdentityByHref struct // This model "extends" ImageIdentity type ImageIdentityByHref struct { // The URL for this image. Href *string `json:"href" validate:"required"` } // NewImageIdentityByHref : Instantiate ImageIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewImageIdentityByHref(href string) (_model *ImageIdentityByHref, err error) { _model = &ImageIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*ImageIdentityByHref) isaImageIdentity() bool { return true } // UnmarshalImageIdentityByHref unmarshals an instance of ImageIdentityByHref from the specified map of raw messages. func UnmarshalImageIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ImageIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ImageIdentityByID : ImageIdentityByID struct // This model "extends" ImageIdentity type ImageIdentityByID struct { // The unique identifier for this image. ID *string `json:"id" validate:"required"` } // NewImageIdentityByID : Instantiate ImageIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewImageIdentityByID(id string) (_model *ImageIdentityByID, err error) { _model = &ImageIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*ImageIdentityByID) isaImageIdentity() bool { return true } // UnmarshalImageIdentityByID unmarshals an instance of ImageIdentityByID from the specified map of raw messages. func UnmarshalImageIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ImageIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ImagePrototypeImageByFile : ImagePrototypeImageByFile struct // This model "extends" ImagePrototype type ImagePrototypeImageByFile struct { // The deprecation date and time to set for this image. // // The date and time must not be in the past, and must be earlier than `obsolescence_at` // (if `obsolescence_at` is set). // // If unspecified, no deprecation date and time will be set. // // If the deprecation date and time is reached while the image has a status of `pending`, the image's status will // transition to `deprecated` upon its successful creation (or // `obsolete` if the obsolescence date and time was also reached). DeprecationAt *strfmt.DateTime `json:"deprecation_at,omitempty"` // The name for this image. The name must not be used by another image in the region. Names starting with `ibm-` are // reserved for system-provided images, and are not allowed. If unspecified, the name will be a hyphenated list of // randomly-selected words. Name *string `json:"name,omitempty"` // The obsolescence date and time to set for this image. // // The date and time must not be in the past, and must be later than `deprecation_at` (if // `deprecation_at` is set). // // If unspecified, no obsolescence date and time will be set. // // If the obsolescence date and time is reached while the image has a status of // `pending`, the image's status will transition to `obsolete` upon its successful creation. ObsolescenceAt *strfmt.DateTime `json:"obsolescence_at,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image. // // That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be // specified), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the // [Hyper Protect Crypto Services](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys). // // If unspecified, the imported image is treated as unencrypted. EncryptedDataKey *string `json:"encrypted_data_key,omitempty"` // The root key that was used to wrap the data key (which is ultimately represented as // `encrypted_data_key`). Additionally, the root key will be used to encrypt volumes // created from this image (unless an alternate `encryption_key` is specified at volume // creation). // // If unspecified, the imported image is treated as unencrypted. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The file from which to create the image. File *ImageFilePrototype `json:"file" validate:"required"` // The [supported operating // system](https://cloud.ibm.com/apidocs/vpc#list-operating-systems) included in this // image. OperatingSystem OperatingSystemIdentityIntf `json:"operating_system" validate:"required"` } // NewImagePrototypeImageByFile : Instantiate ImagePrototypeImageByFile (Generic Model Constructor) func (*VpcbetaV1) NewImagePrototypeImageByFile(file *ImageFilePrototype, operatingSystem OperatingSystemIdentityIntf) (_model *ImagePrototypeImageByFile, err error) { _model = &ImagePrototypeImageByFile{ File: file, OperatingSystem: operatingSystem, } err = core.ValidateStruct(_model, "required parameters") return } func (*ImagePrototypeImageByFile) isaImagePrototype() bool { return true } // UnmarshalImagePrototypeImageByFile unmarshals an instance of ImagePrototypeImageByFile from the specified map of raw messages. func UnmarshalImagePrototypeImageByFile(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ImagePrototypeImageByFile) err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "file", &obj.File, UnmarshalImageFilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "operating_system", &obj.OperatingSystem, UnmarshalOperatingSystemIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ImagePrototypeImageBySourceVolume : ImagePrototypeImageBySourceVolume struct // This model "extends" ImagePrototype type ImagePrototypeImageBySourceVolume struct { // The deprecation date and time to set for this image. // // The date and time must not be in the past, and must be earlier than `obsolescence_at` // (if `obsolescence_at` is set). // // If unspecified, no deprecation date and time will be set. // // If the deprecation date and time is reached while the image has a status of `pending`, the image's status will // transition to `deprecated` upon its successful creation (or // `obsolete` if the obsolescence date and time was also reached). DeprecationAt *strfmt.DateTime `json:"deprecation_at,omitempty"` // The name for this image. The name must not be used by another image in the region. Names starting with `ibm-` are // reserved for system-provided images, and are not allowed. If unspecified, the name will be a hyphenated list of // randomly-selected words. Name *string `json:"name,omitempty"` // The obsolescence date and time to set for this image. // // The date and time must not be in the past, and must be later than `deprecation_at` (if // `deprecation_at` is set). // // If unspecified, no obsolescence date and time will be set. // // If the obsolescence date and time is reached while the image has a status of // `pending`, the image's status will transition to `obsolete` upon its successful creation. ObsolescenceAt *strfmt.DateTime `json:"obsolescence_at,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The root key used to wrap the system-generated data encryption key for the image. // // If unspecified, the root key from `source_volume` will be used. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The volume from which to create the image. The specified volume must: // - Have an `operating_system`, which will be used to populate this image's // operating system information. // - Not be `active` or `busy`. // // During image creation, the specified volume may briefly become `busy`. SourceVolume VolumeIdentityIntf `json:"source_volume" validate:"required"` } // NewImagePrototypeImageBySourceVolume : Instantiate ImagePrototypeImageBySourceVolume (Generic Model Constructor) func (*VpcbetaV1) NewImagePrototypeImageBySourceVolume(sourceVolume VolumeIdentityIntf) (_model *ImagePrototypeImageBySourceVolume, err error) { _model = &ImagePrototypeImageBySourceVolume{ SourceVolume: sourceVolume, } err = core.ValidateStruct(_model, "required parameters") return } func (*ImagePrototypeImageBySourceVolume) isaImagePrototype() bool { return true } // UnmarshalImagePrototypeImageBySourceVolume unmarshals an instance of ImagePrototypeImageBySourceVolume from the specified map of raw messages. func UnmarshalImagePrototypeImageBySourceVolume(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ImagePrototypeImageBySourceVolume) err = core.UnmarshalPrimitive(m, "deprecation_at", &obj.DeprecationAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "obsolescence_at", &obj.ObsolescenceAt) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceCatalogOfferingPrototypeCatalogOfferingByOffering : InstanceCatalogOfferingPrototypeCatalogOfferingByOffering struct // This model "extends" InstanceCatalogOfferingPrototype type InstanceCatalogOfferingPrototypeCatalogOfferingByOffering struct { // Identifies a [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) // offering by a unique property. Offering CatalogOfferingIdentityIntf `json:"offering" validate:"required"` } // NewInstanceCatalogOfferingPrototypeCatalogOfferingByOffering : Instantiate InstanceCatalogOfferingPrototypeCatalogOfferingByOffering (Generic Model Constructor) func (*VpcbetaV1) NewInstanceCatalogOfferingPrototypeCatalogOfferingByOffering(offering CatalogOfferingIdentityIntf) (_model *InstanceCatalogOfferingPrototypeCatalogOfferingByOffering, err error) { _model = &InstanceCatalogOfferingPrototypeCatalogOfferingByOffering{ Offering: offering, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceCatalogOfferingPrototypeCatalogOfferingByOffering) isaInstanceCatalogOfferingPrototype() bool { return true } // UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByOffering unmarshals an instance of InstanceCatalogOfferingPrototypeCatalogOfferingByOffering from the specified map of raw messages. func UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByOffering(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceCatalogOfferingPrototypeCatalogOfferingByOffering) err = core.UnmarshalModel(m, "offering", &obj.Offering, UnmarshalCatalogOfferingIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceCatalogOfferingPrototypeCatalogOfferingByVersion : InstanceCatalogOfferingPrototypeCatalogOfferingByVersion struct // This model "extends" InstanceCatalogOfferingPrototype type InstanceCatalogOfferingPrototypeCatalogOfferingByVersion struct { // Identifies a version of a // [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering by a // unique property. Version CatalogOfferingVersionIdentityIntf `json:"version" validate:"required"` } // NewInstanceCatalogOfferingPrototypeCatalogOfferingByVersion : Instantiate InstanceCatalogOfferingPrototypeCatalogOfferingByVersion (Generic Model Constructor) func (*VpcbetaV1) NewInstanceCatalogOfferingPrototypeCatalogOfferingByVersion(version CatalogOfferingVersionIdentityIntf) (_model *InstanceCatalogOfferingPrototypeCatalogOfferingByVersion, err error) { _model = &InstanceCatalogOfferingPrototypeCatalogOfferingByVersion{ Version: version, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceCatalogOfferingPrototypeCatalogOfferingByVersion) isaInstanceCatalogOfferingPrototype() bool { return true } // UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByVersion unmarshals an instance of InstanceCatalogOfferingPrototypeCatalogOfferingByVersion from the specified map of raw messages. func UnmarshalInstanceCatalogOfferingPrototypeCatalogOfferingByVersion(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceCatalogOfferingPrototypeCatalogOfferingByVersion) err = core.UnmarshalModel(m, "version", &obj.Version, UnmarshalCatalogOfferingVersionIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototype : InstanceGroupManagerActionPrototypeScheduledActionPrototype struct // Models which "extend" this model: // - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt // - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec // This model "extends" InstanceGroupManagerActionPrototype type InstanceGroupManagerActionPrototypeScheduledActionPrototype struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The date and time the scheduled action will run. RunAt *strfmt.DateTime `json:"run_at,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } type InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf interface { InstanceGroupManagerActionPrototypeIntf isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototype) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototype from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionScheduledAction : InstanceGroupManagerActionScheduledAction struct // Models which "extend" this model: // - InstanceGroupManagerActionScheduledActionGroupTarget // - InstanceGroupManagerActionScheduledActionManagerTarget // This model "extends" InstanceGroupManagerAction type InstanceGroupManagerActionScheduledAction struct { // Indicates whether this scheduled action will be automatically deleted after it has completed and // `auto_delete_timeout` hours have passed. At present, this is always // `true`, but may be modifiable in the future. AutoDelete *bool `json:"auto_delete" validate:"required"` // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the // future. AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"` // The date and time that the instance group manager action was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The URL for this instance group manager action. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager action. ID *string `json:"id" validate:"required"` // The name for this instance group manager action. The name is unique across all actions for the instance group // manager. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the instance group action // - `active`: Action is ready to be run // - `completed`: Action was completed successfully // - `failed`: Action could not be completed successfully // - `incompatible`: Action parameters are not compatible with the group or manager // - `omitted`: Action was not applied because this action's manager was disabled. Status *string `json:"status" validate:"required"` // The date and time that the instance group manager action was updated. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` // The type of action for the instance group. ActionType *string `json:"action_type" validate:"required"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` // The date and time the scheduled action was last applied. If absent, the action has never been applied. LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"` // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run // time. NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"` Group *InstanceGroupManagerScheduledActionGroup `json:"group,omitempty"` Manager InstanceGroupManagerScheduledActionManagerIntf `json:"manager,omitempty"` } // Constants associated with the InstanceGroupManagerActionScheduledAction.ResourceType property. // The resource type. const ( InstanceGroupManagerActionScheduledActionResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action" ) // Constants associated with the InstanceGroupManagerActionScheduledAction.Status property. // The status of the instance group action // - `active`: Action is ready to be run // - `completed`: Action was completed successfully // - `failed`: Action could not be completed successfully // - `incompatible`: Action parameters are not compatible with the group or manager // - `omitted`: Action was not applied because this action's manager was disabled. const ( InstanceGroupManagerActionScheduledActionStatusActiveConst = "active" InstanceGroupManagerActionScheduledActionStatusCompletedConst = "completed" InstanceGroupManagerActionScheduledActionStatusFailedConst = "failed" InstanceGroupManagerActionScheduledActionStatusIncompatibleConst = "incompatible" InstanceGroupManagerActionScheduledActionStatusOmittedConst = "omitted" ) // Constants associated with the InstanceGroupManagerActionScheduledAction.ActionType property. // The type of action for the instance group. const ( InstanceGroupManagerActionScheduledActionActionTypeScheduledConst = "scheduled" ) func (*InstanceGroupManagerActionScheduledAction) isaInstanceGroupManagerActionScheduledAction() bool { return true } type InstanceGroupManagerActionScheduledActionIntf interface { InstanceGroupManagerActionIntf isaInstanceGroupManagerActionScheduledAction() bool } func (*InstanceGroupManagerActionScheduledAction) isaInstanceGroupManagerAction() bool { return true } // UnmarshalInstanceGroupManagerActionScheduledAction unmarshals an instance of InstanceGroupManagerActionScheduledAction from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionScheduledAction(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionScheduledAction) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerAutoScale : InstanceGroupManagerAutoScale struct // This model "extends" InstanceGroupManager type InstanceGroupManagerAutoScale struct { // The date and time that the instance group manager was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The URL for this instance group manager. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager. ID *string `json:"id" validate:"required"` // Indicates whether this manager will control the instance group. ManagementEnabled *bool `json:"management_enabled" validate:"required"` // The name for this instance group manager. The name is unique across all managers for the instance group. Name *string `json:"name" validate:"required"` // The date and time that the instance group manager was updated. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` // The time window in seconds to aggregate metrics prior to evaluation. AggregationWindow *int64 `json:"aggregation_window" validate:"required"` // The duration of time in seconds to pause further scale actions after scaling has taken place. Cooldown *int64 `json:"cooldown" validate:"required"` // The type of instance group manager. ManagerType *string `json:"manager_type" validate:"required"` // The maximum number of members in a managed instance group. MaxMembershipCount *int64 `json:"max_membership_count" validate:"required"` // The minimum number of members in a managed instance group. MinMembershipCount *int64 `json:"min_membership_count" validate:"required"` // The policies of the instance group manager. Policies []InstanceGroupManagerPolicyReference `json:"policies" validate:"required"` } // Constants associated with the InstanceGroupManagerAutoScale.ManagerType property. // The type of instance group manager. const ( InstanceGroupManagerAutoScaleManagerTypeAutoscaleConst = "autoscale" ) func (*InstanceGroupManagerAutoScale) isaInstanceGroupManager() bool { return true } // UnmarshalInstanceGroupManagerAutoScale unmarshals an instance of InstanceGroupManagerAutoScale from the specified map of raw messages. func UnmarshalInstanceGroupManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerAutoScale) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } err = core.UnmarshalModel(m, "policies", &obj.Policies, UnmarshalInstanceGroupManagerPolicyReference) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype : InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct // This model "extends" InstanceGroupManagerPolicyPrototype type InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype struct { // The name for this instance group manager policy. The name must not be used by another policy for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The type of metric to be evaluated. MetricType *string `json:"metric_type" validate:"required"` // The metric value to be evaluated. MetricValue *int64 `json:"metric_value" validate:"required"` // The type of policy for the instance group. PolicyType *string `json:"policy_type" validate:"required"` } // Constants associated with the InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.MetricType property. // The type of metric to be evaluated. const ( InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeCpuConst = "cpu" InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeMemoryConst = "memory" InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeNetworkInConst = "network_in" InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypeMetricTypeNetworkOutConst = "network_out" ) // Constants associated with the InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype.PolicyType property. // The type of policy for the instance group. const ( InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototypePolicyTypeTargetConst = "target" ) // NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype : Instantiate InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(metricType string, metricValue int64, policyType string) (_model *InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype, err error) { _model = &InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype{ MetricType: core.StringPtr(metricType), MetricValue: core.Int64Ptr(metricValue), PolicyType: core.StringPtr(policyType), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype) isaInstanceGroupManagerPolicyPrototype() bool { return true } // UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype unmarshals an instance of InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype from the specified map of raw messages. func UnmarshalInstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { return } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy : InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy struct // This model "extends" InstanceGroupManagerPolicy type InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy struct { // The date and time that the instance group manager policy was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The URL for this instance group manager policy. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager policy. ID *string `json:"id" validate:"required"` // The name for this instance group manager policy. The name is unique across all policies for the instance group // manager. Name *string `json:"name" validate:"required"` // The date and time that the instance group manager policy was updated. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` // The type of metric to be evaluated. MetricType *string `json:"metric_type" validate:"required"` // The metric value to be evaluated. MetricValue *int64 `json:"metric_value" validate:"required"` // The type of policy for the instance group. PolicyType *string `json:"policy_type" validate:"required"` } // Constants associated with the InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.MetricType property. // The type of metric to be evaluated. const ( InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeCpuConst = "cpu" InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeMemoryConst = "memory" InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeNetworkInConst = "network_in" InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyMetricTypeNetworkOutConst = "network_out" ) // Constants associated with the InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy.PolicyType property. // The type of policy for the instance group. const ( InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicyPolicyTypeTargetConst = "target" ) func (*InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy) isaInstanceGroupManagerPolicy() bool { return true } // UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy unmarshals an instance of InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy from the specified map of raw messages. func UnmarshalInstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) if err != nil { return } err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) if err != nil { return } err = core.UnmarshalPrimitive(m, "policy_type", &obj.PolicyType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype : InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype struct // This model "extends" InstanceGroupManagerPrototype type InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype struct { // Indicates whether this manager will control the instance group. ManagementEnabled *bool `json:"management_enabled,omitempty"` // The name for this instance group manager. The name must not be used by another manager for the instance group. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The time window in seconds to aggregate metrics prior to evaluation. AggregationWindow *int64 `json:"aggregation_window,omitempty"` // The duration of time in seconds to pause further scale actions after scaling has taken place. Cooldown *int64 `json:"cooldown,omitempty"` // The type of instance group manager. ManagerType *string `json:"manager_type" validate:"required"` // The maximum number of members in a managed instance group. MaxMembershipCount *int64 `json:"max_membership_count" validate:"required"` // The minimum number of members in a managed instance group. MinMembershipCount *int64 `json:"min_membership_count,omitempty"` } // Constants associated with the InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype.ManagerType property. // The type of instance group manager. const ( InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototypeManagerTypeAutoscaleConst = "autoscale" ) // NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype : Instantiate InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(managerType string, maxMembershipCount int64) (_model *InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype, err error) { _model = &InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype{ ManagerType: core.StringPtr(managerType), MaxMembershipCount: core.Int64Ptr(maxMembershipCount), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype) isaInstanceGroupManagerPrototype() bool { return true } // UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype unmarshals an instance of InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype from the specified map of raw messages. func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerAutoScalePrototype) err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) if err != nil { return } err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) if err != nil { return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype : InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype struct // This model "extends" InstanceGroupManagerPrototype type InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype struct { // Indicates whether this manager will control the instance group. ManagementEnabled *bool `json:"management_enabled,omitempty"` // The name for this instance group manager. The name must not be used by another manager for the instance group. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The type of instance group manager. ManagerType *string `json:"manager_type" validate:"required"` } // Constants associated with the InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype.ManagerType property. // The type of instance group manager. const ( InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototypeManagerTypeScheduledConst = "scheduled" ) // NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype : Instantiate InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(managerType string) (_model *InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype, err error) { _model = &InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype{ ManagerType: core.StringPtr(managerType), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype) isaInstanceGroupManagerPrototype() bool { return true } // UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype unmarshals an instance of InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype from the specified map of raw messages. func UnmarshalInstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerPrototypeInstanceGroupManagerScheduledPrototype) err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerScheduled : InstanceGroupManagerScheduled struct // This model "extends" InstanceGroupManager type InstanceGroupManagerScheduled struct { // The date and time that the instance group manager was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The URL for this instance group manager. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager. ID *string `json:"id" validate:"required"` // Indicates whether this manager will control the instance group. ManagementEnabled *bool `json:"management_enabled" validate:"required"` // The name for this instance group manager. The name is unique across all managers for the instance group. Name *string `json:"name" validate:"required"` // The date and time that the instance group manager was updated. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` // The actions of the instance group manager. Actions []InstanceGroupManagerActionReference `json:"actions" validate:"required"` // The type of instance group manager. ManagerType *string `json:"manager_type" validate:"required"` } // Constants associated with the InstanceGroupManagerScheduled.ManagerType property. // The type of instance group manager. const ( InstanceGroupManagerScheduledManagerTypeScheduledConst = "scheduled" ) func (*InstanceGroupManagerScheduled) isaInstanceGroupManager() bool { return true } // UnmarshalInstanceGroupManagerScheduled unmarshals an instance of InstanceGroupManagerScheduled from the specified map of raw messages. func UnmarshalInstanceGroupManagerScheduled(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerScheduled) err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { return } err = core.UnmarshalModel(m, "actions", &obj.Actions, UnmarshalInstanceGroupManagerActionReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "manager_type", &obj.ManagerType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerScheduledActionManagerAutoScale : InstanceGroupManagerScheduledActionManagerAutoScale struct // This model "extends" InstanceGroupManagerScheduledActionManager type InstanceGroupManagerScheduledActionManagerAutoScale struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *InstanceGroupManagerReferenceDeleted `json:"deleted,omitempty"` // The URL for this instance group manager. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager. ID *string `json:"id" validate:"required"` // The name for this instance group manager. The name is unique across all managers for the instance group. Name *string `json:"name" validate:"required"` // The desired maximum number of instance group members at the scheduled time. MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` // The desired minimum number of instance group members at the scheduled time. MinMembershipCount *int64 `json:"min_membership_count,omitempty"` } func (*InstanceGroupManagerScheduledActionManagerAutoScale) isaInstanceGroupManagerScheduledActionManager() bool { return true } // UnmarshalInstanceGroupManagerScheduledActionManagerAutoScale unmarshals an instance of InstanceGroupManagerScheduledActionManagerAutoScale from the specified map of raw messages. func UnmarshalInstanceGroupManagerScheduledActionManagerAutoScale(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerScheduledActionManagerAutoScale) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceGroupManagerReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype : The auto scale manager to update, and one or more properties to be updated. Either `id` or `href` must be specified, // in addition to at least one of `min_membership_count` and // `max_membership_count`. // Models which "extend" this model: // - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID // - InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref // This model "extends" InstanceGroupManagerScheduledActionManagerPrototype type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype struct { // The desired maximum number of instance group members at the scheduled time. MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` // The desired minimum number of instance group members at the scheduled time. MinMembershipCount *int64 `json:"min_membership_count,omitempty"` // The unique identifier for this instance group manager. ID *string `json:"id,omitempty"` // The URL for this instance group manager. Href *string `json:"href,omitempty"` } func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool { return true } type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeIntf interface { InstanceGroupManagerScheduledActionManagerPrototypeIntf isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool } func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) isaInstanceGroupManagerScheduledActionManagerPrototype() bool { return true } // UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype from the specified map of raw messages. func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePatchProfileInstanceProfileIdentityByHref : InstancePatchProfileInstanceProfileIdentityByHref struct // This model "extends" InstancePatchProfile type InstancePatchProfileInstanceProfileIdentityByHref struct { // The URL for this virtual server instance profile. Href *string `json:"href" validate:"required"` } // NewInstancePatchProfileInstanceProfileIdentityByHref : Instantiate InstancePatchProfileInstanceProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstancePatchProfileInstanceProfileIdentityByHref(href string) (_model *InstancePatchProfileInstanceProfileIdentityByHref, err error) { _model = &InstancePatchProfileInstanceProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePatchProfileInstanceProfileIdentityByHref) isaInstancePatchProfile() bool { return true } // UnmarshalInstancePatchProfileInstanceProfileIdentityByHref unmarshals an instance of InstancePatchProfileInstanceProfileIdentityByHref from the specified map of raw messages. func UnmarshalInstancePatchProfileInstanceProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePatchProfileInstanceProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePatchProfileInstanceProfileIdentityByName : InstancePatchProfileInstanceProfileIdentityByName struct // This model "extends" InstancePatchProfile type InstancePatchProfileInstanceProfileIdentityByName struct { // The globally unique name for this virtual server instance profile. Name *string `json:"name" validate:"required"` } // NewInstancePatchProfileInstanceProfileIdentityByName : Instantiate InstancePatchProfileInstanceProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewInstancePatchProfileInstanceProfileIdentityByName(name string) (_model *InstancePatchProfileInstanceProfileIdentityByName, err error) { _model = &InstancePatchProfileInstanceProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePatchProfileInstanceProfileIdentityByName) isaInstancePatchProfile() bool { return true } // UnmarshalInstancePatchProfileInstanceProfileIdentityByName unmarshals an instance of InstancePatchProfileInstanceProfileIdentityByName from the specified map of raw messages. func UnmarshalInstancePatchProfileInstanceProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePatchProfileInstanceProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostGroupIdentity : Identifies a dedicated host group by a unique property. // Models which "extend" this model: // - InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID // - InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN // - InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref // This model "extends" InstancePlacementTargetPatch type InstancePlacementTargetPatchDedicatedHostGroupIdentity struct { // The unique identifier for this dedicated host group. ID *string `json:"id,omitempty"` // The CRN for this dedicated host group. CRN *string `json:"crn,omitempty"` // The URL for this dedicated host group. Href *string `json:"href,omitempty"` } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentity) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool { return true } type InstancePlacementTargetPatchDedicatedHostGroupIdentityIntf interface { InstancePlacementTargetPatchIntf isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentity) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentity from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostIdentity : Identifies a dedicated host by a unique property. // Models which "extend" this model: // - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID // - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN // - InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref // This model "extends" InstancePlacementTargetPatch type InstancePlacementTargetPatchDedicatedHostIdentity struct { // The unique identifier for this dedicated host. ID *string `json:"id,omitempty"` // The CRN for this dedicated host. CRN *string `json:"crn,omitempty"` // The URL for this dedicated host. Href *string `json:"href,omitempty"` } func (*InstancePlacementTargetPatchDedicatedHostIdentity) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool { return true } type InstancePlacementTargetPatchDedicatedHostIdentityIntf interface { InstancePlacementTargetPatchIntf isaInstancePlacementTargetPatchDedicatedHostIdentity() bool } func (*InstancePlacementTargetPatchDedicatedHostIdentity) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentity from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostGroupIdentity : Identifies a dedicated host group by a unique property. // Models which "extend" this model: // - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID // - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN // - InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref // This model "extends" InstancePlacementTargetPrototype type InstancePlacementTargetPrototypeDedicatedHostGroupIdentity struct { // The unique identifier for this dedicated host group. ID *string `json:"id,omitempty"` // The CRN for this dedicated host group. CRN *string `json:"crn,omitempty"` // The URL for this dedicated host group. Href *string `json:"href,omitempty"` } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool { return true } type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityIntf interface { InstancePlacementTargetPrototypeIntf isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentity from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostIdentity : Identifies a dedicated host by a unique property. // Models which "extend" this model: // - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID // - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN // - InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref // This model "extends" InstancePlacementTargetPrototype type InstancePlacementTargetPrototypeDedicatedHostIdentity struct { // The unique identifier for this dedicated host. ID *string `json:"id,omitempty"` // The CRN for this dedicated host. CRN *string `json:"crn,omitempty"` // The URL for this dedicated host. Href *string `json:"href,omitempty"` } func (*InstancePlacementTargetPrototypeDedicatedHostIdentity) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool { return true } type InstancePlacementTargetPrototypeDedicatedHostIdentityIntf interface { InstancePlacementTargetPrototypeIntf isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool } func (*InstancePlacementTargetPrototypeDedicatedHostIdentity) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentity from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypePlacementGroupIdentity : Identifies a placement group by a unique property. // Models which "extend" this model: // - InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID // - InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN // - InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref // This model "extends" InstancePlacementTargetPrototype type InstancePlacementTargetPrototypePlacementGroupIdentity struct { // The unique identifier for this placement group. ID *string `json:"id,omitempty"` // The CRN for this placement group. CRN *string `json:"crn,omitempty"` // The URL for this placement group. Href *string `json:"href,omitempty"` } func (*InstancePlacementTargetPrototypePlacementGroupIdentity) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool { return true } type InstancePlacementTargetPrototypePlacementGroupIdentityIntf interface { InstancePlacementTargetPrototypeIntf isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool } func (*InstancePlacementTargetPrototypePlacementGroupIdentity) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentity from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypePlacementGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetDedicatedHostGroupReference : InstancePlacementTargetDedicatedHostGroupReference struct // This model "extends" InstancePlacementTarget type InstancePlacementTargetDedicatedHostGroupReference struct { // The CRN for this dedicated host group. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *DedicatedHostGroupReferenceDeleted `json:"deleted,omitempty"` // The URL for this dedicated host group. Href *string `json:"href" validate:"required"` // The unique identifier for this dedicated host group. ID *string `json:"id" validate:"required"` // The name for this dedicated host group. The name is unique across all dedicated host groups in the region. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the InstancePlacementTargetDedicatedHostGroupReference.ResourceType property. // The resource type. const ( InstancePlacementTargetDedicatedHostGroupReferenceResourceTypeDedicatedHostGroupConst = "dedicated_host_group" ) func (*InstancePlacementTargetDedicatedHostGroupReference) isaInstancePlacementTarget() bool { return true } // UnmarshalInstancePlacementTargetDedicatedHostGroupReference unmarshals an instance of InstancePlacementTargetDedicatedHostGroupReference from the specified map of raw messages. func UnmarshalInstancePlacementTargetDedicatedHostGroupReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetDedicatedHostGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostGroupReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetDedicatedHostReference : InstancePlacementTargetDedicatedHostReference struct // This model "extends" InstancePlacementTarget type InstancePlacementTargetDedicatedHostReference struct { // The CRN for this dedicated host. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *DedicatedHostReferenceDeleted `json:"deleted,omitempty"` // The URL for this dedicated host. Href *string `json:"href" validate:"required"` // The unique identifier for this dedicated host. ID *string `json:"id" validate:"required"` // The name for this dedicated host. The name is unique across all dedicated hosts in the region. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the InstancePlacementTargetDedicatedHostReference.ResourceType property. // The resource type. const ( InstancePlacementTargetDedicatedHostReferenceResourceTypeDedicatedHostConst = "dedicated_host" ) func (*InstancePlacementTargetDedicatedHostReference) isaInstancePlacementTarget() bool { return true } // UnmarshalInstancePlacementTargetDedicatedHostReference unmarshals an instance of InstancePlacementTargetDedicatedHostReference from the specified map of raw messages. func UnmarshalInstancePlacementTargetDedicatedHostReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetDedicatedHostReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalDedicatedHostReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPlacementGroupReference : InstancePlacementTargetPlacementGroupReference struct // This model "extends" InstancePlacementTarget type InstancePlacementTargetPlacementGroupReference struct { // The CRN for this placement group. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *PlacementGroupReferenceDeleted `json:"deleted,omitempty"` // The URL for this placement group. Href *string `json:"href" validate:"required"` // The unique identifier for this placement group. ID *string `json:"id" validate:"required"` // The name for this placement group. The name is unique across all placement groups in the region. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the InstancePlacementTargetPlacementGroupReference.ResourceType property. // The resource type. const ( InstancePlacementTargetPlacementGroupReferenceResourceTypePlacementGroupConst = "placement_group" ) func (*InstancePlacementTargetPlacementGroupReference) isaInstancePlacementTarget() bool { return true } // UnmarshalInstancePlacementTargetPlacementGroupReference unmarshals an instance of InstancePlacementTargetPlacementGroupReference from the specified map of raw messages. func UnmarshalInstancePlacementTargetPlacementGroupReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPlacementGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalPlacementGroupReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileBandwidthDependent : The total bandwidth shared across the network interfaces and storage volumes of an instance with this profile depends // on its configuration. // This model "extends" InstanceProfileBandwidth type InstanceProfileBandwidthDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileBandwidthDependent.Type property. // The type for this profile field. const ( InstanceProfileBandwidthDependentTypeDependentConst = "dependent" ) func (*InstanceProfileBandwidthDependent) isaInstanceProfileBandwidth() bool { return true } // UnmarshalInstanceProfileBandwidthDependent unmarshals an instance of InstanceProfileBandwidthDependent from the specified map of raw messages. func UnmarshalInstanceProfileBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileBandwidthDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileBandwidthEnum : The permitted total bandwidth values (in megabits per second) shared across the network interfaces and storage // volumes of an instance with this profile. // This model "extends" InstanceProfileBandwidth type InstanceProfileBandwidthEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileBandwidthEnum.Type property. // The type for this profile field. const ( InstanceProfileBandwidthEnumTypeEnumConst = "enum" ) func (*InstanceProfileBandwidthEnum) isaInstanceProfileBandwidth() bool { return true } // UnmarshalInstanceProfileBandwidthEnum unmarshals an instance of InstanceProfileBandwidthEnum from the specified map of raw messages. func UnmarshalInstanceProfileBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileBandwidthEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileBandwidthFixed : The total bandwidth (in megabits per second) shared across the network interfaces and storage volumes of an instance // with this profile. // This model "extends" InstanceProfileBandwidth type InstanceProfileBandwidthFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileBandwidthFixed.Type property. // The type for this profile field. const ( InstanceProfileBandwidthFixedTypeFixedConst = "fixed" ) func (*InstanceProfileBandwidthFixed) isaInstanceProfileBandwidth() bool { return true } // UnmarshalInstanceProfileBandwidthFixed unmarshals an instance of InstanceProfileBandwidthFixed from the specified map of raw messages. func UnmarshalInstanceProfileBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileBandwidthFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileBandwidthRange : The permitted total bandwidth range (in megabits per second) shared across the network interfaces and storage volumes // of an instance with this profile. // This model "extends" InstanceProfileBandwidth type InstanceProfileBandwidthRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileBandwidthRange.Type property. // The type for this profile field. const ( InstanceProfileBandwidthRangeTypeRangeConst = "range" ) func (*InstanceProfileBandwidthRange) isaInstanceProfileBandwidth() bool { return true } // UnmarshalInstanceProfileBandwidthRange unmarshals an instance of InstanceProfileBandwidthRange from the specified map of raw messages. func UnmarshalInstanceProfileBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileBandwidthRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskQuantityDependent : The number of disks of this configuration for an instance with this profile depends on its instance configuration. // This model "extends" InstanceProfileDiskQuantity type InstanceProfileDiskQuantityDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileDiskQuantityDependent.Type property. // The type for this profile field. const ( InstanceProfileDiskQuantityDependentTypeDependentConst = "dependent" ) func (*InstanceProfileDiskQuantityDependent) isaInstanceProfileDiskQuantity() bool { return true } // UnmarshalInstanceProfileDiskQuantityDependent unmarshals an instance of InstanceProfileDiskQuantityDependent from the specified map of raw messages. func UnmarshalInstanceProfileDiskQuantityDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskQuantityDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskQuantityEnum : The permitted the number of disks of this configuration for an instance with this profile. // This model "extends" InstanceProfileDiskQuantity type InstanceProfileDiskQuantityEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileDiskQuantityEnum.Type property. // The type for this profile field. const ( InstanceProfileDiskQuantityEnumTypeEnumConst = "enum" ) func (*InstanceProfileDiskQuantityEnum) isaInstanceProfileDiskQuantity() bool { return true } // UnmarshalInstanceProfileDiskQuantityEnum unmarshals an instance of InstanceProfileDiskQuantityEnum from the specified map of raw messages. func UnmarshalInstanceProfileDiskQuantityEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskQuantityEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskQuantityFixed : The number of disks of this configuration for an instance with this profile. // This model "extends" InstanceProfileDiskQuantity type InstanceProfileDiskQuantityFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileDiskQuantityFixed.Type property. // The type for this profile field. const ( InstanceProfileDiskQuantityFixedTypeFixedConst = "fixed" ) func (*InstanceProfileDiskQuantityFixed) isaInstanceProfileDiskQuantity() bool { return true } // UnmarshalInstanceProfileDiskQuantityFixed unmarshals an instance of InstanceProfileDiskQuantityFixed from the specified map of raw messages. func UnmarshalInstanceProfileDiskQuantityFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskQuantityFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskQuantityRange : The permitted range for the number of disks of this configuration for an instance with this profile. // This model "extends" InstanceProfileDiskQuantity type InstanceProfileDiskQuantityRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileDiskQuantityRange.Type property. // The type for this profile field. const ( InstanceProfileDiskQuantityRangeTypeRangeConst = "range" ) func (*InstanceProfileDiskQuantityRange) isaInstanceProfileDiskQuantity() bool { return true } // UnmarshalInstanceProfileDiskQuantityRange unmarshals an instance of InstanceProfileDiskQuantityRange from the specified map of raw messages. func UnmarshalInstanceProfileDiskQuantityRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskQuantityRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskSizeDependent : The disk size in GB (gigabytes) of this configuration for an instance with this profile depends on its instance // configuration. // This model "extends" InstanceProfileDiskSize type InstanceProfileDiskSizeDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileDiskSizeDependent.Type property. // The type for this profile field. const ( InstanceProfileDiskSizeDependentTypeDependentConst = "dependent" ) func (*InstanceProfileDiskSizeDependent) isaInstanceProfileDiskSize() bool { return true } // UnmarshalInstanceProfileDiskSizeDependent unmarshals an instance of InstanceProfileDiskSizeDependent from the specified map of raw messages. func UnmarshalInstanceProfileDiskSizeDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskSizeDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskSizeEnum : The permitted disk size in GB (gigabytes) of this configuration for an instance with this profile. // This model "extends" InstanceProfileDiskSize type InstanceProfileDiskSizeEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileDiskSizeEnum.Type property. // The type for this profile field. const ( InstanceProfileDiskSizeEnumTypeEnumConst = "enum" ) func (*InstanceProfileDiskSizeEnum) isaInstanceProfileDiskSize() bool { return true } // UnmarshalInstanceProfileDiskSizeEnum unmarshals an instance of InstanceProfileDiskSizeEnum from the specified map of raw messages. func UnmarshalInstanceProfileDiskSizeEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskSizeEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskSizeFixed : The size of the disk in GB (gigabytes). // This model "extends" InstanceProfileDiskSize type InstanceProfileDiskSizeFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileDiskSizeFixed.Type property. // The type for this profile field. const ( InstanceProfileDiskSizeFixedTypeFixedConst = "fixed" ) func (*InstanceProfileDiskSizeFixed) isaInstanceProfileDiskSize() bool { return true } // UnmarshalInstanceProfileDiskSizeFixed unmarshals an instance of InstanceProfileDiskSizeFixed from the specified map of raw messages. func UnmarshalInstanceProfileDiskSizeFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskSizeFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileDiskSizeRange : The permitted range for the disk size of this configuration in GB (gigabytes) for an instance with this profile. // This model "extends" InstanceProfileDiskSize type InstanceProfileDiskSizeRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileDiskSizeRange.Type property. // The type for this profile field. const ( InstanceProfileDiskSizeRangeTypeRangeConst = "range" ) func (*InstanceProfileDiskSizeRange) isaInstanceProfileDiskSize() bool { return true } // UnmarshalInstanceProfileDiskSizeRange unmarshals an instance of InstanceProfileDiskSizeRange from the specified map of raw messages. func UnmarshalInstanceProfileDiskSizeRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileDiskSizeRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuDependent : The GPU count for an instance with this profile depends on its configuration. // This model "extends" InstanceProfileGpu type InstanceProfileGpuDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileGpuDependent.Type property. // The type for this profile field. const ( InstanceProfileGpuDependentTypeDependentConst = "dependent" ) func (*InstanceProfileGpuDependent) isaInstanceProfileGpu() bool { return true } // UnmarshalInstanceProfileGpuDependent unmarshals an instance of InstanceProfileGpuDependent from the specified map of raw messages. func UnmarshalInstanceProfileGpuDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuEnum : The permitted GPU count values for an instance with this profile. // This model "extends" InstanceProfileGpu type InstanceProfileGpuEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileGpuEnum.Type property. // The type for this profile field. const ( InstanceProfileGpuEnumTypeEnumConst = "enum" ) func (*InstanceProfileGpuEnum) isaInstanceProfileGpu() bool { return true } // UnmarshalInstanceProfileGpuEnum unmarshals an instance of InstanceProfileGpuEnum from the specified map of raw messages. func UnmarshalInstanceProfileGpuEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuFixed : The GPU count for an instance with this profile. // This model "extends" InstanceProfileGpu type InstanceProfileGpuFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileGpuFixed.Type property. // The type for this profile field. const ( InstanceProfileGpuFixedTypeFixedConst = "fixed" ) func (*InstanceProfileGpuFixed) isaInstanceProfileGpu() bool { return true } // UnmarshalInstanceProfileGpuFixed unmarshals an instance of InstanceProfileGpuFixed from the specified map of raw messages. func UnmarshalInstanceProfileGpuFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuMemoryDependent : The overall GPU memory value for an instance with this profile depends on its configuration. // This model "extends" InstanceProfileGpuMemory type InstanceProfileGpuMemoryDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileGpuMemoryDependent.Type property. // The type for this profile field. const ( InstanceProfileGpuMemoryDependentTypeDependentConst = "dependent" ) func (*InstanceProfileGpuMemoryDependent) isaInstanceProfileGpuMemory() bool { return true } // UnmarshalInstanceProfileGpuMemoryDependent unmarshals an instance of InstanceProfileGpuMemoryDependent from the specified map of raw messages. func UnmarshalInstanceProfileGpuMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuMemoryEnum : The permitted overall GPU memory values in GiB (gibibytes) for an instance with this profile. // This model "extends" InstanceProfileGpuMemory type InstanceProfileGpuMemoryEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileGpuMemoryEnum.Type property. // The type for this profile field. const ( InstanceProfileGpuMemoryEnumTypeEnumConst = "enum" ) func (*InstanceProfileGpuMemoryEnum) isaInstanceProfileGpuMemory() bool { return true } // UnmarshalInstanceProfileGpuMemoryEnum unmarshals an instance of InstanceProfileGpuMemoryEnum from the specified map of raw messages. func UnmarshalInstanceProfileGpuMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuMemoryFixed : The overall GPU memory in GiB (gibibytes) for an instance with this profile. // This model "extends" InstanceProfileGpuMemory type InstanceProfileGpuMemoryFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileGpuMemoryFixed.Type property. // The type for this profile field. const ( InstanceProfileGpuMemoryFixedTypeFixedConst = "fixed" ) func (*InstanceProfileGpuMemoryFixed) isaInstanceProfileGpuMemory() bool { return true } // UnmarshalInstanceProfileGpuMemoryFixed unmarshals an instance of InstanceProfileGpuMemoryFixed from the specified map of raw messages. func UnmarshalInstanceProfileGpuMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuMemoryRange : The permitted overall GPU memory range in GiB (gibibytes) for an instance with this profile. // This model "extends" InstanceProfileGpuMemory type InstanceProfileGpuMemoryRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileGpuMemoryRange.Type property. // The type for this profile field. const ( InstanceProfileGpuMemoryRangeTypeRangeConst = "range" ) func (*InstanceProfileGpuMemoryRange) isaInstanceProfileGpuMemory() bool { return true } // UnmarshalInstanceProfileGpuMemoryRange unmarshals an instance of InstanceProfileGpuMemoryRange from the specified map of raw messages. func UnmarshalInstanceProfileGpuMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileGpuRange : The permitted GPU count range for an instance with this profile. // This model "extends" InstanceProfileGpu type InstanceProfileGpuRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileGpuRange.Type property. // The type for this profile field. const ( InstanceProfileGpuRangeTypeRangeConst = "range" ) func (*InstanceProfileGpuRange) isaInstanceProfileGpu() bool { return true } // UnmarshalInstanceProfileGpuRange unmarshals an instance of InstanceProfileGpuRange from the specified map of raw messages. func UnmarshalInstanceProfileGpuRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileGpuRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileIdentityByHref : InstanceProfileIdentityByHref struct // This model "extends" InstanceProfileIdentity type InstanceProfileIdentityByHref struct { // The URL for this virtual server instance profile. Href *string `json:"href" validate:"required"` } // NewInstanceProfileIdentityByHref : Instantiate InstanceProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstanceProfileIdentityByHref(href string) (_model *InstanceProfileIdentityByHref, err error) { _model = &InstanceProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceProfileIdentityByHref) isaInstanceProfileIdentity() bool { return true } // UnmarshalInstanceProfileIdentityByHref unmarshals an instance of InstanceProfileIdentityByHref from the specified map of raw messages. func UnmarshalInstanceProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileIdentityByName : InstanceProfileIdentityByName struct // This model "extends" InstanceProfileIdentity type InstanceProfileIdentityByName struct { // The globally unique name for this virtual server instance profile. Name *string `json:"name" validate:"required"` } // NewInstanceProfileIdentityByName : Instantiate InstanceProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewInstanceProfileIdentityByName(name string) (_model *InstanceProfileIdentityByName, err error) { _model = &InstanceProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceProfileIdentityByName) isaInstanceProfileIdentity() bool { return true } // UnmarshalInstanceProfileIdentityByName unmarshals an instance of InstanceProfileIdentityByName from the specified map of raw messages. func UnmarshalInstanceProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileMemoryDependent : The memory value for an instance with this profile depends on its configuration. // This model "extends" InstanceProfileMemory type InstanceProfileMemoryDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileMemoryDependent.Type property. // The type for this profile field. const ( InstanceProfileMemoryDependentTypeDependentConst = "dependent" ) func (*InstanceProfileMemoryDependent) isaInstanceProfileMemory() bool { return true } // UnmarshalInstanceProfileMemoryDependent unmarshals an instance of InstanceProfileMemoryDependent from the specified map of raw messages. func UnmarshalInstanceProfileMemoryDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileMemoryDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileMemoryEnum : The permitted memory values (in gibibytes) for an instance with this profile. // This model "extends" InstanceProfileMemory type InstanceProfileMemoryEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileMemoryEnum.Type property. // The type for this profile field. const ( InstanceProfileMemoryEnumTypeEnumConst = "enum" ) func (*InstanceProfileMemoryEnum) isaInstanceProfileMemory() bool { return true } // UnmarshalInstanceProfileMemoryEnum unmarshals an instance of InstanceProfileMemoryEnum from the specified map of raw messages. func UnmarshalInstanceProfileMemoryEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileMemoryEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileMemoryFixed : The memory (in gibibytes) for an instance with this profile. // This model "extends" InstanceProfileMemory type InstanceProfileMemoryFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileMemoryFixed.Type property. // The type for this profile field. const ( InstanceProfileMemoryFixedTypeFixedConst = "fixed" ) func (*InstanceProfileMemoryFixed) isaInstanceProfileMemory() bool { return true } // UnmarshalInstanceProfileMemoryFixed unmarshals an instance of InstanceProfileMemoryFixed from the specified map of raw messages. func UnmarshalInstanceProfileMemoryFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileMemoryFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileMemoryRange : The permitted memory range (in gibibytes) for an instance with this profile. // This model "extends" InstanceProfileMemory type InstanceProfileMemoryRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileMemoryRange.Type property. // The type for this profile field. const ( InstanceProfileMemoryRangeTypeRangeConst = "range" ) func (*InstanceProfileMemoryRange) isaInstanceProfileMemory() bool { return true } // UnmarshalInstanceProfileMemoryRange unmarshals an instance of InstanceProfileMemoryRange from the specified map of raw messages. func UnmarshalInstanceProfileMemoryRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileMemoryRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileNetworkInterfaceCountDependent : The number of network interfaces supported on an instance with this profile is dependent on its configuration. // This model "extends" InstanceProfileNetworkInterfaceCount type InstanceProfileNetworkInterfaceCountDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileNetworkInterfaceCountDependent.Type property. // The type for this profile field. const ( InstanceProfileNetworkInterfaceCountDependentTypeDependentConst = "dependent" ) func (*InstanceProfileNetworkInterfaceCountDependent) isaInstanceProfileNetworkInterfaceCount() bool { return true } // UnmarshalInstanceProfileNetworkInterfaceCountDependent unmarshals an instance of InstanceProfileNetworkInterfaceCountDependent from the specified map of raw messages. func UnmarshalInstanceProfileNetworkInterfaceCountDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileNetworkInterfaceCountDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileNetworkInterfaceCountRange : The number of network interfaces supported on an instance with this profile. // This model "extends" InstanceProfileNetworkInterfaceCount type InstanceProfileNetworkInterfaceCountRange struct { // The maximum value for this profile field. Max *int64 `json:"max,omitempty"` // The minimum value for this profile field. Min *int64 `json:"min,omitempty"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileNetworkInterfaceCountRange.Type property. // The type for this profile field. const ( InstanceProfileNetworkInterfaceCountRangeTypeRangeConst = "range" ) func (*InstanceProfileNetworkInterfaceCountRange) isaInstanceProfileNetworkInterfaceCount() bool { return true } // UnmarshalInstanceProfileNetworkInterfaceCountRange unmarshals an instance of InstanceProfileNetworkInterfaceCountRange from the specified map of raw messages. func UnmarshalInstanceProfileNetworkInterfaceCountRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileNetworkInterfaceCountRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfilePortSpeedDependent : The port speed of each network interface of an instance with this profile depends on its configuration. // This model "extends" InstanceProfilePortSpeed type InstanceProfilePortSpeedDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfilePortSpeedDependent.Type property. // The type for this profile field. const ( InstanceProfilePortSpeedDependentTypeDependentConst = "dependent" ) func (*InstanceProfilePortSpeedDependent) isaInstanceProfilePortSpeed() bool { return true } // UnmarshalInstanceProfilePortSpeedDependent unmarshals an instance of InstanceProfilePortSpeedDependent from the specified map of raw messages. func UnmarshalInstanceProfilePortSpeedDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfilePortSpeedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfilePortSpeedFixed : The maximum speed (in megabits per second) of each network interface of an instance with this profile. // This model "extends" InstanceProfilePortSpeed type InstanceProfilePortSpeedFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfilePortSpeedFixed.Type property. // The type for this profile field. const ( InstanceProfilePortSpeedFixedTypeFixedConst = "fixed" ) func (*InstanceProfilePortSpeedFixed) isaInstanceProfilePortSpeed() bool { return true } // UnmarshalInstanceProfilePortSpeedFixed unmarshals an instance of InstanceProfilePortSpeedFixed from the specified map of raw messages. func UnmarshalInstanceProfilePortSpeedFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfilePortSpeedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVcpuDependent : The VCPU count for an instance with this profile depends on its configuration. // This model "extends" InstanceProfileVcpu type InstanceProfileVcpuDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileVcpuDependent.Type property. // The type for this profile field. const ( InstanceProfileVcpuDependentTypeDependentConst = "dependent" ) func (*InstanceProfileVcpuDependent) isaInstanceProfileVcpu() bool { return true } // UnmarshalInstanceProfileVcpuDependent unmarshals an instance of InstanceProfileVcpuDependent from the specified map of raw messages. func UnmarshalInstanceProfileVcpuDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVcpuDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVcpuEnum : The permitted values for VCPU count for an instance with this profile. // This model "extends" InstanceProfileVcpu type InstanceProfileVcpuEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileVcpuEnum.Type property. // The type for this profile field. const ( InstanceProfileVcpuEnumTypeEnumConst = "enum" ) func (*InstanceProfileVcpuEnum) isaInstanceProfileVcpu() bool { return true } // UnmarshalInstanceProfileVcpuEnum unmarshals an instance of InstanceProfileVcpuEnum from the specified map of raw messages. func UnmarshalInstanceProfileVcpuEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVcpuEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVcpuFixed : The VCPU count for an instance with this profile. // This model "extends" InstanceProfileVcpu type InstanceProfileVcpuFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileVcpuFixed.Type property. // The type for this profile field. const ( InstanceProfileVcpuFixedTypeFixedConst = "fixed" ) func (*InstanceProfileVcpuFixed) isaInstanceProfileVcpu() bool { return true } // UnmarshalInstanceProfileVcpuFixed unmarshals an instance of InstanceProfileVcpuFixed from the specified map of raw messages. func UnmarshalInstanceProfileVcpuFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVcpuFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVcpuRange : The permitted range for VCPU count for an instance with this profile. // This model "extends" InstanceProfileVcpu type InstanceProfileVcpuRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileVcpuRange.Type property. // The type for this profile field. const ( InstanceProfileVcpuRangeTypeRangeConst = "range" ) func (*InstanceProfileVcpuRange) isaInstanceProfileVcpu() bool { return true } // UnmarshalInstanceProfileVcpuRange unmarshals an instance of InstanceProfileVcpuRange from the specified map of raw messages. func UnmarshalInstanceProfileVcpuRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVcpuRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVolumeBandwidthDependent : The storage bandwidth shared across the storage volumes of an instance with this profile depends on its // configuration. // This model "extends" InstanceProfileVolumeBandwidth type InstanceProfileVolumeBandwidthDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileVolumeBandwidthDependent.Type property. // The type for this profile field. const ( InstanceProfileVolumeBandwidthDependentTypeDependentConst = "dependent" ) func (*InstanceProfileVolumeBandwidthDependent) isaInstanceProfileVolumeBandwidth() bool { return true } // UnmarshalInstanceProfileVolumeBandwidthDependent unmarshals an instance of InstanceProfileVolumeBandwidthDependent from the specified map of raw messages. func UnmarshalInstanceProfileVolumeBandwidthDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVolumeBandwidthDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVolumeBandwidthEnum : The permitted storage bandwidth values (in megabits per second) shared across the storage volumes of an instance with // this profile. // This model "extends" InstanceProfileVolumeBandwidth type InstanceProfileVolumeBandwidthEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the InstanceProfileVolumeBandwidthEnum.Type property. // The type for this profile field. const ( InstanceProfileVolumeBandwidthEnumTypeEnumConst = "enum" ) func (*InstanceProfileVolumeBandwidthEnum) isaInstanceProfileVolumeBandwidth() bool { return true } // UnmarshalInstanceProfileVolumeBandwidthEnum unmarshals an instance of InstanceProfileVolumeBandwidthEnum from the specified map of raw messages. func UnmarshalInstanceProfileVolumeBandwidthEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVolumeBandwidthEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVolumeBandwidthFixed : The storage bandwidth (in megabits per second) shared across the storage volumes of an instance with this profile. // This model "extends" InstanceProfileVolumeBandwidth type InstanceProfileVolumeBandwidthFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the InstanceProfileVolumeBandwidthFixed.Type property. // The type for this profile field. const ( InstanceProfileVolumeBandwidthFixedTypeFixedConst = "fixed" ) func (*InstanceProfileVolumeBandwidthFixed) isaInstanceProfileVolumeBandwidth() bool { return true } // UnmarshalInstanceProfileVolumeBandwidthFixed unmarshals an instance of InstanceProfileVolumeBandwidthFixed from the specified map of raw messages. func UnmarshalInstanceProfileVolumeBandwidthFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVolumeBandwidthFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceProfileVolumeBandwidthRange : The permitted storage bandwidth range (in megabits per second) shared across the storage volumes of an instance with // this profile. // This model "extends" InstanceProfileVolumeBandwidth type InstanceProfileVolumeBandwidthRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the InstanceProfileVolumeBandwidthRange.Type property. // The type for this profile field. const ( InstanceProfileVolumeBandwidthRangeTypeRangeConst = "range" ) func (*InstanceProfileVolumeBandwidthRange) isaInstanceProfileVolumeBandwidth() bool { return true } // UnmarshalInstanceProfileVolumeBandwidthRange unmarshals an instance of InstanceProfileVolumeBandwidthRange from the specified map of raw messages. func UnmarshalInstanceProfileVolumeBandwidthRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceProfileVolumeBandwidthRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePrototypeInstanceByCatalogOffering : Create an instance by using a catalog offering. // This model "extends" InstancePrototype type InstancePrototypeInstanceByCatalogOffering struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this virtual server instance. The name must not be used by another virtual server instance in the // region. If unspecified, the name will be a hyphenated list of randomly-selected words. // // The system hostname will be based on this name. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering // or offering version to use when provisioning this virtual server instance. // // If an offering is specified, the latest version of that offering will be used. // // The specified offering or offering version may be in a different account in the same // [enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise), subject // to IAM policies. CatalogOffering InstanceCatalogOfferingPrototypeIntf `json:"catalog_offering" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstancePrototypeInstanceByCatalogOffering : Instantiate InstancePrototypeInstanceByCatalogOffering (Generic Model Constructor) func (*VpcbetaV1) NewInstancePrototypeInstanceByCatalogOffering(catalogOffering InstanceCatalogOfferingPrototypeIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstancePrototypeInstanceByCatalogOffering, err error) { _model = &InstancePrototypeInstanceByCatalogOffering{ CatalogOffering: catalogOffering, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePrototypeInstanceByCatalogOffering) isaInstancePrototype() bool { return true } // UnmarshalInstancePrototypeInstanceByCatalogOffering unmarshals an instance of InstancePrototypeInstanceByCatalogOffering from the specified map of raw messages. func UnmarshalInstancePrototypeInstanceByCatalogOffering(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePrototypeInstanceByCatalogOffering) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePrototypeInstanceByImage : Create an instance by using an image. // This model "extends" InstancePrototype type InstancePrototypeInstanceByImage struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this virtual server instance. The name must not be used by another virtual server instance in the // region. If unspecified, the name will be a hyphenated list of randomly-selected words. // // The system hostname will be based on this name. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The image to use when provisioning the virtual server instance. Image ImageIdentityIntf `json:"image" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstancePrototypeInstanceByImage : Instantiate InstancePrototypeInstanceByImage (Generic Model Constructor) func (*VpcbetaV1) NewInstancePrototypeInstanceByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstancePrototypeInstanceByImage, err error) { _model = &InstancePrototypeInstanceByImage{ Image: image, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePrototypeInstanceByImage) isaInstancePrototype() bool { return true } // UnmarshalInstancePrototypeInstanceByImage unmarshals an instance of InstancePrototypeInstanceByImage from the specified map of raw messages. func UnmarshalInstancePrototypeInstanceByImage(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePrototypeInstanceByImage) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePrototypeInstanceBySourceSnapshot : Create an instance by using a snapshot. // This model "extends" InstancePrototype type InstancePrototypeInstanceBySourceSnapshot struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this virtual server instance. The name must not be used by another virtual server instance in the // region. If unspecified, the name will be a hyphenated list of randomly-selected words. // // The system hostname will be based on this name. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext `json:"boot_volume_attachment" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstancePrototypeInstanceBySourceSnapshot : Instantiate InstancePrototypeInstanceBySourceSnapshot (Generic Model Constructor) func (*VpcbetaV1) NewInstancePrototypeInstanceBySourceSnapshot(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstancePrototypeInstanceBySourceSnapshot, err error) { _model = &InstancePrototypeInstanceBySourceSnapshot{ BootVolumeAttachment: bootVolumeAttachment, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePrototypeInstanceBySourceSnapshot) isaInstancePrototype() bool { return true } // UnmarshalInstancePrototypeInstanceBySourceSnapshot unmarshals an instance of InstancePrototypeInstanceBySourceSnapshot from the specified map of raw messages. func UnmarshalInstancePrototypeInstanceBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePrototypeInstanceBySourceSnapshot) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePrototypeInstanceBySourceTemplate : Create an instance by using an instance template. // // The `primary_network_interface` and `network_interfaces` properties may only be specified if // `primary_network_interface` is specified in the source template. // This model "extends" InstancePrototype type InstancePrototypeInstanceBySourceTemplate struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this virtual server instance. The name must not be used by another virtual server instance in the // region. If unspecified, the name will be a hyphenated list of randomly-selected words. // // The system hostname will be based on this name. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) // offering version to use when provisioning this virtual server instance. // If an offering is specified, the latest version of that offering will be used. // // The specified offering or offering version may be in a different account, subject to // IAM policies. // // If specified, `image` must not be specified, and `source_template` must not have // `image` specified. CatalogOffering InstanceCatalogOfferingPrototypeIntf `json:"catalog_offering,omitempty"` // The image to use when provisioning the virtual server instance. Image ImageIdentityIntf `json:"image,omitempty"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` // The template to create this virtual server instance from. SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } // NewInstancePrototypeInstanceBySourceTemplate : Instantiate InstancePrototypeInstanceBySourceTemplate (Generic Model Constructor) func (*VpcbetaV1) NewInstancePrototypeInstanceBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (_model *InstancePrototypeInstanceBySourceTemplate, err error) { _model = &InstancePrototypeInstanceBySourceTemplate{ SourceTemplate: sourceTemplate, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePrototypeInstanceBySourceTemplate) isaInstancePrototype() bool { return true } // UnmarshalInstancePrototypeInstanceBySourceTemplate unmarshals an instance of InstancePrototypeInstanceBySourceTemplate from the specified map of raw messages. func UnmarshalInstancePrototypeInstanceBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePrototypeInstanceBySourceTemplate) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePrototypeInstanceByVolume : Create an instance by using a boot volume. // This model "extends" InstancePrototype type InstancePrototypeInstanceByVolume struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this virtual server instance. The name must not be used by another virtual server instance in the // region. If unspecified, the name will be a hyphenated list of randomly-selected words. // // The system hostname will be based on this name. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByVolumeContext `json:"boot_volume_attachment" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstancePrototypeInstanceByVolume : Instantiate InstancePrototypeInstanceByVolume (Generic Model Constructor) func (*VpcbetaV1) NewInstancePrototypeInstanceByVolume(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceByVolumeContext, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstancePrototypeInstanceByVolume, err error) { _model = &InstancePrototypeInstanceByVolume{ BootVolumeAttachment: bootVolumeAttachment, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePrototypeInstanceByVolume) isaInstancePrototype() bool { return true } // UnmarshalInstancePrototypeInstanceByVolume unmarshals an instance of InstancePrototypeInstanceByVolume from the specified map of raw messages. func UnmarshalInstancePrototypeInstanceByVolume(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePrototypeInstanceByVolume) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByVolumeContext) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplateIdentityByCRN : InstanceTemplateIdentityByCRN struct // This model "extends" InstanceTemplateIdentity type InstanceTemplateIdentityByCRN struct { // The CRN for this instance template. CRN *string `json:"crn" validate:"required"` } // NewInstanceTemplateIdentityByCRN : Instantiate InstanceTemplateIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplateIdentityByCRN(crn string) (_model *InstanceTemplateIdentityByCRN, err error) { _model = &InstanceTemplateIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplateIdentityByCRN) isaInstanceTemplateIdentity() bool { return true } // UnmarshalInstanceTemplateIdentityByCRN unmarshals an instance of InstanceTemplateIdentityByCRN from the specified map of raw messages. func UnmarshalInstanceTemplateIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplateIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplateIdentityByHref : InstanceTemplateIdentityByHref struct // This model "extends" InstanceTemplateIdentity type InstanceTemplateIdentityByHref struct { // The URL for this instance template. Href *string `json:"href" validate:"required"` } // NewInstanceTemplateIdentityByHref : Instantiate InstanceTemplateIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplateIdentityByHref(href string) (_model *InstanceTemplateIdentityByHref, err error) { _model = &InstanceTemplateIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplateIdentityByHref) isaInstanceTemplateIdentity() bool { return true } // UnmarshalInstanceTemplateIdentityByHref unmarshals an instance of InstanceTemplateIdentityByHref from the specified map of raw messages. func UnmarshalInstanceTemplateIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplateIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplateIdentityByID : InstanceTemplateIdentityByID struct // This model "extends" InstanceTemplateIdentity type InstanceTemplateIdentityByID struct { // The unique identifier for this instance template. ID *string `json:"id" validate:"required"` } // NewInstanceTemplateIdentityByID : Instantiate InstanceTemplateIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplateIdentityByID(id string) (_model *InstanceTemplateIdentityByID, err error) { _model = &InstanceTemplateIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplateIdentityByID) isaInstanceTemplateIdentity() bool { return true } // UnmarshalInstanceTemplateIdentityByID unmarshals an instance of InstanceTemplateIdentityByID from the specified map of raw messages. func UnmarshalInstanceTemplateIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplateIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplatePrototypeInstanceTemplateByCatalogOffering : Create an instance template that creates instances by using a catalog offering. // This model "extends" InstanceTemplatePrototype type InstanceTemplatePrototypeInstanceTemplateByCatalogOffering struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name must not be used by another instance template in the region. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering // or offering version to use when provisioning this virtual server instance. // // If an offering is specified, the latest version of that offering will be used. // // The specified offering or offering version may be in a different account in the same // [enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise), subject // to IAM policies. CatalogOffering InstanceCatalogOfferingPrototypeIntf `json:"catalog_offering" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstanceTemplatePrototypeInstanceTemplateByCatalogOffering : Instantiate InstanceTemplatePrototypeInstanceTemplateByCatalogOffering (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplatePrototypeInstanceTemplateByCatalogOffering(catalogOffering InstanceCatalogOfferingPrototypeIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstanceTemplatePrototypeInstanceTemplateByCatalogOffering, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateByCatalogOffering{ CatalogOffering: catalogOffering, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplatePrototypeInstanceTemplateByCatalogOffering) isaInstanceTemplatePrototype() bool { return true } // UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOffering unmarshals an instance of InstanceTemplatePrototypeInstanceTemplateByCatalogOffering from the specified map of raw messages. func UnmarshalInstanceTemplatePrototypeInstanceTemplateByCatalogOffering(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplatePrototypeInstanceTemplateByCatalogOffering) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplatePrototypeInstanceTemplateByImage : Create an instance template that creates instances by using an image. // This model "extends" InstanceTemplatePrototype type InstanceTemplatePrototypeInstanceTemplateByImage struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name must not be used by another instance template in the region. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The image to use when provisioning the virtual server instance. Image ImageIdentityIntf `json:"image" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstanceTemplatePrototypeInstanceTemplateByImage : Instantiate InstanceTemplatePrototypeInstanceTemplateByImage (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplatePrototypeInstanceTemplateByImage(image ImageIdentityIntf, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstanceTemplatePrototypeInstanceTemplateByImage, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateByImage{ Image: image, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplatePrototypeInstanceTemplateByImage) isaInstanceTemplatePrototype() bool { return true } // UnmarshalInstanceTemplatePrototypeInstanceTemplateByImage unmarshals an instance of InstanceTemplatePrototypeInstanceTemplateByImage from the specified map of raw messages. func UnmarshalInstanceTemplatePrototypeInstanceTemplateByImage(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplatePrototypeInstanceTemplateByImage) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot : Create an instance template that creates instances by using a snapshot. // This model "extends" InstanceTemplatePrototype type InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name must not be used by another instance template in the region. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext `json:"boot_volume_attachment" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot : Instantiate InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(bootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext, primaryNetworkInterface *NetworkInterfacePrototype, zone ZoneIdentityIntf) (_model *InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot{ BootVolumeAttachment: bootVolumeAttachment, PrimaryNetworkInterface: primaryNetworkInterface, Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot) isaInstanceTemplatePrototype() bool { return true } // UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot unmarshals an instance of InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot from the specified map of raw messages. func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplatePrototypeInstanceTemplateBySourceSnapshot) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplatePrototypeInstanceTemplateBySourceTemplate : Create an instance template from an existing instance template. // This model "extends" InstanceTemplatePrototype type InstanceTemplatePrototypeInstanceTemplateBySourceTemplate struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name must not be used by another instance template in the region. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) // offering version to use when provisioning this virtual server instance. // If an offering is specified, the latest version of that offering will be used. // // The specified offering or offering version may be in a different account, subject to // IAM policies. // // If specified, `image` must not be specified, and `source_template` must not have // `image` specified. CatalogOffering InstanceCatalogOfferingPrototypeIntf `json:"catalog_offering,omitempty"` // The image to use when provisioning the virtual server instance. Image ImageIdentityIntf `json:"image,omitempty"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` // The template to create this virtual server instance from. SourceTemplate InstanceTemplateIdentityIntf `json:"source_template" validate:"required"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } // NewInstanceTemplatePrototypeInstanceTemplateBySourceTemplate : Instantiate InstanceTemplatePrototypeInstanceTemplateBySourceTemplate (Generic Model Constructor) func (*VpcbetaV1) NewInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(sourceTemplate InstanceTemplateIdentityIntf) (_model *InstanceTemplatePrototypeInstanceTemplateBySourceTemplate, err error) { _model = &InstanceTemplatePrototypeInstanceTemplateBySourceTemplate{ SourceTemplate: sourceTemplate, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceTemplatePrototypeInstanceTemplateBySourceTemplate) isaInstanceTemplatePrototype() bool { return true } // UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceTemplate unmarshals an instance of InstanceTemplatePrototypeInstanceTemplateBySourceTemplate from the specified map of raw messages. func UnmarshalInstanceTemplatePrototypeInstanceTemplateBySourceTemplate(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplatePrototypeInstanceTemplateBySourceTemplate) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "source_template", &obj.SourceTemplate, UnmarshalInstanceTemplateIdentity) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext : Create an instance by using a catalog offering. // This model "extends" InstanceTemplate type InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The date and time that the instance template was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The CRN for this instance template. CRN *string `json:"crn" validate:"required"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The URL for this instance template. Href *string `json:"href" validate:"required"` // The unique identifier for this instance template. ID *string `json:"id" validate:"required"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name is unique across all instance templates in the region. Name *string `json:"name" validate:"required"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` // The resource group for this instance template. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user) offering // or offering version to use when provisioning this virtual server instance. // // If an offering is specified, the latest version of that offering will be used. // // The specified offering or offering version may be in a different account in the same // [enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise), subject // to IAM policies. CatalogOffering InstanceCatalogOfferingPrototypeIntf `json:"catalog_offering" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } func (*InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext) isaInstanceTemplate() bool { return true } // UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext unmarshals an instance of InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext from the specified map of raw messages. func UnmarshalInstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplateInstanceByCatalogOfferingInstanceTemplateContext) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "catalog_offering", &obj.CatalogOffering, UnmarshalInstanceCatalogOfferingPrototype) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplateInstanceByImageInstanceTemplateContext : Create an instance by using an image. // This model "extends" InstanceTemplate type InstanceTemplateInstanceByImageInstanceTemplateContext struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The date and time that the instance template was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The CRN for this instance template. CRN *string `json:"crn" validate:"required"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The URL for this instance template. Href *string `json:"href" validate:"required"` // The unique identifier for this instance template. ID *string `json:"id" validate:"required"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name is unique across all instance templates in the region. Name *string `json:"name" validate:"required"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` // The resource group for this instance template. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceByImageContext `json:"boot_volume_attachment,omitempty"` // The image to use when provisioning the virtual server instance. Image ImageIdentityIntf `json:"image" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } func (*InstanceTemplateInstanceByImageInstanceTemplateContext) isaInstanceTemplate() bool { return true } // UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContext unmarshals an instance of InstanceTemplateInstanceByImageInstanceTemplateContext from the specified map of raw messages. func UnmarshalInstanceTemplateInstanceByImageInstanceTemplateContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplateInstanceByImageInstanceTemplateContext) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceByImageContext) if err != nil { return } err = core.UnmarshalModel(m, "image", &obj.Image, UnmarshalImageIdentity) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext : Create an instance by using a snapshot. // This model "extends" InstanceTemplate type InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext struct { // The availability policy to use for this virtual server instance. AvailabilityPolicy *InstanceAvailabilityPolicyPrototype `json:"availability_policy,omitempty"` // The date and time that the instance template was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The CRN for this instance template. CRN *string `json:"crn" validate:"required"` // The default trusted profile configuration to use for this virtual server instance // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. DefaultTrustedProfile *InstanceDefaultTrustedProfilePrototype `json:"default_trusted_profile,omitempty"` // The URL for this instance template. Href *string `json:"href" validate:"required"` // The unique identifier for this instance template. ID *string `json:"id" validate:"required"` // The public SSH keys for the administrative user of the virtual server instance. Keys will be made available to the // virtual server instance as cloud-init vendor data. For cloud-init enabled images, these keys will also be added as // SSH authorized keys for the administrative user. // // For Windows images, the keys of type `rsa` must be specified, and one will be selected to encrypt [the administrator // password](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization). Keys are optional for other images, but if // no keys are specified, the instance will be inaccessible unless the specified image provides another means of // access. // // This property's value is used when provisioning the virtual server instance, but not subsequently managed. // Accordingly, it is reflected as an [instance // initialization](https://cloud.ibm.com/apidocs/vpc#get-instance-initialization) property. Keys []KeyIdentityIntf `json:"keys,omitempty"` MetadataService *InstanceMetadataServicePrototype `json:"metadata_service,omitempty"` // The name for this instance template. The name is unique across all instance templates in the region. Name *string `json:"name" validate:"required"` // The placement restrictions to use for the virtual server instance. PlacementTarget InstancePlacementTargetPrototypeIntf `json:"placement_target,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-profiles) to use for this virtual server instance. // // If unspecified, `bx2-2x8` will be used, but this default value is expected to change in the future. Profile InstanceProfileIdentityIntf `json:"profile,omitempty"` // The resource group for this instance template. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The amount of bandwidth (in megabits per second) allocated exclusively to instance storage volumes. An increase in // this value will result in a corresponding decrease to // `total_network_bandwidth`. TotalVolumeBandwidth *int64 `json:"total_volume_bandwidth,omitempty"` // [User data](https://cloud.ibm.com/docs/vpc?topic=vpc-user-data) to make available when setting up the virtual server // instance. UserData *string `json:"user_data,omitempty"` // The additional volume attachments to create for the virtual server instance. VolumeAttachments []VolumeAttachmentPrototype `json:"volume_attachments,omitempty"` // The VPC this virtual server instance will reside in. // // If specified, it must match the VPC for the subnets of the instance network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The boot volume attachment to create for the virtual server instance. BootVolumeAttachment *VolumeAttachmentPrototypeInstanceBySourceSnapshotContext `json:"boot_volume_attachment" validate:"required"` // The additional instance network interfaces to create. NetworkInterfaces []NetworkInterfacePrototype `json:"network_interfaces,omitempty"` // The primary instance network interface to create. PrimaryNetworkInterface *NetworkInterfacePrototype `json:"primary_network_interface,omitempty"` // The zone this virtual server instance will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } func (*InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext) isaInstanceTemplate() bool { return true } // UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext unmarshals an instance of InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext from the specified map of raw messages. func UnmarshalInstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceTemplateInstanceBySourceSnapshotInstanceTemplateContext) err = core.UnmarshalModel(m, "availability_policy", &obj.AvailabilityPolicy, UnmarshalInstanceAvailabilityPolicyPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "default_trusted_profile", &obj.DefaultTrustedProfile, UnmarshalInstanceDefaultTrustedProfilePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "keys", &obj.Keys, UnmarshalKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "metadata_service", &obj.MetadataService, UnmarshalInstanceMetadataServicePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "placement_target", &obj.PlacementTarget, UnmarshalInstancePlacementTargetPrototype) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalInstanceProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_volume_bandwidth", &obj.TotalVolumeBandwidth) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_data", &obj.UserData) if err != nil { return } err = core.UnmarshalModel(m, "volume_attachments", &obj.VolumeAttachments, UnmarshalVolumeAttachmentPrototype) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "boot_volume_attachment", &obj.BootVolumeAttachment, UnmarshalVolumeAttachmentPrototypeInstanceBySourceSnapshotContext) if err != nil { return } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "primary_network_interface", &obj.PrimaryNetworkInterface, UnmarshalNetworkInterfacePrototype) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // KeyIdentityByCRN : KeyIdentityByCRN struct // This model "extends" KeyIdentity type KeyIdentityByCRN struct { // The CRN for this key. CRN *string `json:"crn" validate:"required"` } // NewKeyIdentityByCRN : Instantiate KeyIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewKeyIdentityByCRN(crn string) (_model *KeyIdentityByCRN, err error) { _model = &KeyIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*KeyIdentityByCRN) isaKeyIdentity() bool { return true } // UnmarshalKeyIdentityByCRN unmarshals an instance of KeyIdentityByCRN from the specified map of raw messages. func UnmarshalKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(KeyIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // KeyIdentityByFingerprint : KeyIdentityByFingerprint struct // This model "extends" KeyIdentity type KeyIdentityByFingerprint struct { // The fingerprint for this key. The value is returned base64-encoded and prefixed with the hash algorithm (always // `SHA256`). Fingerprint *string `json:"fingerprint" validate:"required"` } // NewKeyIdentityByFingerprint : Instantiate KeyIdentityByFingerprint (Generic Model Constructor) func (*VpcbetaV1) NewKeyIdentityByFingerprint(fingerprint string) (_model *KeyIdentityByFingerprint, err error) { _model = &KeyIdentityByFingerprint{ Fingerprint: core.StringPtr(fingerprint), } err = core.ValidateStruct(_model, "required parameters") return } func (*KeyIdentityByFingerprint) isaKeyIdentity() bool { return true } // UnmarshalKeyIdentityByFingerprint unmarshals an instance of KeyIdentityByFingerprint from the specified map of raw messages. func UnmarshalKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(KeyIdentityByFingerprint) err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // KeyIdentityByHref : KeyIdentityByHref struct // This model "extends" KeyIdentity type KeyIdentityByHref struct { // The URL for this key. Href *string `json:"href" validate:"required"` } // NewKeyIdentityByHref : Instantiate KeyIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewKeyIdentityByHref(href string) (_model *KeyIdentityByHref, err error) { _model = &KeyIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*KeyIdentityByHref) isaKeyIdentity() bool { return true } // UnmarshalKeyIdentityByHref unmarshals an instance of KeyIdentityByHref from the specified map of raw messages. func UnmarshalKeyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(KeyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // KeyIdentityByID : KeyIdentityByID struct // This model "extends" KeyIdentity type KeyIdentityByID struct { // The unique identifier for this key. ID *string `json:"id" validate:"required"` } // NewKeyIdentityByID : Instantiate KeyIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewKeyIdentityByID(id string) (_model *KeyIdentityByID, err error) { _model = &KeyIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*KeyIdentityByID) isaKeyIdentity() bool { return true } // UnmarshalKeyIdentityByID unmarshals an instance of KeyIdentityByID from the specified map of raw messages. func UnmarshalKeyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(KeyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName : LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName struct // This model "extends" LegacyCloudObjectStorageBucketIdentity type LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName struct { // The globally unique name of this Cloud Object Storage bucket. Name *string `json:"name" validate:"required"` } // NewLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName : Instantiate LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(name string) (_model *LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName, err error) { _model = &LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) isaLegacyCloudObjectStorageBucketIdentity() bool { return true } // UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName unmarshals an instance of LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName from the specified map of raw messages. func UnmarshalLegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LegacyCloudObjectStorageBucketIdentityCloudObjectStorageBucketIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerIdentityByCRN : LoadBalancerIdentityByCRN struct // This model "extends" LoadBalancerIdentity type LoadBalancerIdentityByCRN struct { // The load balancer's CRN. CRN *string `json:"crn" validate:"required"` } // NewLoadBalancerIdentityByCRN : Instantiate LoadBalancerIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerIdentityByCRN(crn string) (_model *LoadBalancerIdentityByCRN, err error) { _model = &LoadBalancerIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerIdentityByCRN) isaLoadBalancerIdentity() bool { return true } // UnmarshalLoadBalancerIdentityByCRN unmarshals an instance of LoadBalancerIdentityByCRN from the specified map of raw messages. func UnmarshalLoadBalancerIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerIdentityByHref : LoadBalancerIdentityByHref struct // This model "extends" LoadBalancerIdentity type LoadBalancerIdentityByHref struct { // The load balancer's canonical URL. Href *string `json:"href" validate:"required"` } // NewLoadBalancerIdentityByHref : Instantiate LoadBalancerIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerIdentityByHref(href string) (_model *LoadBalancerIdentityByHref, err error) { _model = &LoadBalancerIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerIdentityByHref) isaLoadBalancerIdentity() bool { return true } // UnmarshalLoadBalancerIdentityByHref unmarshals an instance of LoadBalancerIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerIdentityByID : LoadBalancerIdentityByID struct // This model "extends" LoadBalancerIdentity type LoadBalancerIdentityByID struct { // The unique identifier for this load balancer. ID *string `json:"id" validate:"required"` } // NewLoadBalancerIdentityByID : Instantiate LoadBalancerIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerIdentityByID(id string) (_model *LoadBalancerIdentityByID, err error) { _model = &LoadBalancerIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerIdentityByID) isaLoadBalancerIdentity() bool { return true } // UnmarshalLoadBalancerIdentityByID unmarshals an instance of LoadBalancerIdentityByID from the specified map of raw messages. func UnmarshalLoadBalancerIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerIdentityByHref : LoadBalancerListenerIdentityByHref struct // This model "extends" LoadBalancerListenerIdentity type LoadBalancerListenerIdentityByHref struct { // The listener's canonical URL. Href *string `json:"href" validate:"required"` } // NewLoadBalancerListenerIdentityByHref : Instantiate LoadBalancerListenerIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerIdentityByHref(href string) (_model *LoadBalancerListenerIdentityByHref, err error) { _model = &LoadBalancerListenerIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerIdentityByHref) isaLoadBalancerListenerIdentity() bool { return true } // UnmarshalLoadBalancerListenerIdentityByHref unmarshals an instance of LoadBalancerListenerIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerListenerIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerIdentityByID : LoadBalancerListenerIdentityByID struct // This model "extends" LoadBalancerListenerIdentity type LoadBalancerListenerIdentityByID struct { // The unique identifier for this load balancer listener. ID *string `json:"id" validate:"required"` } // NewLoadBalancerListenerIdentityByID : Instantiate LoadBalancerListenerIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerIdentityByID(id string) (_model *LoadBalancerListenerIdentityByID, err error) { _model = &LoadBalancerListenerIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerIdentityByID) isaLoadBalancerListenerIdentity() bool { return true } // UnmarshalLoadBalancerListenerIdentityByID unmarshals an instance of LoadBalancerListenerIdentityByID from the specified map of raw messages. func UnmarshalLoadBalancerListenerIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch : LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch struct // This model "extends" LoadBalancerListenerPolicyTargetPatch type LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch struct { // The HTTP status code for this redirect. HTTPStatusCode *int64 `json:"http_status_code,omitempty"` // Identifies a load balancer listener by a unique property. Listener LoadBalancerListenerIdentityIntf `json:"listener,omitempty"` // The redirect relative target URI. URI *string `json:"uri,omitempty"` } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch) isaLoadBalancerListenerPolicyTargetPatch() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerHTTPSRedirectPatch) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch : LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch struct // This model "extends" LoadBalancerListenerPolicyTargetPatch type LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch struct { // The HTTP status code for this redirect. HTTPStatusCode *int64 `json:"http_status_code,omitempty"` // The redirect target URL. URL *string `json:"url,omitempty"` } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch) isaLoadBalancerListenerPolicyTargetPatch() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerListenerPolicyRedirectURLPatch) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity : Identifies a load balancer pool by a unique property. // Models which "extend" this model: // - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID // - LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref // This model "extends" LoadBalancerListenerPolicyTargetPatch type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity struct { // The unique identifier for this load balancer pool. ID *string `json:"id,omitempty"` // The pool's canonical URL. Href *string `json:"href,omitempty"` } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool { return true } type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityIntf interface { LoadBalancerListenerPolicyTargetPatchIntf isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPatch() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype struct // This model "extends" LoadBalancerListenerPolicyTargetPrototype type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype struct { // The HTTP status code for this redirect. HTTPStatusCode *int64 `json:"http_status_code" validate:"required"` // Identifies a load balancer listener by a unique property. Listener LoadBalancerListenerIdentityIntf `json:"listener" validate:"required"` // The redirect relative target URI. URI *string `json:"uri,omitempty"` } // NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype(httpStatusCode int64, listener LoadBalancerListenerIdentityIntf) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype, err error) { _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype{ HTTPStatusCode: core.Int64Ptr(httpStatusCode), Listener: listener, } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype) isaLoadBalancerListenerPolicyTargetPrototype() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerHTTPSRedirectPrototype) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype struct // This model "extends" LoadBalancerListenerPolicyTargetPrototype type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype struct { // The HTTP status code for this redirect. HTTPStatusCode *int64 `json:"http_status_code" validate:"required"` // The redirect target URL. URL *string `json:"url" validate:"required"` } // NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(httpStatusCode int64, url string) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype, err error) { _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype{ HTTPStatusCode: core.Int64Ptr(httpStatusCode), URL: core.StringPtr(url), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype) isaLoadBalancerListenerPolicyTargetPrototype() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerListenerPolicyRedirectURLPrototype) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity : Identifies a load balancer pool by a unique property. // Models which "extend" this model: // - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID // - LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref // This model "extends" LoadBalancerListenerPolicyTargetPrototype type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity struct { // The unique identifier for this load balancer pool. ID *string `json:"id,omitempty"` // The pool's canonical URL. Href *string `json:"href,omitempty"` } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool { return true } type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityIntf interface { LoadBalancerListenerPolicyTargetPrototypeIntf isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) isaLoadBalancerListenerPolicyTargetPrototype() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect : LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect struct // This model "extends" LoadBalancerListenerPolicyTarget type LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect struct { // The HTTP status code for this redirect. HTTPStatusCode *int64 `json:"http_status_code" validate:"required"` Listener *LoadBalancerListenerReference `json:"listener" validate:"required"` // The redirect relative target URI. URI *string `json:"uri,omitempty"` } func (*LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect) isaLoadBalancerListenerPolicyTarget() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerHTTPSRedirect) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return } err = core.UnmarshalModel(m, "listener", &obj.Listener, UnmarshalLoadBalancerListenerReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "uri", &obj.URI) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct // This model "extends" LoadBalancerListenerPolicyTarget type LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct { // The HTTP status code for this redirect. HTTPStatusCode *int64 `json:"http_status_code" validate:"required"` // The redirect target URL. URL *string `json:"url" validate:"required"` } func (*LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) isaLoadBalancerListenerPolicyTarget() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return } err = core.UnmarshalPrimitive(m, "url", &obj.URL) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetLoadBalancerPoolReference : LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct // This model "extends" LoadBalancerListenerPolicyTarget type LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *LoadBalancerPoolReferenceDeleted `json:"deleted,omitempty"` // The pool's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this load balancer pool. ID *string `json:"id" validate:"required"` // The name for this load balancer pool. The name is unique across all pools for the load balancer. Name *string `json:"name" validate:"required"` } func (*LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) isaLoadBalancerListenerPolicyTarget() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerPoolReference from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerPoolReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolIdentityByHref : LoadBalancerPoolIdentityByHref struct // This model "extends" LoadBalancerPoolIdentity type LoadBalancerPoolIdentityByHref struct { // The pool's canonical URL. Href *string `json:"href" validate:"required"` } // NewLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerPoolIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerPoolIdentityByHref(href string) (_model *LoadBalancerPoolIdentityByHref, err error) { _model = &LoadBalancerPoolIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerPoolIdentityByHref) isaLoadBalancerPoolIdentity() bool { return true } // UnmarshalLoadBalancerPoolIdentityByHref unmarshals an instance of LoadBalancerPoolIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerPoolIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolIdentityByID : LoadBalancerPoolIdentityByID struct // This model "extends" LoadBalancerPoolIdentity type LoadBalancerPoolIdentityByID struct { // The unique identifier for this load balancer pool. ID *string `json:"id" validate:"required"` } // NewLoadBalancerPoolIdentityByID : Instantiate LoadBalancerPoolIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerPoolIdentityByID(id string) (_model *LoadBalancerPoolIdentityByID, err error) { _model = &LoadBalancerPoolIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerPoolIdentityByID) isaLoadBalancerPoolIdentity() bool { return true } // UnmarshalLoadBalancerPoolIdentityByID unmarshals an instance of LoadBalancerPoolIdentityByID from the specified map of raw messages. func UnmarshalLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetPrototypeIP : LoadBalancerPoolMemberTargetPrototypeIP struct // This model "extends" LoadBalancerPoolMemberTargetPrototype type LoadBalancerPoolMemberTargetPrototypeIP struct { // The IP address. // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewLoadBalancerPoolMemberTargetPrototypeIP : Instantiate LoadBalancerPoolMemberTargetPrototypeIP (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerPoolMemberTargetPrototypeIP(address string) (_model *LoadBalancerPoolMemberTargetPrototypeIP, err error) { _model = &LoadBalancerPoolMemberTargetPrototypeIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerPoolMemberTargetPrototypeIP) isaLoadBalancerPoolMemberTargetPrototype() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetPrototypeIP unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeIP from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetPrototypeIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetPrototypeIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetPrototypeInstanceIdentity : Identifies a virtual server instance by a unique property. // Models which "extend" this model: // - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID // - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN // - LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref // This model "extends" LoadBalancerPoolMemberTargetPrototype type LoadBalancerPoolMemberTargetPrototypeInstanceIdentity struct { // The unique identifier for this virtual server instance. ID *string `json:"id,omitempty"` // The CRN for this virtual server instance. CRN *string `json:"crn,omitempty"` // The URL for this virtual server instance. Href *string `json:"href,omitempty"` } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool { return true } type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityIntf interface { LoadBalancerPoolMemberTargetPrototypeIntf isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) isaLoadBalancerPoolMemberTargetPrototype() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentity from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetIP : LoadBalancerPoolMemberTargetIP struct // This model "extends" LoadBalancerPoolMemberTarget type LoadBalancerPoolMemberTargetIP struct { // The IP address. // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } func (*LoadBalancerPoolMemberTargetIP) isaLoadBalancerPoolMemberTarget() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetIP unmarshals an instance of LoadBalancerPoolMemberTargetIP from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetInstanceReference : LoadBalancerPoolMemberTargetInstanceReference struct // This model "extends" LoadBalancerPoolMemberTarget type LoadBalancerPoolMemberTargetInstanceReference struct { // The CRN for this virtual server instance. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *InstanceReferenceDeleted `json:"deleted,omitempty"` // The URL for this virtual server instance. Href *string `json:"href" validate:"required"` // The unique identifier for this virtual server instance. ID *string `json:"id" validate:"required"` // The name for this virtual server instance. The name is unique across all virtual server instances in the region. Name *string `json:"name" validate:"required"` } func (*LoadBalancerPoolMemberTargetInstanceReference) isaLoadBalancerPoolMemberTarget() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetInstanceReference unmarshals an instance of LoadBalancerPoolMemberTargetInstanceReference from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetInstanceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetInstanceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalInstanceReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileIdentityByHref : LoadBalancerProfileIdentityByHref struct // This model "extends" LoadBalancerProfileIdentity type LoadBalancerProfileIdentityByHref struct { // The URL for this load balancer profile. Href *string `json:"href" validate:"required"` } // NewLoadBalancerProfileIdentityByHref : Instantiate LoadBalancerProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerProfileIdentityByHref(href string) (_model *LoadBalancerProfileIdentityByHref, err error) { _model = &LoadBalancerProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerProfileIdentityByHref) isaLoadBalancerProfileIdentity() bool { return true } // UnmarshalLoadBalancerProfileIdentityByHref unmarshals an instance of LoadBalancerProfileIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileIdentityByName : LoadBalancerProfileIdentityByName struct // This model "extends" LoadBalancerProfileIdentity type LoadBalancerProfileIdentityByName struct { // The globally unique name for this load balancer profile. Name *string `json:"name" validate:"required"` } // NewLoadBalancerProfileIdentityByName : Instantiate LoadBalancerProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerProfileIdentityByName(name string) (_model *LoadBalancerProfileIdentityByName, err error) { _model = &LoadBalancerProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerProfileIdentityByName) isaLoadBalancerProfileIdentity() bool { return true } // UnmarshalLoadBalancerProfileIdentityByName unmarshals an instance of LoadBalancerProfileIdentityByName from the specified map of raw messages. func UnmarshalLoadBalancerProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileInstanceGroupsSupportedDependent : The instance groups support for a load balancer with this profile depends on its configuration. // This model "extends" LoadBalancerProfileInstanceGroupsSupported type LoadBalancerProfileInstanceGroupsSupportedDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the LoadBalancerProfileInstanceGroupsSupportedDependent.Type property. // The type for this profile field. const ( LoadBalancerProfileInstanceGroupsSupportedDependentTypeDependentConst = "dependent" ) func (*LoadBalancerProfileInstanceGroupsSupportedDependent) isaLoadBalancerProfileInstanceGroupsSupported() bool { return true } // UnmarshalLoadBalancerProfileInstanceGroupsSupportedDependent unmarshals an instance of LoadBalancerProfileInstanceGroupsSupportedDependent from the specified map of raw messages. func UnmarshalLoadBalancerProfileInstanceGroupsSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileInstanceGroupsSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileInstanceGroupsSupportedFixed : The instance groups support for a load balancer with this profile. // This model "extends" LoadBalancerProfileInstanceGroupsSupported type LoadBalancerProfileInstanceGroupsSupportedFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *bool `json:"value" validate:"required"` } // Constants associated with the LoadBalancerProfileInstanceGroupsSupportedFixed.Type property. // The type for this profile field. const ( LoadBalancerProfileInstanceGroupsSupportedFixedTypeFixedConst = "fixed" ) func (*LoadBalancerProfileInstanceGroupsSupportedFixed) isaLoadBalancerProfileInstanceGroupsSupported() bool { return true } // UnmarshalLoadBalancerProfileInstanceGroupsSupportedFixed unmarshals an instance of LoadBalancerProfileInstanceGroupsSupportedFixed from the specified map of raw messages. func UnmarshalLoadBalancerProfileInstanceGroupsSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileInstanceGroupsSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileRouteModeSupportedDependent : The route mode support for a load balancer with this profile depends on its configuration. // This model "extends" LoadBalancerProfileRouteModeSupported type LoadBalancerProfileRouteModeSupportedDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the LoadBalancerProfileRouteModeSupportedDependent.Type property. // The type for this profile field. const ( LoadBalancerProfileRouteModeSupportedDependentTypeDependentConst = "dependent" ) func (*LoadBalancerProfileRouteModeSupportedDependent) isaLoadBalancerProfileRouteModeSupported() bool { return true } // UnmarshalLoadBalancerProfileRouteModeSupportedDependent unmarshals an instance of LoadBalancerProfileRouteModeSupportedDependent from the specified map of raw messages. func UnmarshalLoadBalancerProfileRouteModeSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileRouteModeSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileRouteModeSupportedFixed : The route mode support for a load balancer with this profile. // This model "extends" LoadBalancerProfileRouteModeSupported type LoadBalancerProfileRouteModeSupportedFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *bool `json:"value" validate:"required"` } // Constants associated with the LoadBalancerProfileRouteModeSupportedFixed.Type property. // The type for this profile field. const ( LoadBalancerProfileRouteModeSupportedFixedTypeFixedConst = "fixed" ) func (*LoadBalancerProfileRouteModeSupportedFixed) isaLoadBalancerProfileRouteModeSupported() bool { return true } // UnmarshalLoadBalancerProfileRouteModeSupportedFixed unmarshals an instance of LoadBalancerProfileRouteModeSupportedFixed from the specified map of raw messages. func UnmarshalLoadBalancerProfileRouteModeSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileRouteModeSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileSecurityGroupsSupportedDependent : The security group support for a load balancer with this profile depends on its configuration. // This model "extends" LoadBalancerProfileSecurityGroupsSupported type LoadBalancerProfileSecurityGroupsSupportedDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the LoadBalancerProfileSecurityGroupsSupportedDependent.Type property. // The type for this profile field. const ( LoadBalancerProfileSecurityGroupsSupportedDependentTypeDependentConst = "dependent" ) func (*LoadBalancerProfileSecurityGroupsSupportedDependent) isaLoadBalancerProfileSecurityGroupsSupported() bool { return true } // UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent unmarshals an instance of LoadBalancerProfileSecurityGroupsSupportedDependent from the specified map of raw messages. func UnmarshalLoadBalancerProfileSecurityGroupsSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileSecurityGroupsSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileSecurityGroupsSupportedFixed : The security group support for a load balancer with this profile. // This model "extends" LoadBalancerProfileSecurityGroupsSupported type LoadBalancerProfileSecurityGroupsSupportedFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *bool `json:"value" validate:"required"` } // Constants associated with the LoadBalancerProfileSecurityGroupsSupportedFixed.Type property. // The type for this profile field. const ( LoadBalancerProfileSecurityGroupsSupportedFixedTypeFixedConst = "fixed" ) func (*LoadBalancerProfileSecurityGroupsSupportedFixed) isaLoadBalancerProfileSecurityGroupsSupported() bool { return true } // UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed unmarshals an instance of LoadBalancerProfileSecurityGroupsSupportedFixed from the specified map of raw messages. func UnmarshalLoadBalancerProfileSecurityGroupsSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileSecurityGroupsSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileUDPSupportedDependent : The UDP support for a load balancer with this profile depends on its configuration. // This model "extends" LoadBalancerProfileUDPSupported type LoadBalancerProfileUDPSupportedDependent struct { // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the LoadBalancerProfileUDPSupportedDependent.Type property. // The type for this profile field. const ( LoadBalancerProfileUDPSupportedDependentTypeDependentConst = "dependent" ) func (*LoadBalancerProfileUDPSupportedDependent) isaLoadBalancerProfileUDPSupported() bool { return true } // UnmarshalLoadBalancerProfileUDPSupportedDependent unmarshals an instance of LoadBalancerProfileUDPSupportedDependent from the specified map of raw messages. func UnmarshalLoadBalancerProfileUDPSupportedDependent(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileUDPSupportedDependent) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerProfileUDPSupportedFixed : The UDP support for a load balancer with this profile. // This model "extends" LoadBalancerProfileUDPSupported type LoadBalancerProfileUDPSupportedFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *bool `json:"value" validate:"required"` } // Constants associated with the LoadBalancerProfileUDPSupportedFixed.Type property. // The type for this profile field. const ( LoadBalancerProfileUDPSupportedFixedTypeFixedConst = "fixed" ) func (*LoadBalancerProfileUDPSupportedFixed) isaLoadBalancerProfileUDPSupported() bool { return true } // UnmarshalLoadBalancerProfileUDPSupportedFixed unmarshals an instance of LoadBalancerProfileUDPSupportedFixed from the specified map of raw messages. func UnmarshalLoadBalancerProfileUDPSupportedFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerProfileUDPSupportedFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLIdentityByCRN : NetworkACLIdentityByCRN struct // This model "extends" NetworkACLIdentity type NetworkACLIdentityByCRN struct { // The CRN for this network ACL. CRN *string `json:"crn" validate:"required"` } // NewNetworkACLIdentityByCRN : Instantiate NetworkACLIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLIdentityByCRN(crn string) (_model *NetworkACLIdentityByCRN, err error) { _model = &NetworkACLIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLIdentityByCRN) isaNetworkACLIdentity() bool { return true } // UnmarshalNetworkACLIdentityByCRN unmarshals an instance of NetworkACLIdentityByCRN from the specified map of raw messages. func UnmarshalNetworkACLIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLIdentityByHref : NetworkACLIdentityByHref struct // This model "extends" NetworkACLIdentity type NetworkACLIdentityByHref struct { // The URL for this network ACL. Href *string `json:"href" validate:"required"` } // NewNetworkACLIdentityByHref : Instantiate NetworkACLIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLIdentityByHref(href string) (_model *NetworkACLIdentityByHref, err error) { _model = &NetworkACLIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLIdentityByHref) isaNetworkACLIdentity() bool { return true } // UnmarshalNetworkACLIdentityByHref unmarshals an instance of NetworkACLIdentityByHref from the specified map of raw messages. func UnmarshalNetworkACLIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLIdentityByID : NetworkACLIdentityByID struct // This model "extends" NetworkACLIdentity type NetworkACLIdentityByID struct { // The unique identifier for this network ACL. ID *string `json:"id" validate:"required"` } // NewNetworkACLIdentityByID : Instantiate NetworkACLIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLIdentityByID(id string) (_model *NetworkACLIdentityByID, err error) { _model = &NetworkACLIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLIdentityByID) isaNetworkACLIdentity() bool { return true } // UnmarshalNetworkACLIdentityByID unmarshals an instance of NetworkACLIdentityByID from the specified map of raw messages. func UnmarshalNetworkACLIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLPrototypeNetworkACLByRules : NetworkACLPrototypeNetworkACLByRules struct // This model "extends" NetworkACLPrototype type NetworkACLPrototypeNetworkACLByRules struct { // The name for this network ACL. The name must not be used by another network ACL for the VPC. If unspecified, the // name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The VPC this network ACL will reside in. VPC VPCIdentityIntf `json:"vpc" validate:"required"` // The prototype objects for rules to create along with this network ACL. If unspecified, no rules will be created, // resulting in all traffic being denied. Rules []NetworkACLRulePrototypeNetworkACLContextIntf `json:"rules,omitempty"` } // NewNetworkACLPrototypeNetworkACLByRules : Instantiate NetworkACLPrototypeNetworkACLByRules (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLPrototypeNetworkACLByRules(vpc VPCIdentityIntf) (_model *NetworkACLPrototypeNetworkACLByRules, err error) { _model = &NetworkACLPrototypeNetworkACLByRules{ VPC: vpc, } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLPrototypeNetworkACLByRules) isaNetworkACLPrototype() bool { return true } // UnmarshalNetworkACLPrototypeNetworkACLByRules unmarshals an instance of NetworkACLPrototypeNetworkACLByRules from the specified map of raw messages. func UnmarshalNetworkACLPrototypeNetworkACLByRules(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLPrototypeNetworkACLByRules) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "rules", &obj.Rules, UnmarshalNetworkACLRulePrototypeNetworkACLContext) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLPrototypeNetworkACLBySourceNetworkACL : NetworkACLPrototypeNetworkACLBySourceNetworkACL struct // This model "extends" NetworkACLPrototype type NetworkACLPrototypeNetworkACLBySourceNetworkACL struct { // The name for this network ACL. The name must not be used by another network ACL for the VPC. If unspecified, the // name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The VPC this network ACL will reside in. VPC VPCIdentityIntf `json:"vpc" validate:"required"` // Network ACL to copy rules from. SourceNetworkACL NetworkACLIdentityIntf `json:"source_network_acl" validate:"required"` } // NewNetworkACLPrototypeNetworkACLBySourceNetworkACL : Instantiate NetworkACLPrototypeNetworkACLBySourceNetworkACL (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(vpc VPCIdentityIntf, sourceNetworkACL NetworkACLIdentityIntf) (_model *NetworkACLPrototypeNetworkACLBySourceNetworkACL, err error) { _model = &NetworkACLPrototypeNetworkACLBySourceNetworkACL{ VPC: vpc, SourceNetworkACL: sourceNetworkACL, } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLPrototypeNetworkACLBySourceNetworkACL) isaNetworkACLPrototype() bool { return true } // UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL unmarshals an instance of NetworkACLPrototypeNetworkACLBySourceNetworkACL from the specified map of raw messages. func UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLPrototypeNetworkACLBySourceNetworkACL) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_network_acl", &obj.SourceNetworkACL, UnmarshalNetworkACLIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref : NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref struct // This model "extends" NetworkACLRuleBeforePatch type NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref struct { // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` } // NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(href string) (_model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref, err error) { _model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref) isaNetworkACLRuleBeforePatch() bool { return true } // UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref from the specified map of raw messages. func UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleBeforePatchNetworkACLRuleIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID : NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID struct // This model "extends" NetworkACLRuleBeforePatch type NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID struct { // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` } // NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(id string) (_model *NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID, err error) { _model = &NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID) isaNetworkACLRuleBeforePatch() bool { return true } // UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID from the specified map of raw messages. func UnmarshalNetworkACLRuleBeforePatchNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleBeforePatchNetworkACLRuleIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref : NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref struct // This model "extends" NetworkACLRuleBeforePrototype type NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref struct { // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` } // NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(href string) (_model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref, err error) { _model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref) isaNetworkACLRuleBeforePrototype() bool { return true } // UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref from the specified map of raw messages. func UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID : NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID struct // This model "extends" NetworkACLRuleBeforePrototype type NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID struct { // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` } // NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(id string) (_model *NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID, err error) { _model = &NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID) isaNetworkACLRuleBeforePrototype() bool { return true } // UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID from the specified map of raw messages. func UnmarshalNetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleBeforePrototypeNetworkACLRuleIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleItemNetworkACLRuleProtocolAll : NetworkACLRuleItemNetworkACLRuleProtocolAll struct // This model "extends" NetworkACLRuleItem type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The rule that this rule is immediately before. In a rule collection, this always refers to the next item in the // collection. If absent, this is the last rule. Before *NetworkACLRuleReference `json:"before,omitempty"` // The date and time that the rule was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version" validate:"required"` // The name for this network ACL rule. The name is unique across all rules for the network ACL. Name *string `json:"name" validate:"required"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` } // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRuleItemNetworkACLRuleProtocolAllActionAllowConst = "allow" NetworkACLRuleItemNetworkACLRuleProtocolAllActionDenyConst = "deny" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Direction property. // The direction of traffic to match. const ( NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.IPVersion property. // The IP version for this rule. const ( NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolAllConst = "all" ) func (*NetworkACLRuleItemNetworkACLRuleProtocolAll) isaNetworkACLRuleItem() bool { return true } // UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRuleItemNetworkACLRuleProtocolAll from the specified map of raw messages. func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleItemNetworkACLRuleProtocolAll) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleItemNetworkACLRuleProtocolIcmp : NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct // This model "extends" NetworkACLRuleItem type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The rule that this rule is immediately before. In a rule collection, this always refers to the next item in the // collection. If absent, this is the last rule. Before *NetworkACLRuleReference `json:"before,omitempty"` // The date and time that the rule was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version" validate:"required"` // The name for this network ACL rule. The name is unique across all rules for the network ACL. Name *string `json:"name" validate:"required"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to match. // // If absent, all codes are matched. Code *int64 `json:"code,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The ICMP traffic type to match. // // If absent, all types are matched. Type *int64 `json:"type,omitempty"` } // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRuleItemNetworkACLRuleProtocolIcmpActionAllowConst = "allow" NetworkACLRuleItemNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.Direction property. // The direction of traffic to match. const ( NetworkACLRuleItemNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" NetworkACLRuleItemNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.IPVersion property. // The IP version for this rule. const ( NetworkACLRuleItemNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( NetworkACLRuleItemNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" ) func (*NetworkACLRuleItemNetworkACLRuleProtocolIcmp) isaNetworkACLRuleItem() bool { return true } // UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRuleItemNetworkACLRuleProtocolIcmp from the specified map of raw messages. func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleItemNetworkACLRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleItemNetworkACLRuleProtocolTcpudp : NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct // This model "extends" NetworkACLRuleItem type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The rule that this rule is immediately before. In a rule collection, this always refers to the next item in the // collection. If absent, this is the last rule. Before *NetworkACLRuleReference `json:"before,omitempty"` // The date and time that the rule was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version" validate:"required"` // The name for this network ACL rule. The name is unique across all rules for the network ACL. Name *string `json:"name" validate:"required"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. DestinationPortMax *int64 `json:"destination_port_max" validate:"required"` // The inclusive lower bound of TCP/UDP destination port range. DestinationPortMin *int64 `json:"destination_port_min" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The inclusive upper bound of TCP/UDP source port range. SourcePortMax *int64 `json:"source_port_max" validate:"required"` // The inclusive lower bound of TCP/UDP source port range. SourcePortMin *int64 `json:"source_port_min" validate:"required"` } // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRuleItemNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" NetworkACLRuleItemNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.Direction property. // The direction of traffic to match. const ( NetworkACLRuleItemNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" NetworkACLRuleItemNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.IPVersion property. // The IP version for this rule. const ( NetworkACLRuleItemNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( NetworkACLRuleItemNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" NetworkACLRuleItemNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) func (*NetworkACLRuleItemNetworkACLRuleProtocolTcpudp) isaNetworkACLRuleItem() bool { return true } // UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRuleItemNetworkACLRuleProtocolTcpudp from the specified map of raw messages. func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleItemNetworkACLRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype struct // This model "extends" NetworkACLRulePrototypeNetworkACLContext type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version,omitempty"` // The name for this network ACL rule. The name must not be used by another rule for the network ACL. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` } // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeActionAllowConst = "allow" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeActionDenyConst = "deny" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.Direction property. // The direction of traffic to match. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeDirectionInboundConst = "inbound" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.IPVersion property. // The IP version for this rule. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype.Protocol property. // The protocol to enforce. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototypeProtocolAllConst = "all" ) // NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype, err error) { _model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype{ Action: core.StringPtr(action), Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), Source: core.StringPtr(source), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } // UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype from the specified map of raw messages. func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype struct // This model "extends" NetworkACLRulePrototypeNetworkACLContext type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version,omitempty"` // The name for this network ACL rule. The name must not be used by another rule for the network ACL. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to match. // // If specified, `type` must also be specified. If unspecified, all codes are matched. Code *int64 `json:"code,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The ICMP traffic type to match. // // If unspecified, all types are matched. Type *int64 `json:"type,omitempty"` } // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototypeActionAllowConst = "allow" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototypeActionDenyConst = "deny" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype.Direction property. // The direction of traffic to match. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototypeDirectionInboundConst = "inbound" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototypeDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype.IPVersion property. // The IP version for this rule. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototypeIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype.Protocol property. // The protocol to enforce. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototypeProtocolIcmpConst = "icmp" ) // NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype, err error) { _model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype{ Action: core.StringPtr(action), Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), Source: core.StringPtr(source), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } // UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype from the specified map of raw messages. func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype struct // This model "extends" NetworkACLRulePrototypeNetworkACLContext type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version,omitempty"` // The name for this network ACL rule. The name must not be used by another rule for the network ACL. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. DestinationPortMax *int64 `json:"destination_port_max,omitempty"` // The inclusive lower bound of TCP/UDP destination port range. DestinationPortMin *int64 `json:"destination_port_min,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The inclusive upper bound of TCP/UDP source port range. SourcePortMax *int64 `json:"source_port_max,omitempty"` // The inclusive lower bound of TCP/UDP source port range. SourcePortMin *int64 `json:"source_port_min,omitempty"` } // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeActionAllowConst = "allow" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeActionDenyConst = "deny" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype.Direction property. // The direction of traffic to match. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeDirectionInboundConst = "inbound" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype.IPVersion property. // The IP version for this rule. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype.Protocol property. // The protocol to enforce. const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeProtocolTCPConst = "tcp" NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototypeProtocolUDPConst = "udp" ) // NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype, err error) { _model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype{ Action: core.StringPtr(action), Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), Source: core.StringPtr(source), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } // UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype from the specified map of raw messages. func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype : NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype struct // This model "extends" NetworkACLRulePrototype type NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version,omitempty"` // The name for this network ACL rule. The name must not be used by another rule for the network ACL. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` } // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeActionAllowConst = "allow" NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeActionDenyConst = "deny" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.Direction property. // The direction of traffic to match. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeDirectionInboundConst = "inbound" NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.IPVersion property. // The IP version for this rule. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype.Protocol property. // The protocol to enforce. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototypeProtocolAllConst = "all" ) // NewNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype, err error) { _model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype{ Action: core.StringPtr(action), Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), Source: core.StringPtr(source), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype) isaNetworkACLRulePrototype() bool { return true } // UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype from the specified map of raw messages. func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAllPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype : NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype struct // This model "extends" NetworkACLRulePrototype type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version,omitempty"` // The name for this network ACL rule. The name must not be used by another rule for the network ACL. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to match. // // If specified, `type` must also be specified. If unspecified, all codes are matched. Code *int64 `json:"code,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The ICMP traffic type to match. // // If unspecified, all types are matched. Type *int64 `json:"type,omitempty"` } // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototypeActionAllowConst = "allow" NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototypeActionDenyConst = "deny" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype.Direction property. // The direction of traffic to match. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototypeDirectionInboundConst = "inbound" NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototypeDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype.IPVersion property. // The IP version for this rule. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototypeIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype.Protocol property. // The protocol to enforce. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototypeProtocolIcmpConst = "icmp" ) // NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype, err error) { _model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype{ Action: core.StringPtr(action), Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), Source: core.StringPtr(source), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype) isaNetworkACLRulePrototype() bool { return true } // UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype from the specified map of raw messages. func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype : NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype struct // This model "extends" NetworkACLRulePrototype type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` Before NetworkACLRuleBeforePrototypeIntf `json:"before,omitempty"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version,omitempty"` // The name for this network ACL rule. The name must not be used by another rule for the network ACL. If unspecified, // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. DestinationPortMax *int64 `json:"destination_port_max,omitempty"` // The inclusive lower bound of TCP/UDP destination port range. DestinationPortMin *int64 `json:"destination_port_min,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The inclusive upper bound of TCP/UDP source port range. SourcePortMax *int64 `json:"source_port_max,omitempty"` // The inclusive lower bound of TCP/UDP source port range. SourcePortMin *int64 `json:"source_port_min,omitempty"` } // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeActionAllowConst = "allow" NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeActionDenyConst = "deny" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype.Direction property. // The direction of traffic to match. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeDirectionInboundConst = "inbound" NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype.IPVersion property. // The IP version for this rule. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype.Protocol property. // The protocol to enforce. const ( NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeProtocolTCPConst = "tcp" NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototypeProtocolUDPConst = "udp" ) // NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype (Generic Model Constructor) func (*VpcbetaV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype(action string, destination string, direction string, source string, protocol string) (_model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype, err error) { _model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype{ Action: core.StringPtr(action), Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), Source: core.StringPtr(source), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype) isaNetworkACLRulePrototype() bool { return true } // UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype from the specified map of raw messages. func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpPrototype) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleBeforePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleNetworkACLRuleProtocolAll : NetworkACLRuleNetworkACLRuleProtocolAll struct // This model "extends" NetworkACLRule type NetworkACLRuleNetworkACLRuleProtocolAll struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The rule that this rule is immediately before. If absent, this is the last rule. Before *NetworkACLRuleReference `json:"before,omitempty"` // The date and time that the rule was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version" validate:"required"` // The name for this network ACL rule. The name is unique across all rules for the network ACL. Name *string `json:"name" validate:"required"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` } // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRuleNetworkACLRuleProtocolAllActionAllowConst = "allow" NetworkACLRuleNetworkACLRuleProtocolAllActionDenyConst = "deny" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Direction property. // The direction of traffic to match. const ( NetworkACLRuleNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" NetworkACLRuleNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.IPVersion property. // The IP version for this rule. const ( NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( NetworkACLRuleNetworkACLRuleProtocolAllProtocolAllConst = "all" ) func (*NetworkACLRuleNetworkACLRuleProtocolAll) isaNetworkACLRule() bool { return true } // UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRuleNetworkACLRuleProtocolAll from the specified map of raw messages. func UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleNetworkACLRuleProtocolAll) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleNetworkACLRuleProtocolIcmp : NetworkACLRuleNetworkACLRuleProtocolIcmp struct // This model "extends" NetworkACLRule type NetworkACLRuleNetworkACLRuleProtocolIcmp struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The rule that this rule is immediately before. If absent, this is the last rule. Before *NetworkACLRuleReference `json:"before,omitempty"` // The date and time that the rule was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version" validate:"required"` // The name for this network ACL rule. The name is unique across all rules for the network ACL. Name *string `json:"name" validate:"required"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to match. // // If absent, all codes are matched. Code *int64 `json:"code,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The ICMP traffic type to match. // // If absent, all types are matched. Type *int64 `json:"type,omitempty"` } // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRuleNetworkACLRuleProtocolIcmpActionAllowConst = "allow" NetworkACLRuleNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Direction property. // The direction of traffic to match. const ( NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.IPVersion property. // The IP version for this rule. const ( NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" ) func (*NetworkACLRuleNetworkACLRuleProtocolIcmp) isaNetworkACLRule() bool { return true } // UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRuleNetworkACLRuleProtocolIcmp from the specified map of raw messages. func UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleNetworkACLRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkACLRuleNetworkACLRuleProtocolTcpudp : NetworkACLRuleNetworkACLRuleProtocolTcpudp struct // This model "extends" NetworkACLRule type NetworkACLRuleNetworkACLRuleProtocolTcpudp struct { // The action to perform for a packet matching the rule. Action *string `json:"action" validate:"required"` // The rule that this rule is immediately before. If absent, this is the last rule. Before *NetworkACLRuleReference `json:"before,omitempty"` // The date and time that the rule was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The destination IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all destination addresses. Destination *string `json:"destination" validate:"required"` // The direction of traffic to match. Direction *string `json:"direction" validate:"required"` // The URL for this network ACL rule. Href *string `json:"href" validate:"required"` // The unique identifier for this network ACL rule. ID *string `json:"id" validate:"required"` // The IP version for this rule. IPVersion *string `json:"ip_version" validate:"required"` // The name for this network ACL rule. The name is unique across all rules for the network ACL. Name *string `json:"name" validate:"required"` // The source IP address or CIDR block to match. The CIDR block `0.0.0.0/0` matches all source addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. DestinationPortMax *int64 `json:"destination_port_max" validate:"required"` // The inclusive lower bound of TCP/UDP destination port range. DestinationPortMin *int64 `json:"destination_port_min" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The inclusive upper bound of TCP/UDP source port range. SourcePortMax *int64 `json:"source_port_max" validate:"required"` // The inclusive lower bound of TCP/UDP source port range. SourcePortMin *int64 `json:"source_port_min" validate:"required"` } // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Action property. // The action to perform for a packet matching the rule. const ( NetworkACLRuleNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" NetworkACLRuleNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Direction property. // The direction of traffic to match. const ( NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.IPVersion property. // The IP version for this rule. const ( NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" ) // Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) func (*NetworkACLRuleNetworkACLRuleProtocolTcpudp) isaNetworkACLRule() bool { return true } // UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRuleNetworkACLRuleProtocolTcpudp from the specified map of raw messages. func UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleNetworkACLRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkInterfaceIPPrototypeReservedIPIdentity : Identifies a reserved IP by a unique property. // Models which "extend" this model: // - NetworkInterfaceIPPrototypeReservedIPIdentityByID // - NetworkInterfaceIPPrototypeReservedIPIdentityByHref // This model "extends" NetworkInterfaceIPPrototype type NetworkInterfaceIPPrototypeReservedIPIdentity struct { // The unique identifier for this reserved IP. ID *string `json:"id,omitempty"` // The URL for this reserved IP. Href *string `json:"href,omitempty"` } func (*NetworkInterfaceIPPrototypeReservedIPIdentity) isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool { return true } type NetworkInterfaceIPPrototypeReservedIPIdentityIntf interface { NetworkInterfaceIPPrototypeIntf isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool } func (*NetworkInterfaceIPPrototypeReservedIPIdentity) isaNetworkInterfaceIPPrototype() bool { return true } // UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPIdentity from the specified map of raw messages. func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkInterfaceIPPrototypeReservedIPIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext : NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext struct // This model "extends" NetworkInterfaceIPPrototype type NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext struct { // The IP address to reserve, which must not already be reserved on the subnet. // // If unspecified, an available address on the subnet will automatically be selected. Address *string `json:"address,omitempty"` // Indicates whether this reserved IP member will be automatically deleted when either // `target` is deleted, or the reserved IP is unbound. AutoDelete *bool `json:"auto_delete,omitempty"` // The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with // `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated // list of randomly-selected words. Name *string `json:"name,omitempty"` } func (*NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext) isaNetworkInterfaceIPPrototype() bool { return true } // UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext from the specified map of raw messages. func UnmarshalNetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkInterfaceIPPrototypeReservedIPPrototypeNetworkInterfaceContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // OperatingSystemIdentityByHref : OperatingSystemIdentityByHref struct // This model "extends" OperatingSystemIdentity type OperatingSystemIdentityByHref struct { // The URL for this operating system. Href *string `json:"href" validate:"required"` } // NewOperatingSystemIdentityByHref : Instantiate OperatingSystemIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewOperatingSystemIdentityByHref(href string) (_model *OperatingSystemIdentityByHref, err error) { _model = &OperatingSystemIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*OperatingSystemIdentityByHref) isaOperatingSystemIdentity() bool { return true } // UnmarshalOperatingSystemIdentityByHref unmarshals an instance of OperatingSystemIdentityByHref from the specified map of raw messages. func UnmarshalOperatingSystemIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(OperatingSystemIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // OperatingSystemIdentityByName : OperatingSystemIdentityByName struct // This model "extends" OperatingSystemIdentity type OperatingSystemIdentityByName struct { // The globally unique name for this operating system. Name *string `json:"name" validate:"required"` } // NewOperatingSystemIdentityByName : Instantiate OperatingSystemIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewOperatingSystemIdentityByName(name string) (_model *OperatingSystemIdentityByName, err error) { _model = &OperatingSystemIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*OperatingSystemIdentityByName) isaOperatingSystemIdentity() bool { return true } // UnmarshalOperatingSystemIdentityByName unmarshals an instance of OperatingSystemIdentityByName from the specified map of raw messages. func UnmarshalOperatingSystemIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(OperatingSystemIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayFloatingIPPrototypeFloatingIPIdentity : Identifies a floating IP by a unique property. // Models which "extend" this model: // - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID // - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN // - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref // - PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress // This model "extends" PublicGatewayFloatingIPPrototype type PublicGatewayFloatingIPPrototypeFloatingIPIdentity struct { // The unique identifier for this floating IP. ID *string `json:"id,omitempty"` // The CRN for this floating IP. CRN *string `json:"crn,omitempty"` // The URL for this floating IP. Href *string `json:"href,omitempty"` // The globally unique IP address. Address *string `json:"address,omitempty"` } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentity) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool { return true } type PublicGatewayFloatingIPPrototypeFloatingIPIdentityIntf interface { PublicGatewayFloatingIPPrototypeIntf isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentity) isaPublicGatewayFloatingIPPrototype() bool { return true } // UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentity from the specified map of raw messages. func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext : PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext struct // This model "extends" PublicGatewayFloatingIPPrototype type PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext struct { // The name for this floating IP. The name must not be used by another floating IP in the region. If unspecified, the // name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The resource group to use. If unspecified, the account's [default resource // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` } func (*PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext) isaPublicGatewayFloatingIPPrototype() bool { return true } // UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext from the specified map of raw messages. func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayFloatingIPPrototypeFloatingIPPrototypeTargetContext) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayIdentityPublicGatewayIdentityByCRN : PublicGatewayIdentityPublicGatewayIdentityByCRN struct // This model "extends" PublicGatewayIdentity type PublicGatewayIdentityPublicGatewayIdentityByCRN struct { // The CRN for this public gateway. CRN *string `json:"crn" validate:"required"` } // NewPublicGatewayIdentityPublicGatewayIdentityByCRN : Instantiate PublicGatewayIdentityPublicGatewayIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayIdentityPublicGatewayIdentityByCRN(crn string) (_model *PublicGatewayIdentityPublicGatewayIdentityByCRN, err error) { _model = &PublicGatewayIdentityPublicGatewayIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayIdentityPublicGatewayIdentityByCRN) isaPublicGatewayIdentity() bool { return true } // UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN unmarshals an instance of PublicGatewayIdentityPublicGatewayIdentityByCRN from the specified map of raw messages. func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayIdentityPublicGatewayIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayIdentityPublicGatewayIdentityByHref : PublicGatewayIdentityPublicGatewayIdentityByHref struct // This model "extends" PublicGatewayIdentity type PublicGatewayIdentityPublicGatewayIdentityByHref struct { // The URL for this public gateway. Href *string `json:"href" validate:"required"` } // NewPublicGatewayIdentityPublicGatewayIdentityByHref : Instantiate PublicGatewayIdentityPublicGatewayIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayIdentityPublicGatewayIdentityByHref(href string) (_model *PublicGatewayIdentityPublicGatewayIdentityByHref, err error) { _model = &PublicGatewayIdentityPublicGatewayIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayIdentityPublicGatewayIdentityByHref) isaPublicGatewayIdentity() bool { return true } // UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref unmarshals an instance of PublicGatewayIdentityPublicGatewayIdentityByHref from the specified map of raw messages. func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayIdentityPublicGatewayIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayIdentityPublicGatewayIdentityByID : PublicGatewayIdentityPublicGatewayIdentityByID struct // This model "extends" PublicGatewayIdentity type PublicGatewayIdentityPublicGatewayIdentityByID struct { // The unique identifier for this public gateway. ID *string `json:"id" validate:"required"` } // NewPublicGatewayIdentityPublicGatewayIdentityByID : Instantiate PublicGatewayIdentityPublicGatewayIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayIdentityPublicGatewayIdentityByID(id string) (_model *PublicGatewayIdentityPublicGatewayIdentityByID, err error) { _model = &PublicGatewayIdentityPublicGatewayIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayIdentityPublicGatewayIdentityByID) isaPublicGatewayIdentity() bool { return true } // UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID unmarshals an instance of PublicGatewayIdentityPublicGatewayIdentityByID from the specified map of raw messages. func UnmarshalPublicGatewayIdentityPublicGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayIdentityPublicGatewayIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RegionIdentityByHref : RegionIdentityByHref struct // This model "extends" RegionIdentity type RegionIdentityByHref struct { // The URL for this region. Href *string `json:"href" validate:"required"` } // NewRegionIdentityByHref : Instantiate RegionIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewRegionIdentityByHref(href string) (_model *RegionIdentityByHref, err error) { _model = &RegionIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*RegionIdentityByHref) isaRegionIdentity() bool { return true } // UnmarshalRegionIdentityByHref unmarshals an instance of RegionIdentityByHref from the specified map of raw messages. func UnmarshalRegionIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RegionIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RegionIdentityByName : RegionIdentityByName struct // This model "extends" RegionIdentity type RegionIdentityByName struct { // The globally unique name for this region. Name *string `json:"name" validate:"required"` } // NewRegionIdentityByName : Instantiate RegionIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewRegionIdentityByName(name string) (_model *RegionIdentityByName, err error) { _model = &RegionIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*RegionIdentityByName) isaRegionIdentity() bool { return true } // UnmarshalRegionIdentityByName unmarshals an instance of RegionIdentityByName from the specified map of raw messages. func UnmarshalRegionIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RegionIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetPrototypeEndpointGatewayIdentity : ReservedIPTargetPrototypeEndpointGatewayIdentity struct // Models which "extend" this model: // - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID // - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN // - ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref // This model "extends" ReservedIPTargetPrototype type ReservedIPTargetPrototypeEndpointGatewayIdentity struct { // The unique identifier for this endpoint gateway. ID *string `json:"id,omitempty"` // The CRN for this endpoint gateway. CRN *string `json:"crn,omitempty"` // The URL for this endpoint gateway. Href *string `json:"href,omitempty"` } func (*ReservedIPTargetPrototypeEndpointGatewayIdentity) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool { return true } type ReservedIPTargetPrototypeEndpointGatewayIdentityIntf interface { ReservedIPTargetPrototypeIntf isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool } func (*ReservedIPTargetPrototypeEndpointGatewayIdentity) isaReservedIPTargetPrototype() bool { return true } // UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentity from the specified map of raw messages. func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext : ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext struct // This model "extends" ReservedIPTarget type ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *BareMetalServerNetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` // The URL for this bare metal server network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server network interface. ID *string `json:"id" validate:"required"` // The name for this bare metal server network interface. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext.ResourceType property. // The resource type. const ( ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" ) func (*ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext unmarshals an instance of ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext from the specified map of raw messages. func UnmarshalReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetBareMetalServerNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkInterfaceReferenceTargetContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetEndpointGatewayReference : ReservedIPTargetEndpointGatewayReference struct // This model "extends" ReservedIPTarget type ReservedIPTargetEndpointGatewayReference struct { // The CRN for this endpoint gateway. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *EndpointGatewayReferenceDeleted `json:"deleted,omitempty"` // The URL for this endpoint gateway. Href *string `json:"href" validate:"required"` // The unique identifier for this endpoint gateway. ID *string `json:"id" validate:"required"` // The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetEndpointGatewayReference.ResourceType property. // The resource type. const ( ReservedIPTargetEndpointGatewayReferenceResourceTypeEndpointGatewayConst = "endpoint_gateway" ) func (*ReservedIPTargetEndpointGatewayReference) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetEndpointGatewayReference unmarshals an instance of ReservedIPTargetEndpointGatewayReference from the specified map of raw messages. func UnmarshalReservedIPTargetEndpointGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetEndpointGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetGenericResourceReference : Identifying information for a resource that is not native to the VPC API. // This model "extends" ReservedIPTarget type ReservedIPTargetGenericResourceReference struct { // The CRN for the resource. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *GenericResourceReferenceDeleted `json:"deleted,omitempty"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetGenericResourceReference.ResourceType property. // The resource type. const ( ReservedIPTargetGenericResourceReferenceResourceTypeCloudResourceConst = "cloud_resource" ) func (*ReservedIPTargetGenericResourceReference) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetGenericResourceReference unmarshals an instance of ReservedIPTargetGenericResourceReference from the specified map of raw messages. func UnmarshalReservedIPTargetGenericResourceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetGenericResourceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalGenericResourceReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetLoadBalancerReference : ReservedIPTargetLoadBalancerReference struct // This model "extends" ReservedIPTarget type ReservedIPTargetLoadBalancerReference struct { // The load balancer's CRN. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *LoadBalancerReferenceDeleted `json:"deleted,omitempty"` // The load balancer's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this load balancer. ID *string `json:"id" validate:"required"` // The name for this load balancer. The name is unique across all load balancers in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetLoadBalancerReference.ResourceType property. // The resource type. const ( ReservedIPTargetLoadBalancerReferenceResourceTypeLoadBalancerConst = "load_balancer" ) func (*ReservedIPTargetLoadBalancerReference) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetLoadBalancerReference unmarshals an instance of ReservedIPTargetLoadBalancerReference from the specified map of raw messages. func UnmarshalReservedIPTargetLoadBalancerReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetLoadBalancerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetNetworkInterfaceReferenceTargetContext : ReservedIPTargetNetworkInterfaceReferenceTargetContext struct // This model "extends" ReservedIPTarget type ReservedIPTargetNetworkInterfaceReferenceTargetContext struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` // The URL for this instance network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` // The name for this instance network interface. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetNetworkInterfaceReferenceTargetContext.ResourceType property. // The resource type. const ( ReservedIPTargetNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" ) func (*ReservedIPTargetNetworkInterfaceReferenceTargetContext) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetNetworkInterfaceReferenceTargetContext unmarshals an instance of ReservedIPTargetNetworkInterfaceReferenceTargetContext from the specified map of raw messages. func UnmarshalReservedIPTargetNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetVPNGatewayReference : ReservedIPTargetVPNGatewayReference struct // This model "extends" ReservedIPTarget type ReservedIPTargetVPNGatewayReference struct { // The VPN gateway's CRN. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNGatewayReferenceDeleted `json:"deleted,omitempty"` // The VPN gateway's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway. ID *string `json:"id" validate:"required"` // The name for this VPN gateway. The name is unique across all VPN gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetVPNGatewayReference.ResourceType property. // The resource type. const ( ReservedIPTargetVPNGatewayReferenceResourceTypeVPNGatewayConst = "vpn_gateway" ) func (*ReservedIPTargetVPNGatewayReference) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetVPNGatewayReference unmarshals an instance of ReservedIPTargetVPNGatewayReference from the specified map of raw messages. func UnmarshalReservedIPTargetVPNGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetVPNGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetVPNServerReference : ReservedIPTargetVPNServerReference struct // This model "extends" ReservedIPTarget type ReservedIPTargetVPNServerReference struct { // The CRN for this VPN server. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNServerReferenceDeleted `json:"deleted,omitempty"` // The URL for this VPN server. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN server. ID *string `json:"id" validate:"required"` // The name for this VPN server. The name is unique across all VPN servers in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetVPNServerReference.ResourceType property. // The resource type. const ( ReservedIPTargetVPNServerReferenceResourceTypeVPNServerConst = "vpn_server" ) func (*ReservedIPTargetVPNServerReference) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetVPNServerReference unmarshals an instance of ReservedIPTargetVPNServerReference from the specified map of raw messages. func UnmarshalReservedIPTargetVPNServerReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetVPNServerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNServerReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext : ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext struct // This model "extends" ReservedIPTarget type ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext struct { // The CRN for this virtual network interface. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted `json:"deleted,omitempty"` // The URL for this virtual network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this virtual network interface. ID *string `json:"id" validate:"required"` // The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext.ResourceType property. // The resource type. const ( ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContextResourceTypeVirtualNetworkInterfaceConst = "virtual_network_interface" ) func (*ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext) isaReservedIPTarget() bool { return true } // UnmarshalReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext unmarshals an instance of ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext from the specified map of raw messages. func UnmarshalReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetVirtualNetworkInterfaceReferenceReservedIPTargetContext) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVirtualNetworkInterfaceReferenceReservedIPTargetContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ResourceGroupIdentityByID : ResourceGroupIdentityByID struct // This model "extends" ResourceGroupIdentity type ResourceGroupIdentityByID struct { // The unique identifier for this resource group. ID *string `json:"id" validate:"required"` } // NewResourceGroupIdentityByID : Instantiate ResourceGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewResourceGroupIdentityByID(id string) (_model *ResourceGroupIdentityByID, err error) { _model = &ResourceGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*ResourceGroupIdentityByID) isaResourceGroupIdentity() bool { return true } // UnmarshalResourceGroupIdentityByID unmarshals an instance of ResourceGroupIdentityByID from the specified map of raw messages. func UnmarshalResourceGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ResourceGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteCreatorVPNGatewayReference : RouteCreatorVPNGatewayReference struct // This model "extends" RouteCreator type RouteCreatorVPNGatewayReference struct { // The VPN gateway's CRN. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNGatewayReferenceDeleted `json:"deleted,omitempty"` // The VPN gateway's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway. ID *string `json:"id" validate:"required"` // The name for this VPN gateway. The name is unique across all VPN gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the RouteCreatorVPNGatewayReference.ResourceType property. // The resource type. const ( RouteCreatorVPNGatewayReferenceResourceTypeVPNGatewayConst = "vpn_gateway" ) func (*RouteCreatorVPNGatewayReference) isaRouteCreator() bool { return true } // UnmarshalRouteCreatorVPNGatewayReference unmarshals an instance of RouteCreatorVPNGatewayReference from the specified map of raw messages. func UnmarshalRouteCreatorVPNGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteCreatorVPNGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteCreatorVPNServerReference : RouteCreatorVPNServerReference struct // This model "extends" RouteCreator type RouteCreatorVPNServerReference struct { // The CRN for this VPN server. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNServerReferenceDeleted `json:"deleted,omitempty"` // The URL for this VPN server. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN server. ID *string `json:"id" validate:"required"` // The name for this VPN server. The name is unique across all VPN servers in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the RouteCreatorVPNServerReference.ResourceType property. // The resource type. const ( RouteCreatorVPNServerReferenceResourceTypeVPNServerConst = "vpn_server" ) func (*RouteCreatorVPNServerReference) isaRouteCreator() bool { return true } // UnmarshalRouteCreatorVPNServerReference unmarshals an instance of RouteCreatorVPNServerReference from the specified map of raw messages. func UnmarshalRouteCreatorVPNServerReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteCreatorVPNServerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNServerReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopIP : RouteNextHopIP struct // This model "extends" RouteNextHop type RouteNextHopIP struct { // The IP address. // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } func (*RouteNextHopIP) isaRouteNextHop() bool { return true } // UnmarshalRouteNextHopIP unmarshals an instance of RouteNextHopIP from the specified map of raw messages. func UnmarshalRouteNextHopIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopPatchRouteNextHopIP : RouteNextHopPatchRouteNextHopIP struct // Models which "extend" this model: // - RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP // - RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP // This model "extends" RouteNextHopPatch type RouteNextHopPatchRouteNextHopIP struct { // The sentinel IP address (`0.0.0.0`). // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address,omitempty"` } func (*RouteNextHopPatchRouteNextHopIP) isaRouteNextHopPatchRouteNextHopIP() bool { return true } type RouteNextHopPatchRouteNextHopIPIntf interface { RouteNextHopPatchIntf isaRouteNextHopPatchRouteNextHopIP() bool } func (*RouteNextHopPatchRouteNextHopIP) isaRouteNextHopPatch() bool { return true } // UnmarshalRouteNextHopPatchRouteNextHopIP unmarshals an instance of RouteNextHopPatchRouteNextHopIP from the specified map of raw messages. func UnmarshalRouteNextHopPatchRouteNextHopIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopPatchRouteNextHopIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopPatchVPNGatewayConnectionIdentity : Identifies a VPN gateway connection by a unique property. // Models which "extend" this model: // - RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID // - RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref // This model "extends" RouteNextHopPatch type RouteNextHopPatchVPNGatewayConnectionIdentity struct { // The unique identifier for this VPN gateway connection. ID *string `json:"id,omitempty"` // The VPN connection's canonical URL. Href *string `json:"href,omitempty"` } func (*RouteNextHopPatchVPNGatewayConnectionIdentity) isaRouteNextHopPatchVPNGatewayConnectionIdentity() bool { return true } type RouteNextHopPatchVPNGatewayConnectionIdentityIntf interface { RouteNextHopPatchIntf isaRouteNextHopPatchVPNGatewayConnectionIdentity() bool } func (*RouteNextHopPatchVPNGatewayConnectionIdentity) isaRouteNextHopPatch() bool { return true } // UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentity unmarshals an instance of RouteNextHopPatchVPNGatewayConnectionIdentity from the specified map of raw messages. func UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopPatchVPNGatewayConnectionIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopVPNGatewayConnectionReference : RouteNextHopVPNGatewayConnectionReference struct // This model "extends" RouteNextHop type RouteNextHopVPNGatewayConnectionReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNGatewayConnectionReferenceDeleted `json:"deleted,omitempty"` // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway connection. ID *string `json:"id" validate:"required"` // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the RouteNextHopVPNGatewayConnectionReference.ResourceType property. // The resource type. const ( RouteNextHopVPNGatewayConnectionReferenceResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection" ) func (*RouteNextHopVPNGatewayConnectionReference) isaRouteNextHop() bool { return true } // UnmarshalRouteNextHopVPNGatewayConnectionReference unmarshals an instance of RouteNextHopVPNGatewayConnectionReference from the specified map of raw messages. func UnmarshalRouteNextHopVPNGatewayConnectionReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopVPNGatewayConnectionReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNGatewayConnectionReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP : RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP struct // Models which "extend" this model: // - RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP // - RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP // This model "extends" RoutePrototypeNextHop type RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP struct { // The sentinel IP address (`0.0.0.0`). // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address,omitempty"` } func (*RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP) isaRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP() bool { return true } type RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPIntf interface { RoutePrototypeNextHopIntf isaRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP() bool } func (*RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP) isaRoutePrototypeNextHop() bool { return true } // UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP unmarshals an instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP from the specified map of raw messages. func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity : Identifies a VPN gateway connection by a unique property. // Models which "extend" this model: // - RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID // - RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref // This model "extends" RoutePrototypeNextHop type RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity struct { // The unique identifier for this VPN gateway connection. ID *string `json:"id,omitempty"` // The VPN connection's canonical URL. Href *string `json:"href,omitempty"` } func (*RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity) isaRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool { return true } type RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityIntf interface { RoutePrototypeNextHopIntf isaRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool } func (*RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity) isaRoutePrototypeNextHop() bool { return true } // UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity unmarshals an instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity from the specified map of raw messages. func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutingTableIdentityByHref : RoutingTableIdentityByHref struct // This model "extends" RoutingTableIdentity type RoutingTableIdentityByHref struct { // The URL for this routing table. Href *string `json:"href" validate:"required"` } // NewRoutingTableIdentityByHref : Instantiate RoutingTableIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewRoutingTableIdentityByHref(href string) (_model *RoutingTableIdentityByHref, err error) { _model = &RoutingTableIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*RoutingTableIdentityByHref) isaRoutingTableIdentity() bool { return true } // UnmarshalRoutingTableIdentityByHref unmarshals an instance of RoutingTableIdentityByHref from the specified map of raw messages. func UnmarshalRoutingTableIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutingTableIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutingTableIdentityByID : RoutingTableIdentityByID struct // This model "extends" RoutingTableIdentity type RoutingTableIdentityByID struct { // The unique identifier for this routing table. ID *string `json:"id" validate:"required"` } // NewRoutingTableIdentityByID : Instantiate RoutingTableIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewRoutingTableIdentityByID(id string) (_model *RoutingTableIdentityByID, err error) { _model = &RoutingTableIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*RoutingTableIdentityByID) isaRoutingTableIdentity() bool { return true } // UnmarshalRoutingTableIdentityByID unmarshals an instance of RoutingTableIdentityByID from the specified map of raw messages. func UnmarshalRoutingTableIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutingTableIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupIdentityByCRN : SecurityGroupIdentityByCRN struct // This model "extends" SecurityGroupIdentity type SecurityGroupIdentityByCRN struct { // The security group's CRN. CRN *string `json:"crn" validate:"required"` } // NewSecurityGroupIdentityByCRN : Instantiate SecurityGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupIdentityByCRN, err error) { _model = &SecurityGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupIdentityByCRN) isaSecurityGroupIdentity() bool { return true } // UnmarshalSecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupIdentityByCRN from the specified map of raw messages. func UnmarshalSecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupIdentityByHref : SecurityGroupIdentityByHref struct // This model "extends" SecurityGroupIdentity type SecurityGroupIdentityByHref struct { // The security group's canonical URL. Href *string `json:"href" validate:"required"` } // NewSecurityGroupIdentityByHref : Instantiate SecurityGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupIdentityByHref(href string) (_model *SecurityGroupIdentityByHref, err error) { _model = &SecurityGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupIdentityByHref) isaSecurityGroupIdentity() bool { return true } // UnmarshalSecurityGroupIdentityByHref unmarshals an instance of SecurityGroupIdentityByHref from the specified map of raw messages. func UnmarshalSecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupIdentityByID : SecurityGroupIdentityByID struct // This model "extends" SecurityGroupIdentity type SecurityGroupIdentityByID struct { // The unique identifier for this security group. ID *string `json:"id" validate:"required"` } // NewSecurityGroupIdentityByID : Instantiate SecurityGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupIdentityByID(id string) (_model *SecurityGroupIdentityByID, err error) { _model = &SecurityGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupIdentityByID) isaSecurityGroupIdentity() bool { return true } // UnmarshalSecurityGroupIdentityByID unmarshals an instance of SecurityGroupIdentityByID from the specified map of raw messages. func UnmarshalSecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : A rule allowing traffic for all supported protocols. // This model "extends" SecurityGroupRulePrototype type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct { // The direction of traffic to enforce. Direction *string `json:"direction" validate:"required"` // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. IPVersion *string `json:"ip_version,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The remote IP addresses or security groups from which this rule will allow traffic (or to // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group within the VPC. // // If unspecified, a CIDR block of `0.0.0.0/0` will be used to allow traffic from any source // (or to any destination, for outbound rules). Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"` } // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Direction property. // The direction of traffic to enforce. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" ) // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4" ) // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Protocol property. // The protocol to enforce. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolAllConst = "all" ) // NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction string, protocol string) (_model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll, err error) { _model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll{ Direction: core.StringPtr(direction), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) isaSecurityGroupRulePrototype() bool { return true } // UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll from the specified map of raw messages. func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : A rule specifying the ICMP traffic to allow. // This model "extends" SecurityGroupRulePrototype type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct { // The ICMP traffic code to allow. // // If specified, `type` must also be specified. If unspecified, all codes are allowed. Code *int64 `json:"code,omitempty"` // The direction of traffic to enforce. Direction *string `json:"direction" validate:"required"` // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. IPVersion *string `json:"ip_version,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The remote IP addresses or security groups from which this rule will allow traffic (or to // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group within the VPC. // // If unspecified, a CIDR block of `0.0.0.0/0` will be used to allow traffic from any source // (or to any destination, for outbound rules). Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"` // The ICMP traffic type to allow. // // If unspecified, all types are allowed. Type *int64 `json:"type,omitempty"` } // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Direction property. // The direction of traffic to enforce. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" ) // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4" ) // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" ) // NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction string, protocol string) (_model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp, err error) { _model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp{ Direction: core.StringPtr(direction), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) isaSecurityGroupRulePrototype() bool { return true } // UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp from the specified map of raw messages. func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : A rule specifying the TCP or UDP traffic to allow. // // Either both `port_min` and `port_max` will be present, or neither. When neither is present, all destination ports are // allowed for the protocol. When both have the same value, that single destination port is allowed. // This model "extends" SecurityGroupRulePrototype type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct { // The direction of traffic to enforce. Direction *string `json:"direction" validate:"required"` // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. IPVersion *string `json:"ip_version,omitempty"` // The inclusive upper bound of TCP/UDP destination port range. // // If specified, `port_min` must also be specified, and must not be larger. If unspecified, // `port_min` must also be unspecified, allowing traffic on all destination ports. PortMax *int64 `json:"port_max,omitempty"` // The inclusive lower bound of TCP/UDP destination port range // // If specified, `port_max` must also be specified, and must not be smaller. If unspecified, `port_max` must also be // unspecified, allowing traffic on all destination ports. PortMin *int64 `json:"port_min,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The remote IP addresses or security groups from which this rule will allow traffic (or to // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group within the VPC. // // If unspecified, a CIDR block of `0.0.0.0/0` will be used to allow traffic from any source // (or to any destination, for outbound rules). Remote SecurityGroupRuleRemotePrototypeIntf `json:"remote,omitempty"` } // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Direction property. // The direction of traffic to enforce. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" ) // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" ) // NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction string, protocol string) (_model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp, err error) { _model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp{ Direction: core.StringPtr(direction), Protocol: core.StringPtr(protocol), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRulePrototype() bool { return true } // UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp from the specified map of raw messages. func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemotePrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePatchCIDR : SecurityGroupRuleRemotePatchCIDR struct // This model "extends" SecurityGroupRuleRemotePatch type SecurityGroupRuleRemotePatchCIDR struct { // The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this // property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt // processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered. CIDRBlock *string `json:"cidr_block" validate:"required"` } // NewSecurityGroupRuleRemotePatchCIDR : Instantiate SecurityGroupRuleRemotePatchCIDR (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePatchCIDR(cidrBlock string) (_model *SecurityGroupRuleRemotePatchCIDR, err error) { _model = &SecurityGroupRuleRemotePatchCIDR{ CIDRBlock: core.StringPtr(cidrBlock), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePatchCIDR) isaSecurityGroupRuleRemotePatch() bool { return true } // UnmarshalSecurityGroupRuleRemotePatchCIDR unmarshals an instance of SecurityGroupRuleRemotePatchCIDR from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePatchCIDR(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePatchCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePatchIP : SecurityGroupRuleRemotePatchIP struct // This model "extends" SecurityGroupRuleRemotePatch type SecurityGroupRuleRemotePatchIP struct { // The IP address. // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewSecurityGroupRuleRemotePatchIP : Instantiate SecurityGroupRuleRemotePatchIP (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePatchIP(address string) (_model *SecurityGroupRuleRemotePatchIP, err error) { _model = &SecurityGroupRuleRemotePatchIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePatchIP) isaSecurityGroupRuleRemotePatch() bool { return true } // UnmarshalSecurityGroupRuleRemotePatchIP unmarshals an instance of SecurityGroupRuleRemotePatchIP from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePatchIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePatchIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePatchSecurityGroupIdentity : Identifies a security group by a unique property. // Models which "extend" this model: // - SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID // - SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN // - SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref // This model "extends" SecurityGroupRuleRemotePatch type SecurityGroupRuleRemotePatchSecurityGroupIdentity struct { // The unique identifier for this security group. ID *string `json:"id,omitempty"` // The security group's CRN. CRN *string `json:"crn,omitempty"` // The security group's canonical URL. Href *string `json:"href,omitempty"` } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentity) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool { return true } type SecurityGroupRuleRemotePatchSecurityGroupIdentityIntf interface { SecurityGroupRuleRemotePatchIntf isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentity) isaSecurityGroupRuleRemotePatch() bool { return true } // UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentity from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePrototypeCIDR : SecurityGroupRuleRemotePrototypeCIDR struct // This model "extends" SecurityGroupRuleRemotePrototype type SecurityGroupRuleRemotePrototypeCIDR struct { // The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this // property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt // processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered. CIDRBlock *string `json:"cidr_block" validate:"required"` } // NewSecurityGroupRuleRemotePrototypeCIDR : Instantiate SecurityGroupRuleRemotePrototypeCIDR (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePrototypeCIDR(cidrBlock string) (_model *SecurityGroupRuleRemotePrototypeCIDR, err error) { _model = &SecurityGroupRuleRemotePrototypeCIDR{ CIDRBlock: core.StringPtr(cidrBlock), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePrototypeCIDR) isaSecurityGroupRuleRemotePrototype() bool { return true } // UnmarshalSecurityGroupRuleRemotePrototypeCIDR unmarshals an instance of SecurityGroupRuleRemotePrototypeCIDR from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePrototypeCIDR(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePrototypeCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePrototypeIP : SecurityGroupRuleRemotePrototypeIP struct // This model "extends" SecurityGroupRuleRemotePrototype type SecurityGroupRuleRemotePrototypeIP struct { // The IP address. // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewSecurityGroupRuleRemotePrototypeIP : Instantiate SecurityGroupRuleRemotePrototypeIP (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePrototypeIP(address string) (_model *SecurityGroupRuleRemotePrototypeIP, err error) { _model = &SecurityGroupRuleRemotePrototypeIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePrototypeIP) isaSecurityGroupRuleRemotePrototype() bool { return true } // UnmarshalSecurityGroupRuleRemotePrototypeIP unmarshals an instance of SecurityGroupRuleRemotePrototypeIP from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePrototypeIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePrototypeIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePrototypeSecurityGroupIdentity : Identifies a security group by a unique property. // Models which "extend" this model: // - SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID // - SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN // - SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref // This model "extends" SecurityGroupRuleRemotePrototype type SecurityGroupRuleRemotePrototypeSecurityGroupIdentity struct { // The unique identifier for this security group. ID *string `json:"id,omitempty"` // The security group's CRN. CRN *string `json:"crn,omitempty"` // The security group's canonical URL. Href *string `json:"href,omitempty"` } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool { return true } type SecurityGroupRuleRemotePrototypeSecurityGroupIdentityIntf interface { SecurityGroupRuleRemotePrototypeIntf isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) isaSecurityGroupRuleRemotePrototype() bool { return true } // UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentity from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemoteCIDR : SecurityGroupRuleRemoteCIDR struct // This model "extends" SecurityGroupRuleRemote type SecurityGroupRuleRemoteCIDR struct { // The CIDR block. This property may add support for IPv6 CIDR blocks in the future. When processing a value in this // property, verify that the CIDR block is in an expected format. If it is not, log an error. Optionally halt // processing and surface the error, or bypass the resource on which the unexpected CIDR block format was encountered. CIDRBlock *string `json:"cidr_block" validate:"required"` } func (*SecurityGroupRuleRemoteCIDR) isaSecurityGroupRuleRemote() bool { return true } // UnmarshalSecurityGroupRuleRemoteCIDR unmarshals an instance of SecurityGroupRuleRemoteCIDR from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemoteCIDR) err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemoteIP : SecurityGroupRuleRemoteIP struct // This model "extends" SecurityGroupRuleRemote type SecurityGroupRuleRemoteIP struct { // The IP address. // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } func (*SecurityGroupRuleRemoteIP) isaSecurityGroupRuleRemote() bool { return true } // UnmarshalSecurityGroupRuleRemoteIP unmarshals an instance of SecurityGroupRuleRemoteIP from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemoteIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemoteSecurityGroupReference : SecurityGroupRuleRemoteSecurityGroupReference struct // This model "extends" SecurityGroupRuleRemote type SecurityGroupRuleRemoteSecurityGroupReference struct { // The security group's CRN. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *SecurityGroupReferenceDeleted `json:"deleted,omitempty"` // The security group's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this security group. ID *string `json:"id" validate:"required"` // The name for this security group. The name is unique across all security groups for the VPC. Name *string `json:"name" validate:"required"` } func (*SecurityGroupRuleRemoteSecurityGroupReference) isaSecurityGroupRuleRemote() bool { return true } // UnmarshalSecurityGroupRuleRemoteSecurityGroupReference unmarshals an instance of SecurityGroupRuleRemoteSecurityGroupReference from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemoteSecurityGroupReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemoteSecurityGroupReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalSecurityGroupReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleSecurityGroupRuleProtocolAll : A rule allowing traffic for all supported protocols. // This model "extends" SecurityGroupRule type SecurityGroupRuleSecurityGroupRuleProtocolAll struct { // The direction of traffic to enforce. Direction *string `json:"direction" validate:"required"` // The URL for this security group rule. Href *string `json:"href" validate:"required"` // The unique identifier for this security group rule. ID *string `json:"id" validate:"required"` // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. IPVersion *string `json:"ip_version" validate:"required"` Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` } // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Direction property. // The direction of traffic to enforce. const ( SecurityGroupRuleSecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" SecurityGroupRuleSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" ) // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. const ( SecurityGroupRuleSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4" ) // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Protocol property. // The protocol to enforce. const ( SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolAllConst = "all" ) func (*SecurityGroupRuleSecurityGroupRuleProtocolAll) isaSecurityGroupRule() bool { return true } // UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll unmarshals an instance of SecurityGroupRuleSecurityGroupRuleProtocolAll from the specified map of raw messages. func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleSecurityGroupRuleProtocolAll) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleSecurityGroupRuleProtocolIcmp : A rule specifying the ICMP traffic to allow. // This model "extends" SecurityGroupRule type SecurityGroupRuleSecurityGroupRuleProtocolIcmp struct { // The direction of traffic to enforce. Direction *string `json:"direction" validate:"required"` // The URL for this security group rule. Href *string `json:"href" validate:"required"` // The unique identifier for this security group rule. ID *string `json:"id" validate:"required"` // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. IPVersion *string `json:"ip_version" validate:"required"` Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The ICMP traffic code to allow. If absent, all codes are allowed. Code *int64 `json:"code,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` // The ICMP traffic type to allow. If absent, all types are allowed. Type *int64 `json:"type,omitempty"` } // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Direction property. // The direction of traffic to enforce. const ( SecurityGroupRuleSecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" SecurityGroupRuleSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" ) // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. const ( SecurityGroupRuleSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4" ) // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" ) func (*SecurityGroupRuleSecurityGroupRuleProtocolIcmp) isaSecurityGroupRule() bool { return true } // UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRuleSecurityGroupRuleProtocolIcmp from the specified map of raw messages. func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleSecurityGroupRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { return } err = core.UnmarshalPrimitive(m, "code", &obj.Code) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleSecurityGroupRuleProtocolTcpudp : A rule specifying the TCP or UDP traffic to allow. // // Either both `port_min` and `port_max` will be present, or neither. When neither is present, all destination ports are // allowed for the protocol. When both have the same value, that single destination port is allowed. // This model "extends" SecurityGroupRule type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp struct { // The direction of traffic to enforce. Direction *string `json:"direction" validate:"required"` // The URL for this security group rule. Href *string `json:"href" validate:"required"` // The unique identifier for this security group rule. ID *string `json:"id" validate:"required"` // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. IPVersion *string `json:"ip_version" validate:"required"` Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. PortMax *int64 `json:"port_max,omitempty"` // The inclusive lower bound of TCP/UDP destination port range. PortMin *int64 `json:"port_min,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` } // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Direction property. // The direction of traffic to enforce. const ( SecurityGroupRuleSecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" SecurityGroupRuleSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this property, if they // are used. Alternatively, if `remote` references a security group, then this rule only applies to IP addresses // (network interfaces) in that group matching this IP version. const ( SecurityGroupRuleSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" ) // Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" ) func (*SecurityGroupRuleSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRule() bool { return true } // UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp unmarshals an instance of SecurityGroupRuleSecurityGroupRuleProtocolTcpudp from the specified map of raw messages. func UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleSecurityGroupRuleProtocolTcpudp) err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { return } err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { return } err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext : SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext struct // This model "extends" SecurityGroupTargetReference type SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *BareMetalServerNetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` // The URL for this bare metal server network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this bare metal server network interface. ID *string `json:"id" validate:"required"` // The name for this bare metal server network interface. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext.ResourceType property. // The resource type. const ( SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" ) func (*SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext) isaSecurityGroupTargetReference() bool { return true } // UnmarshalSecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext unmarshals an instance of SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext from the specified map of raw messages. func UnmarshalSecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupTargetReferenceBareMetalServerNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalBareMetalServerNetworkInterfaceReferenceTargetContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupTargetReferenceEndpointGatewayReference : SecurityGroupTargetReferenceEndpointGatewayReference struct // This model "extends" SecurityGroupTargetReference type SecurityGroupTargetReferenceEndpointGatewayReference struct { // The CRN for this endpoint gateway. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *EndpointGatewayReferenceDeleted `json:"deleted,omitempty"` // The URL for this endpoint gateway. Href *string `json:"href" validate:"required"` // The unique identifier for this endpoint gateway. ID *string `json:"id" validate:"required"` // The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the SecurityGroupTargetReferenceEndpointGatewayReference.ResourceType property. // The resource type. const ( SecurityGroupTargetReferenceEndpointGatewayReferenceResourceTypeEndpointGatewayConst = "endpoint_gateway" ) func (*SecurityGroupTargetReferenceEndpointGatewayReference) isaSecurityGroupTargetReference() bool { return true } // UnmarshalSecurityGroupTargetReferenceEndpointGatewayReference unmarshals an instance of SecurityGroupTargetReferenceEndpointGatewayReference from the specified map of raw messages. func UnmarshalSecurityGroupTargetReferenceEndpointGatewayReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupTargetReferenceEndpointGatewayReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalEndpointGatewayReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupTargetReferenceLoadBalancerReference : SecurityGroupTargetReferenceLoadBalancerReference struct // This model "extends" SecurityGroupTargetReference type SecurityGroupTargetReferenceLoadBalancerReference struct { // The load balancer's CRN. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *LoadBalancerReferenceDeleted `json:"deleted,omitempty"` // The load balancer's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this load balancer. ID *string `json:"id" validate:"required"` // The name for this load balancer. The name is unique across all load balancers in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the SecurityGroupTargetReferenceLoadBalancerReference.ResourceType property. // The resource type. const ( SecurityGroupTargetReferenceLoadBalancerReferenceResourceTypeLoadBalancerConst = "load_balancer" ) func (*SecurityGroupTargetReferenceLoadBalancerReference) isaSecurityGroupTargetReference() bool { return true } // UnmarshalSecurityGroupTargetReferenceLoadBalancerReference unmarshals an instance of SecurityGroupTargetReferenceLoadBalancerReference from the specified map of raw messages. func UnmarshalSecurityGroupTargetReferenceLoadBalancerReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupTargetReferenceLoadBalancerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalLoadBalancerReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext : SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext struct // This model "extends" SecurityGroupTargetReference type SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *NetworkInterfaceReferenceTargetContextDeleted `json:"deleted,omitempty"` // The URL for this instance network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` // The name for this instance network interface. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext.ResourceType property. // The resource type. const ( SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" ) func (*SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext) isaSecurityGroupTargetReference() bool { return true } // UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext unmarshals an instance of SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext from the specified map of raw messages. func UnmarshalSecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupTargetReferenceNetworkInterfaceReferenceTargetContext) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalNetworkInterfaceReferenceTargetContextDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupTargetReferenceVPNServerReference : SecurityGroupTargetReferenceVPNServerReference struct // This model "extends" SecurityGroupTargetReference type SecurityGroupTargetReferenceVPNServerReference struct { // The CRN for this VPN server. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VPNServerReferenceDeleted `json:"deleted,omitempty"` // The URL for this VPN server. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN server. ID *string `json:"id" validate:"required"` // The name for this VPN server. The name is unique across all VPN servers in the VPC. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the SecurityGroupTargetReferenceVPNServerReference.ResourceType property. // The resource type. const ( SecurityGroupTargetReferenceVPNServerReferenceResourceTypeVPNServerConst = "vpn_server" ) func (*SecurityGroupTargetReferenceVPNServerReference) isaSecurityGroupTargetReference() bool { return true } // UnmarshalSecurityGroupTargetReferenceVPNServerReference unmarshals an instance of SecurityGroupTargetReferenceVPNServerReference from the specified map of raw messages. func UnmarshalSecurityGroupTargetReferenceVPNServerReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupTargetReferenceVPNServerReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVPNServerReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupTargetReferenceVirtualNetworkInterfaceReference : SecurityGroupTargetReferenceVirtualNetworkInterfaceReference struct // This model "extends" SecurityGroupTargetReference type SecurityGroupTargetReferenceVirtualNetworkInterfaceReference struct { // The CRN for this virtual network interface. CRN *string `json:"crn" validate:"required"` // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *VirtualNetworkInterfaceReferenceDeleted `json:"deleted,omitempty"` // The URL for this virtual network interface. Href *string `json:"href" validate:"required"` // The unique identifier for this virtual network interface. ID *string `json:"id" validate:"required"` // The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. Name *string `json:"name" validate:"required"` // The primary IP for this virtual network interface. PrimaryIP *ReservedIPReference `json:"primary_ip" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The associated subnet. Subnet *SubnetReference `json:"subnet" validate:"required"` } // Constants associated with the SecurityGroupTargetReferenceVirtualNetworkInterfaceReference.ResourceType property. // The resource type. const ( SecurityGroupTargetReferenceVirtualNetworkInterfaceReferenceResourceTypeVirtualNetworkInterfaceConst = "virtual_network_interface" ) func (*SecurityGroupTargetReferenceVirtualNetworkInterfaceReference) isaSecurityGroupTargetReference() bool { return true } // UnmarshalSecurityGroupTargetReferenceVirtualNetworkInterfaceReference unmarshals an instance of SecurityGroupTargetReferenceVirtualNetworkInterfaceReference from the specified map of raw messages. func UnmarshalSecurityGroupTargetReferenceVirtualNetworkInterfaceReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupTargetReferenceVirtualNetworkInterfaceReference) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalVirtualNetworkInterfaceReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalReservedIPReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareIdentityByCRN : ShareIdentityByCRN struct // This model "extends" ShareIdentity type ShareIdentityByCRN struct { // The CRN for this file share. CRN *string `json:"crn" validate:"required"` } // NewShareIdentityByCRN : Instantiate ShareIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewShareIdentityByCRN(crn string) (_model *ShareIdentityByCRN, err error) { _model = &ShareIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareIdentityByCRN) isaShareIdentity() bool { return true } // UnmarshalShareIdentityByCRN unmarshals an instance of ShareIdentityByCRN from the specified map of raw messages. func UnmarshalShareIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareIdentityByHref : ShareIdentityByHref struct // This model "extends" ShareIdentity type ShareIdentityByHref struct { // The URL for this file share. Href *string `json:"href" validate:"required"` } // NewShareIdentityByHref : Instantiate ShareIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewShareIdentityByHref(href string) (_model *ShareIdentityByHref, err error) { _model = &ShareIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareIdentityByHref) isaShareIdentity() bool { return true } // UnmarshalShareIdentityByHref unmarshals an instance of ShareIdentityByHref from the specified map of raw messages. func UnmarshalShareIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareIdentityByID : ShareIdentityByID struct // This model "extends" ShareIdentity type ShareIdentityByID struct { // The unique identifier for this file share. ID *string `json:"id" validate:"required"` } // NewShareIdentityByID : Instantiate ShareIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewShareIdentityByID(id string) (_model *ShareIdentityByID, err error) { _model = &ShareIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareIdentityByID) isaShareIdentity() bool { return true } // UnmarshalShareIdentityByID unmarshals an instance of ShareIdentityByID from the specified map of raw messages. func UnmarshalShareIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup : The virtual network interface for this share mount target. The virtual network interface's VPC must not be used by a // virtual network interface for another mount target for this share. // // Required if the share's `access_control_mode` is `security_group`. // This model "extends" ShareMountTargetPrototype type ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup struct { // The name for this share mount target. The name must not be used by another mount target for the file share. Name *string `json:"name,omitempty"` // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. // - `user_managed`: Encrypted in transit using an instance identity certificate. The // `access_control_mode` for the share must be `security_group`. TransitEncryption *string `json:"transit_encryption,omitempty"` VirtualNetworkInterface ShareMountTargetVirtualNetworkInterfacePrototypeIntf `json:"virtual_network_interface" validate:"required"` } // Constants associated with the ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup.TransitEncryption property. // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. // - `user_managed`: Encrypted in transit using an instance identity certificate. The // `access_control_mode` for the share must be `security_group`. const ( ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionNoneConst = "none" ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroupTransitEncryptionUserManagedConst = "user_managed" ) // NewShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup : Instantiate ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup (Generic Model Constructor) func (*VpcbetaV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(virtualNetworkInterface ShareMountTargetVirtualNetworkInterfacePrototypeIntf) (_model *ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup, err error) { _model = &ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup{ VirtualNetworkInterface: virtualNetworkInterface, } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup) isaShareMountTargetPrototype() bool { return true } // UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup unmarshals an instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup from the specified map of raw messages. func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareMountTargetPrototypeShareMountTargetByAccessControlModeSecurityGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "transit_encryption", &obj.TransitEncryption) if err != nil { return } err = core.UnmarshalModel(m, "virtual_network_interface", &obj.VirtualNetworkInterface, UnmarshalShareMountTargetVirtualNetworkInterfacePrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC : The VPC in which clients can mount the file share using this mount target. The VPC must not be used by another mount // target for this share. // // Required if the share's `access_control_mode` is `vpc`. // This model "extends" ShareMountTargetPrototype type ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC struct { // The name for this share mount target. The name must not be used by another mount target for the file share. Name *string `json:"name,omitempty"` // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. // - `user_managed`: Encrypted in transit using an instance identity certificate. The // `access_control_mode` for the share must be `security_group`. TransitEncryption *string `json:"transit_encryption,omitempty"` // Identifies a VPC by a unique property. VPC VPCIdentityIntf `json:"vpc" validate:"required"` } // Constants associated with the ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC.TransitEncryption property. // The transit encryption mode to use for this share mount target: // - `none`: Not encrypted in transit. // - `user_managed`: Encrypted in transit using an instance identity certificate. The // `access_control_mode` for the share must be `security_group`. const ( ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionNoneConst = "none" ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPCTransitEncryptionUserManagedConst = "user_managed" ) // NewShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC : Instantiate ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC (Generic Model Constructor) func (*VpcbetaV1) NewShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(vpc VPCIdentityIntf) (_model *ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC, err error) { _model = &ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC{ VPC: vpc, } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC) isaShareMountTargetPrototype() bool { return true } // UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC unmarshals an instance of ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC from the specified map of raw messages. func UnmarshalShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareMountTargetPrototypeShareMountTargetByAccessControlModeVPC) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "transit_encryption", &obj.TransitEncryption) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext : The virtual network interface for this target. // This model "extends" ShareMountTargetVirtualNetworkInterfacePrototype type ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext struct { // The name for this virtual network interface. The name must not be used by another virtual network interface in the // VPC. If unspecified, the name will be a hyphenated list of randomly-selected words. Names beginning with `ibm-` are // reserved for provider-owned resources, and are not allowed. Name *string `json:"name,omitempty"` // The primary IP address to bind to the virtual network interface. May be either a // reserved IP identity, or a reserved IP prototype object which will be used to create a // new reserved IP. // // If a reserved IP identity is provided, the specified reserved IP must be unbound. // // If a reserved IP prototype object with an address is provided, the address must be // available on the virtual network interface's subnet. If no address is specified, // an available address on the subnet will be automatically selected and reserved. PrimaryIP VirtualNetworkInterfacePrimaryIPPrototypeIntf `json:"primary_ip,omitempty"` // The resource group to use. If unspecified, the account's [default resource // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The security groups to use for this virtual network interface. If unspecified, the default security group of the VPC // for the subnet is used. SecurityGroups []SecurityGroupIdentityIntf `json:"security_groups,omitempty"` // The associated subnet. Required if `primary_ip` does not specify a reserved IP and // `primary_ip.address` is not specified. Subnet SubnetIdentityIntf `json:"subnet,omitempty"` } func (*ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext) isaShareMountTargetVirtualNetworkInterfacePrototype() bool { return true } // UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext unmarshals an instance of ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext from the specified map of raw messages. func UnmarshalShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareMountTargetVirtualNetworkInterfacePrototypeVirtualNetworkInterfacePrototypeShareMountTargetContext) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "primary_ip", &obj.PrimaryIP, UnmarshalVirtualNetworkInterfacePrimaryIPPrototype) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "security_groups", &obj.SecurityGroups, UnmarshalSecurityGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileCapacityDependentRange : The permitted total capacity (in gigabytes) of a share with this profile depends on its configuration. // This model "extends" ShareProfileCapacity type ShareProfileCapacityDependentRange struct { // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the ShareProfileCapacityDependentRange.Type property. // The type for this profile field. const ( ShareProfileCapacityDependentRangeTypeDependentConst = "dependent" ShareProfileCapacityDependentRangeTypeDependentRangeConst = "dependent_range" ) func (*ShareProfileCapacityDependentRange) isaShareProfileCapacity() bool { return true } // UnmarshalShareProfileCapacityDependentRange unmarshals an instance of ShareProfileCapacityDependentRange from the specified map of raw messages. func UnmarshalShareProfileCapacityDependentRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileCapacityDependentRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileCapacityEnum : The permitted total capacities (in gigabytes) of a share with this profile. // This model "extends" ShareProfileCapacity type ShareProfileCapacityEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the ShareProfileCapacityEnum.Type property. // The type for this profile field. const ( ShareProfileCapacityEnumTypeEnumConst = "enum" ) func (*ShareProfileCapacityEnum) isaShareProfileCapacity() bool { return true } // UnmarshalShareProfileCapacityEnum unmarshals an instance of ShareProfileCapacityEnum from the specified map of raw messages. func UnmarshalShareProfileCapacityEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileCapacityEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileCapacityFixed : The permitted total capacity (in gigabytes) of a share with this profile is fixed. // This model "extends" ShareProfileCapacity type ShareProfileCapacityFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the ShareProfileCapacityFixed.Type property. // The type for this profile field. const ( ShareProfileCapacityFixedTypeFixedConst = "fixed" ) func (*ShareProfileCapacityFixed) isaShareProfileCapacity() bool { return true } // UnmarshalShareProfileCapacityFixed unmarshals an instance of ShareProfileCapacityFixed from the specified map of raw messages. func UnmarshalShareProfileCapacityFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileCapacityFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileCapacityRange : The permitted total capacity range (in gigabytes) of a share with this profile. // This model "extends" ShareProfileCapacity type ShareProfileCapacityRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the ShareProfileCapacityRange.Type property. // The type for this profile field. const ( ShareProfileCapacityRangeTypeRangeConst = "range" ) func (*ShareProfileCapacityRange) isaShareProfileCapacity() bool { return true } // UnmarshalShareProfileCapacityRange unmarshals an instance of ShareProfileCapacityRange from the specified map of raw messages. func UnmarshalShareProfileCapacityRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileCapacityRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileIopsDependentRange : The permitted IOPS range of a share with this profile depends on its configuration. // This model "extends" ShareProfileIops type ShareProfileIopsDependentRange struct { // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the ShareProfileIopsDependentRange.Type property. // The type for this profile field. const ( ShareProfileIopsDependentRangeTypeDependentConst = "dependent" ShareProfileIopsDependentRangeTypeDependentRangeConst = "dependent_range" ) func (*ShareProfileIopsDependentRange) isaShareProfileIops() bool { return true } // UnmarshalShareProfileIopsDependentRange unmarshals an instance of ShareProfileIopsDependentRange from the specified map of raw messages. func UnmarshalShareProfileIopsDependentRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileIopsDependentRange) err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileIopsEnum : The permitted IOPS values of a share with this profile. // This model "extends" ShareProfileIops type ShareProfileIopsEnum struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` // The permitted values for this profile field. Values []int64 `json:"values" validate:"required"` } // Constants associated with the ShareProfileIopsEnum.Type property. // The type for this profile field. const ( ShareProfileIopsEnumTypeEnumConst = "enum" ) func (*ShareProfileIopsEnum) isaShareProfileIops() bool { return true } // UnmarshalShareProfileIopsEnum unmarshals an instance of ShareProfileIopsEnum from the specified map of raw messages. func UnmarshalShareProfileIopsEnum(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileIopsEnum) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "values", &obj.Values) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileIopsFixed : The permitted IOPS of a share with this profile is fixed. // This model "extends" ShareProfileIops type ShareProfileIopsFixed struct { // The type for this profile field. Type *string `json:"type" validate:"required"` // The value for this profile field. Value *int64 `json:"value" validate:"required"` } // Constants associated with the ShareProfileIopsFixed.Type property. // The type for this profile field. const ( ShareProfileIopsFixedTypeFixedConst = "fixed" ) func (*ShareProfileIopsFixed) isaShareProfileIops() bool { return true } // UnmarshalShareProfileIopsFixed unmarshals an instance of ShareProfileIopsFixed from the specified map of raw messages. func UnmarshalShareProfileIopsFixed(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileIopsFixed) err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } err = core.UnmarshalPrimitive(m, "value", &obj.Value) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileIopsRange : The permitted IOPS range of a share with this profile. // This model "extends" ShareProfileIops type ShareProfileIopsRange struct { // The default value for this profile field. Default *int64 `json:"default" validate:"required"` // The maximum value for this profile field. Max *int64 `json:"max" validate:"required"` // The minimum value for this profile field. Min *int64 `json:"min" validate:"required"` // The increment step value for this profile field. Step *int64 `json:"step" validate:"required"` // The type for this profile field. Type *string `json:"type" validate:"required"` } // Constants associated with the ShareProfileIopsRange.Type property. // The type for this profile field. const ( ShareProfileIopsRangeTypeRangeConst = "range" ) func (*ShareProfileIopsRange) isaShareProfileIops() bool { return true } // UnmarshalShareProfileIopsRange unmarshals an instance of ShareProfileIopsRange from the specified map of raw messages. func UnmarshalShareProfileIopsRange(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileIopsRange) err = core.UnmarshalPrimitive(m, "default", &obj.Default) if err != nil { return } err = core.UnmarshalPrimitive(m, "max", &obj.Max) if err != nil { return } err = core.UnmarshalPrimitive(m, "min", &obj.Min) if err != nil { return } err = core.UnmarshalPrimitive(m, "step", &obj.Step) if err != nil { return } err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileIdentityByHref : ShareProfileIdentityByHref struct // This model "extends" ShareProfileIdentity type ShareProfileIdentityByHref struct { // The URL for this share profile. Href *string `json:"href" validate:"required"` } // NewShareProfileIdentityByHref : Instantiate ShareProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewShareProfileIdentityByHref(href string) (_model *ShareProfileIdentityByHref, err error) { _model = &ShareProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareProfileIdentityByHref) isaShareProfileIdentity() bool { return true } // UnmarshalShareProfileIdentityByHref unmarshals an instance of ShareProfileIdentityByHref from the specified map of raw messages. func UnmarshalShareProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ShareProfileIdentityByName : ShareProfileIdentityByName struct // This model "extends" ShareProfileIdentity type ShareProfileIdentityByName struct { // The globally unique name for this share profile. Name *string `json:"name" validate:"required"` } // NewShareProfileIdentityByName : Instantiate ShareProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewShareProfileIdentityByName(name string) (_model *ShareProfileIdentityByName, err error) { _model = &ShareProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*ShareProfileIdentityByName) isaShareProfileIdentity() bool { return true } // UnmarshalShareProfileIdentityByName unmarshals an instance of ShareProfileIdentityByName from the specified map of raw messages. func UnmarshalShareProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ShareProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SharePrototypeShareBySize : Create a file share by size. // This model "extends" SharePrototype type SharePrototypeShareBySize struct { // The maximum input/output operations per second (IOPS) for the file share. The share must be in the `custom` or // `defined_performance` profile family, and the value must be in the range supported by the share's specified size. // // In addition, each client accessing the share will be restricted to 48,000 IOPS. Iops *int64 `json:"iops,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. MountTargets []ShareMountTargetPrototypeIntf `json:"mount_targets,omitempty"` // The name for this share. The name must not be used by another share in the region. If unspecified, the name will be // a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use for this file share. The // profile must support the share's specified IOPS and size. Profile ShareProfileIdentityIntf `json:"profile" validate:"required"` ReplicaShare *SharePrototypeShareContext `json:"replica_share,omitempty"` // Tags for this resource. UserTags []string `json:"user_tags,omitempty"` // The zone this file share will reside in. For a replica share, this must be a different zone in the same region as // the source share. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The access control mode for the share: // // - `security_group`: The security groups on the virtual network interface for a // mount target control access to the mount target. Mount targets for this share // require a virtual network interface. // - `vpc`: All clients in the VPC for a mount target have access to the mount target. // Mount targets for this share require a VPC. AccessControlMode *string `json:"access_control_mode,omitempty"` // The root key to use to wrap the data encryption key for the share. // // If unspecified, the `encryption` type for the share will be `provider_managed`. // // The specified key may be in a different account, subject to IAM policies. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The owner assigned to the file share at creation. Subsequent changes to the owner // must be performed by a client that has mounted the file share. InitialOwner *ShareInitialOwner `json:"initial_owner,omitempty"` // The resource group to use. If unspecified, the account's [default resource // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The size of the file share rounded up to the next gigabyte. // // The maximum size for a share may increase in the future. Size *int64 `json:"size" validate:"required"` } // Constants associated with the SharePrototypeShareBySize.AccessControlMode property. // The access control mode for the share: // // - `security_group`: The security groups on the virtual network interface for a // mount target control access to the mount target. Mount targets for this share // require a virtual network interface. // - `vpc`: All clients in the VPC for a mount target have access to the mount target. // Mount targets for this share require a VPC. const ( SharePrototypeShareBySizeAccessControlModeSecurityGroupConst = "security_group" SharePrototypeShareBySizeAccessControlModeVPCConst = "vpc" ) // NewSharePrototypeShareBySize : Instantiate SharePrototypeShareBySize (Generic Model Constructor) func (*VpcbetaV1) NewSharePrototypeShareBySize(profile ShareProfileIdentityIntf, zone ZoneIdentityIntf, size int64) (_model *SharePrototypeShareBySize, err error) { _model = &SharePrototypeShareBySize{ Profile: profile, Zone: zone, Size: core.Int64Ptr(size), } err = core.ValidateStruct(_model, "required parameters") return } func (*SharePrototypeShareBySize) isaSharePrototype() bool { return true } // UnmarshalSharePrototypeShareBySize unmarshals an instance of SharePrototypeShareBySize from the specified map of raw messages. func UnmarshalSharePrototypeShareBySize(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SharePrototypeShareBySize) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "replica_share", &obj.ReplicaShare, UnmarshalSharePrototypeShareContext) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "access_control_mode", &obj.AccessControlMode) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "initial_owner", &obj.InitialOwner, UnmarshalShareInitialOwner) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "size", &obj.Size) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SharePrototypeShareBySourceShare : Create a replica file share for an existing file share. The values for `access_control_mode`, // `encryption_key`, `initial_owner`, and `size` will be inherited from `source_share`. // This model "extends" SharePrototype type SharePrototypeShareBySourceShare struct { // The maximum input/output operations per second (IOPS) for the file share. The share must be in the `custom` or // `defined_performance` profile family, and the value must be in the range supported by the share's specified size. // // In addition, each client accessing the share will be restricted to 48,000 IOPS. Iops *int64 `json:"iops,omitempty"` // The mount targets for the file share. Each mount target must be in a unique VPC. MountTargets []ShareMountTargetPrototypeIntf `json:"mount_targets,omitempty"` // The name for this share. The name must not be used by another share in the region. If unspecified, the name will be // a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-file-storage-profiles) to use for this file share. The // profile must support the share's specified IOPS and size. Profile ShareProfileIdentityIntf `json:"profile" validate:"required"` ReplicaShare *SharePrototypeShareContext `json:"replica_share,omitempty"` // Tags for this resource. UserTags []string `json:"user_tags,omitempty"` // The zone this file share will reside in. For a replica share, this must be a different zone in the same region as // the source share. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The cron specification for the file share replication schedule. // // Replication of a share can be scheduled to occur at most once per hour. ReplicationCronSpec *string `json:"replication_cron_spec" validate:"required"` // The resource group to use. If unspecified, the resource group from // the source share will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The source file share for this replica file share. The specified file share must not // already have a replica, and must not be a replica. SourceShare ShareIdentityIntf `json:"source_share" validate:"required"` } // NewSharePrototypeShareBySourceShare : Instantiate SharePrototypeShareBySourceShare (Generic Model Constructor) func (*VpcbetaV1) NewSharePrototypeShareBySourceShare(profile ShareProfileIdentityIntf, zone ZoneIdentityIntf, replicationCronSpec string, sourceShare ShareIdentityIntf) (_model *SharePrototypeShareBySourceShare, err error) { _model = &SharePrototypeShareBySourceShare{ Profile: profile, Zone: zone, ReplicationCronSpec: core.StringPtr(replicationCronSpec), SourceShare: sourceShare, } err = core.ValidateStruct(_model, "required parameters") return } func (*SharePrototypeShareBySourceShare) isaSharePrototype() bool { return true } // UnmarshalSharePrototypeShareBySourceShare unmarshals an instance of SharePrototypeShareBySourceShare from the specified map of raw messages. func UnmarshalSharePrototypeShareBySourceShare(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SharePrototypeShareBySourceShare) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalModel(m, "mount_targets", &obj.MountTargets, UnmarshalShareMountTargetPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalShareProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "replica_share", &obj.ReplicaShare, UnmarshalSharePrototypeShareContext) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "replication_cron_spec", &obj.ReplicationCronSpec) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_share", &obj.SourceShare, UnmarshalShareIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SnapshotIdentityByCRN : SnapshotIdentityByCRN struct // This model "extends" SnapshotIdentity type SnapshotIdentityByCRN struct { // The CRN of this snapshot. CRN *string `json:"crn" validate:"required"` } // NewSnapshotIdentityByCRN : Instantiate SnapshotIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewSnapshotIdentityByCRN(crn string) (_model *SnapshotIdentityByCRN, err error) { _model = &SnapshotIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*SnapshotIdentityByCRN) isaSnapshotIdentity() bool { return true } // UnmarshalSnapshotIdentityByCRN unmarshals an instance of SnapshotIdentityByCRN from the specified map of raw messages. func UnmarshalSnapshotIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SnapshotIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SnapshotIdentityByHref : SnapshotIdentityByHref struct // This model "extends" SnapshotIdentity type SnapshotIdentityByHref struct { // The URL for this snapshot. Href *string `json:"href" validate:"required"` } // NewSnapshotIdentityByHref : Instantiate SnapshotIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewSnapshotIdentityByHref(href string) (_model *SnapshotIdentityByHref, err error) { _model = &SnapshotIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*SnapshotIdentityByHref) isaSnapshotIdentity() bool { return true } // UnmarshalSnapshotIdentityByHref unmarshals an instance of SnapshotIdentityByHref from the specified map of raw messages. func UnmarshalSnapshotIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SnapshotIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SnapshotIdentityByID : SnapshotIdentityByID struct // This model "extends" SnapshotIdentity type SnapshotIdentityByID struct { // The unique identifier for this snapshot. ID *string `json:"id" validate:"required"` } // NewSnapshotIdentityByID : Instantiate SnapshotIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewSnapshotIdentityByID(id string) (_model *SnapshotIdentityByID, err error) { _model = &SnapshotIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*SnapshotIdentityByID) isaSnapshotIdentity() bool { return true } // UnmarshalSnapshotIdentityByID unmarshals an instance of SnapshotIdentityByID from the specified map of raw messages. func UnmarshalSnapshotIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SnapshotIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SnapshotPrototypeSnapshotBySourceSnapshot : SnapshotPrototypeSnapshotBySourceSnapshot struct // This model "extends" SnapshotPrototype type SnapshotPrototypeSnapshotBySourceSnapshot struct { // Clones to create for this snapshot. Clones []SnapshotClonePrototype `json:"clones,omitempty"` // The name for this snapshot. The name must not be used by another snapshot in the region. If unspecified, the name // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this snapshot. UserTags []string `json:"user_tags,omitempty"` // The root key to use to wrap the data encryption key for this snapshot. // // A key must be specified if and only if the source snapshot has an `encryption` type of // `user_managed`. To maximize snapshot availability and sharing of snapshot data, specify // a key in the same region as the new snapshot, and use the same encryption key for all // snapshots using the same source volume. // // The specified key may be in a different account, subject to IAM policies. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The source snapshot (in another region) to create this snapshot from. // The specified snapshot must not already be the source of another snapshot in this // region. SourceSnapshot *SnapshotIdentityByCRN `json:"source_snapshot" validate:"required"` } // NewSnapshotPrototypeSnapshotBySourceSnapshot : Instantiate SnapshotPrototypeSnapshotBySourceSnapshot (Generic Model Constructor) func (*VpcbetaV1) NewSnapshotPrototypeSnapshotBySourceSnapshot(sourceSnapshot *SnapshotIdentityByCRN) (_model *SnapshotPrototypeSnapshotBySourceSnapshot, err error) { _model = &SnapshotPrototypeSnapshotBySourceSnapshot{ SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") return } func (*SnapshotPrototypeSnapshotBySourceSnapshot) isaSnapshotPrototype() bool { return true } // UnmarshalSnapshotPrototypeSnapshotBySourceSnapshot unmarshals an instance of SnapshotPrototypeSnapshotBySourceSnapshot from the specified map of raw messages. func UnmarshalSnapshotPrototypeSnapshotBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SnapshotPrototypeSnapshotBySourceSnapshot) err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClonePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentityByCRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SnapshotPrototypeSnapshotBySourceVolume : SnapshotPrototypeSnapshotBySourceVolume struct // This model "extends" SnapshotPrototype type SnapshotPrototypeSnapshotBySourceVolume struct { // Clones to create for this snapshot. Clones []SnapshotClonePrototype `json:"clones,omitempty"` // The name for this snapshot. The name must not be used by another snapshot in the region. If unspecified, the name // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this snapshot. UserTags []string `json:"user_tags,omitempty"` // The volume to create this snapshot from. SourceVolume VolumeIdentityIntf `json:"source_volume" validate:"required"` } // NewSnapshotPrototypeSnapshotBySourceVolume : Instantiate SnapshotPrototypeSnapshotBySourceVolume (Generic Model Constructor) func (*VpcbetaV1) NewSnapshotPrototypeSnapshotBySourceVolume(sourceVolume VolumeIdentityIntf) (_model *SnapshotPrototypeSnapshotBySourceVolume, err error) { _model = &SnapshotPrototypeSnapshotBySourceVolume{ SourceVolume: sourceVolume, } err = core.ValidateStruct(_model, "required parameters") return } func (*SnapshotPrototypeSnapshotBySourceVolume) isaSnapshotPrototype() bool { return true } // UnmarshalSnapshotPrototypeSnapshotBySourceVolume unmarshals an instance of SnapshotPrototypeSnapshotBySourceVolume from the specified map of raw messages. func UnmarshalSnapshotPrototypeSnapshotBySourceVolume(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SnapshotPrototypeSnapshotBySourceVolume) err = core.UnmarshalModel(m, "clones", &obj.Clones, UnmarshalSnapshotClonePrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "source_volume", &obj.SourceVolume, UnmarshalVolumeIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetIdentityByCRN : SubnetIdentityByCRN struct // This model "extends" SubnetIdentity type SubnetIdentityByCRN struct { // The CRN for this subnet. CRN *string `json:"crn" validate:"required"` } // NewSubnetIdentityByCRN : Instantiate SubnetIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewSubnetIdentityByCRN(crn string) (_model *SubnetIdentityByCRN, err error) { _model = &SubnetIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetIdentityByCRN) isaSubnetIdentity() bool { return true } // UnmarshalSubnetIdentityByCRN unmarshals an instance of SubnetIdentityByCRN from the specified map of raw messages. func UnmarshalSubnetIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetIdentityByHref : SubnetIdentityByHref struct // This model "extends" SubnetIdentity type SubnetIdentityByHref struct { // The URL for this subnet. Href *string `json:"href" validate:"required"` } // NewSubnetIdentityByHref : Instantiate SubnetIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewSubnetIdentityByHref(href string) (_model *SubnetIdentityByHref, err error) { _model = &SubnetIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetIdentityByHref) isaSubnetIdentity() bool { return true } // UnmarshalSubnetIdentityByHref unmarshals an instance of SubnetIdentityByHref from the specified map of raw messages. func UnmarshalSubnetIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetIdentityByID : SubnetIdentityByID struct // This model "extends" SubnetIdentity type SubnetIdentityByID struct { // The unique identifier for this subnet. ID *string `json:"id" validate:"required"` } // NewSubnetIdentityByID : Instantiate SubnetIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewSubnetIdentityByID(id string) (_model *SubnetIdentityByID, err error) { _model = &SubnetIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetIdentityByID) isaSubnetIdentity() bool { return true } // UnmarshalSubnetIdentityByID unmarshals an instance of SubnetIdentityByID from the specified map of raw messages. func UnmarshalSubnetIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetPrototypeSubnetByCIDR : SubnetPrototypeSubnetByCIDR struct // This model "extends" SubnetPrototype type SubnetPrototypeSubnetByCIDR struct { // The IP version(s) to support for this subnet. IPVersion *string `json:"ip_version,omitempty"` // The name for this subnet. The name must not be used by another subnet in the VPC. If unspecified, the name will be a // hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The network ACL to use for this subnet. NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` // The public gateway to use for internet-bound traffic for this subnet. If unspecified, the subnet will not be // attached to a public gateway. PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The routing table to use for this subnet. If unspecified, the default routing table for the VPC is used. The routing // table properties `route_direct_link_ingress`, // `route_internet_ingress`, `route_transit_gateway_ingress`, and // `route_vpc_zone_ingress` must be `false`. RoutingTable RoutingTableIdentityIntf `json:"routing_table,omitempty"` // The VPC the subnet will reside in. VPC VPCIdentityIntf `json:"vpc" validate:"required"` // The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between `/9` // (8,388,608 addresses) and `/29` (8 addresses). The IPv4 range of the subnet's CIDR must fall within an existing // address prefix in the VPC and must not overlap with any existing subnet. The subnet will be created in the zone of // the address prefix that contains the IPv4 CIDR. If zone is specified, it must match the zone of the address prefix // that contains the subnet's IPv4 CIDR. Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"` // The zone this subnet will reside in. Zone ZoneIdentityIntf `json:"zone,omitempty"` } // Constants associated with the SubnetPrototypeSubnetByCIDR.IPVersion property. // The IP version(s) to support for this subnet. const ( SubnetPrototypeSubnetByCIDRIPVersionIpv4Const = "ipv4" ) // NewSubnetPrototypeSubnetByCIDR : Instantiate SubnetPrototypeSubnetByCIDR (Generic Model Constructor) func (*VpcbetaV1) NewSubnetPrototypeSubnetByCIDR(vpc VPCIdentityIntf, ipv4CIDRBlock string) (_model *SubnetPrototypeSubnetByCIDR, err error) { _model = &SubnetPrototypeSubnetByCIDR{ VPC: vpc, Ipv4CIDRBlock: core.StringPtr(ipv4CIDRBlock), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetPrototypeSubnetByCIDR) isaSubnetPrototype() bool { return true } // UnmarshalSubnetPrototypeSubnetByCIDR unmarshals an instance of SubnetPrototypeSubnetByCIDR from the specified map of raw messages. func UnmarshalSubnetPrototypeSubnetByCIDR(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetPrototypeSubnetByCIDR) err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) if err != nil { return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "ipv4_cidr_block", &obj.Ipv4CIDRBlock) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetPrototypeSubnetByTotalCount : SubnetPrototypeSubnetByTotalCount struct // This model "extends" SubnetPrototype type SubnetPrototypeSubnetByTotalCount struct { // The IP version(s) to support for this subnet. IPVersion *string `json:"ip_version,omitempty"` // The name for this subnet. The name must not be used by another subnet in the VPC. If unspecified, the name will be a // hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The network ACL to use for this subnet. NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` // The public gateway to use for internet-bound traffic for this subnet. If unspecified, the subnet will not be // attached to a public gateway. PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The routing table to use for this subnet. If unspecified, the default routing table for the VPC is used. The routing // table properties `route_direct_link_ingress`, // `route_internet_ingress`, `route_transit_gateway_ingress`, and // `route_vpc_zone_ingress` must be `false`. RoutingTable RoutingTableIdentityIntf `json:"routing_table,omitempty"` // The VPC the subnet will reside in. VPC VPCIdentityIntf `json:"vpc" validate:"required"` // The total number of IPv4 addresses required. Must be a power of 2. The VPC must have a default address prefix in the // specified zone, and that prefix must have a free CIDR range with at least this number of addresses. TotalIpv4AddressCount *int64 `json:"total_ipv4_address_count" validate:"required"` // The zone this subnet will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` } // Constants associated with the SubnetPrototypeSubnetByTotalCount.IPVersion property. // The IP version(s) to support for this subnet. const ( SubnetPrototypeSubnetByTotalCountIPVersionIpv4Const = "ipv4" ) // NewSubnetPrototypeSubnetByTotalCount : Instantiate SubnetPrototypeSubnetByTotalCount (Generic Model Constructor) func (*VpcbetaV1) NewSubnetPrototypeSubnetByTotalCount(vpc VPCIdentityIntf, totalIpv4AddressCount int64, zone ZoneIdentityIntf) (_model *SubnetPrototypeSubnetByTotalCount, err error) { _model = &SubnetPrototypeSubnetByTotalCount{ VPC: vpc, TotalIpv4AddressCount: core.Int64Ptr(totalIpv4AddressCount), Zone: zone, } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetPrototypeSubnetByTotalCount) isaSubnetPrototype() bool { return true } // UnmarshalSubnetPrototypeSubnetByTotalCount unmarshals an instance of SubnetPrototypeSubnetByTotalCount from the specified map of raw messages. func UnmarshalSubnetPrototypeSubnetByTotalCount(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetPrototypeSubnetByTotalCount) err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) if err != nil { return } err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "routing_table", &obj.RoutingTable, UnmarshalRoutingTableIdentity) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "total_ipv4_address_count", &obj.TotalIpv4AddressCount) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetPublicGatewayPatchPublicGatewayIdentityByCRN : SubnetPublicGatewayPatchPublicGatewayIdentityByCRN struct // This model "extends" SubnetPublicGatewayPatch type SubnetPublicGatewayPatchPublicGatewayIdentityByCRN struct { // The CRN for this public gateway. CRN *string `json:"crn" validate:"required"` } // NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN : Instantiate SubnetPublicGatewayPatchPublicGatewayIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(crn string) (_model *SubnetPublicGatewayPatchPublicGatewayIdentityByCRN, err error) { _model = &SubnetPublicGatewayPatchPublicGatewayIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetPublicGatewayPatchPublicGatewayIdentityByCRN) isaSubnetPublicGatewayPatch() bool { return true } // UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN unmarshals an instance of SubnetPublicGatewayPatchPublicGatewayIdentityByCRN from the specified map of raw messages. func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetPublicGatewayPatchPublicGatewayIdentityByHref : SubnetPublicGatewayPatchPublicGatewayIdentityByHref struct // This model "extends" SubnetPublicGatewayPatch type SubnetPublicGatewayPatchPublicGatewayIdentityByHref struct { // The URL for this public gateway. Href *string `json:"href" validate:"required"` } // NewSubnetPublicGatewayPatchPublicGatewayIdentityByHref : Instantiate SubnetPublicGatewayPatchPublicGatewayIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByHref(href string) (_model *SubnetPublicGatewayPatchPublicGatewayIdentityByHref, err error) { _model = &SubnetPublicGatewayPatchPublicGatewayIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetPublicGatewayPatchPublicGatewayIdentityByHref) isaSubnetPublicGatewayPatch() bool { return true } // UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref unmarshals an instance of SubnetPublicGatewayPatchPublicGatewayIdentityByHref from the specified map of raw messages. func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SubnetPublicGatewayPatchPublicGatewayIdentityByID : SubnetPublicGatewayPatchPublicGatewayIdentityByID struct // This model "extends" SubnetPublicGatewayPatch type SubnetPublicGatewayPatchPublicGatewayIdentityByID struct { // The unique identifier for this public gateway. ID *string `json:"id" validate:"required"` } // NewSubnetPublicGatewayPatchPublicGatewayIdentityByID : Instantiate SubnetPublicGatewayPatchPublicGatewayIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewSubnetPublicGatewayPatchPublicGatewayIdentityByID(id string) (_model *SubnetPublicGatewayPatchPublicGatewayIdentityByID, err error) { _model = &SubnetPublicGatewayPatchPublicGatewayIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*SubnetPublicGatewayPatchPublicGatewayIdentityByID) isaSubnetPublicGatewayPatch() bool { return true } // UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID unmarshals an instance of SubnetPublicGatewayPatchPublicGatewayIdentityByID from the specified map of raw messages. func UnmarshalSubnetPublicGatewayPatchPublicGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SubnetPublicGatewayPatchPublicGatewayIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // TrustedProfileIdentityTrustedProfileByCRN : TrustedProfileIdentityTrustedProfileByCRN struct // This model "extends" TrustedProfileIdentity type TrustedProfileIdentityTrustedProfileByCRN struct { // The CRN for this trusted profile. CRN *string `json:"crn" validate:"required"` } // NewTrustedProfileIdentityTrustedProfileByCRN : Instantiate TrustedProfileIdentityTrustedProfileByCRN (Generic Model Constructor) func (*VpcbetaV1) NewTrustedProfileIdentityTrustedProfileByCRN(crn string) (_model *TrustedProfileIdentityTrustedProfileByCRN, err error) { _model = &TrustedProfileIdentityTrustedProfileByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*TrustedProfileIdentityTrustedProfileByCRN) isaTrustedProfileIdentity() bool { return true } // UnmarshalTrustedProfileIdentityTrustedProfileByCRN unmarshals an instance of TrustedProfileIdentityTrustedProfileByCRN from the specified map of raw messages. func UnmarshalTrustedProfileIdentityTrustedProfileByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(TrustedProfileIdentityTrustedProfileByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // TrustedProfileIdentityTrustedProfileByID : TrustedProfileIdentityTrustedProfileByID struct // This model "extends" TrustedProfileIdentity type TrustedProfileIdentityTrustedProfileByID struct { // The unique identifier for this trusted profile. ID *string `json:"id" validate:"required"` } // NewTrustedProfileIdentityTrustedProfileByID : Instantiate TrustedProfileIdentityTrustedProfileByID (Generic Model Constructor) func (*VpcbetaV1) NewTrustedProfileIdentityTrustedProfileByID(id string) (_model *TrustedProfileIdentityTrustedProfileByID, err error) { _model = &TrustedProfileIdentityTrustedProfileByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*TrustedProfileIdentityTrustedProfileByID) isaTrustedProfileIdentity() bool { return true } // UnmarshalTrustedProfileIdentityTrustedProfileByID unmarshals an instance of TrustedProfileIdentityTrustedProfileByID from the specified map of raw messages. func UnmarshalTrustedProfileIdentityTrustedProfileByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(TrustedProfileIdentityTrustedProfileByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPCIdentityByCRN : VPCIdentityByCRN struct // This model "extends" VPCIdentity type VPCIdentityByCRN struct { // The CRN for this VPC. CRN *string `json:"crn" validate:"required"` } // NewVPCIdentityByCRN : Instantiate VPCIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewVPCIdentityByCRN(crn string) (_model *VPCIdentityByCRN, err error) { _model = &VPCIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPCIdentityByCRN) isaVPCIdentity() bool { return true } // UnmarshalVPCIdentityByCRN unmarshals an instance of VPCIdentityByCRN from the specified map of raw messages. func UnmarshalVPCIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPCIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPCIdentityByHref : VPCIdentityByHref struct // This model "extends" VPCIdentity type VPCIdentityByHref struct { // The URL for this VPC. Href *string `json:"href" validate:"required"` } // NewVPCIdentityByHref : Instantiate VPCIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVPCIdentityByHref(href string) (_model *VPCIdentityByHref, err error) { _model = &VPCIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPCIdentityByHref) isaVPCIdentity() bool { return true } // UnmarshalVPCIdentityByHref unmarshals an instance of VPCIdentityByHref from the specified map of raw messages. func UnmarshalVPCIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPCIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPCIdentityByID : VPCIdentityByID struct // This model "extends" VPCIdentity type VPCIdentityByID struct { // The unique identifier for this VPC. ID *string `json:"id" validate:"required"` } // NewVPCIdentityByID : Instantiate VPCIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVPCIdentityByID(id string) (_model *VPCIdentityByID, err error) { _model = &VPCIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPCIdentityByID) isaVPCIdentity() bool { return true } // UnmarshalVPCIdentityByID unmarshals an instance of VPCIdentityByID from the specified map of raw messages. func UnmarshalVPCIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPCIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref : VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref struct // This model "extends" VPNGatewayConnectionIkePolicyPatch type VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref struct { // The IKE policy's canonical URL. Href *string `json:"href" validate:"required"` } // NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref : Instantiate VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref, err error) { _model = &VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref) isaVPNGatewayConnectionIkePolicyPatch() bool { return true } // UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID : VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID struct // This model "extends" VPNGatewayConnectionIkePolicyPatch type VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID struct { // The unique identifier for this IKE policy. ID *string `json:"id" validate:"required"` } // NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID : Instantiate VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(id string) (_model *VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID, err error) { _model = &VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID) isaVPNGatewayConnectionIkePolicyPatch() bool { return true } // UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIkePolicyPatchIkePolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref : VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref struct // This model "extends" VPNGatewayConnectionIkePolicyPrototype type VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref struct { // The IKE policy's canonical URL. Href *string `json:"href" validate:"required"` } // NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref : Instantiate VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref, err error) { _model = &VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref) isaVPNGatewayConnectionIkePolicyPrototype() bool { return true } // UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID : VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID struct // This model "extends" VPNGatewayConnectionIkePolicyPrototype type VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID struct { // The unique identifier for this IKE policy. ID *string `json:"id" validate:"required"` } // NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID : Instantiate VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(id string) (_model *VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID, err error) { _model = &VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID) isaVPNGatewayConnectionIkePolicyPrototype() bool { return true } // UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIkePolicyPrototypeIkePolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref : VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref struct // This model "extends" VPNGatewayConnectionIPsecPolicyPatch type VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref struct { // The IPsec policy's canonical URL. Href *string `json:"href" validate:"required"` } // NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref : Instantiate VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref, err error) { _model = &VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref) isaVPNGatewayConnectionIPsecPolicyPatch() bool { return true } // UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID : VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID struct // This model "extends" VPNGatewayConnectionIPsecPolicyPatch type VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID struct { // The unique identifier for this IPsec policy. ID *string `json:"id" validate:"required"` } // NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID : Instantiate VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(id string) (_model *VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID, err error) { _model = &VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) isaVPNGatewayConnectionIPsecPolicyPatch() bool { return true } // UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIPsecPolicyPatchIPsecPolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref : VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref struct // This model "extends" VPNGatewayConnectionIPsecPolicyPrototype type VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref struct { // The IPsec policy's canonical URL. Href *string `json:"href" validate:"required"` } // NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref : Instantiate VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(href string) (_model *VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref, err error) { _model = &VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref) isaVPNGatewayConnectionIPsecPolicyPrototype() bool { return true } // UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref unmarshals an instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID : VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID struct // This model "extends" VPNGatewayConnectionIPsecPolicyPrototype type VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID struct { // The unique identifier for this IPsec policy. ID *string `json:"id" validate:"required"` } // NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID : Instantiate VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(id string) (_model *VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID, err error) { _model = &VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) isaVPNGatewayConnectionIPsecPolicyPrototype() bool { return true } // UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID unmarshals an instance of VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID from the specified map of raw messages. func UnmarshalVPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionIPsecPolicyPrototypeIPsecPolicyIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch : VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch struct // This model "extends" VPNGatewayConnectionPatch type VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up,omitempty"` DeadPeerDetection *VPNGatewayConnectionDpdPatch `json:"dead_peer_detection,omitempty"` IkePolicy VPNGatewayConnectionIkePolicyPatchIntf `json:"ike_policy,omitempty"` IpsecPolicy VPNGatewayConnectionIPsecPolicyPatchIntf `json:"ipsec_policy,omitempty"` // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address,omitempty"` // The pre-shared key. Psk *string `json:"psk,omitempty"` // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` } // Constants associated with the VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatchRoutingProtocolNoneConst = "none" ) func (*VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch) isaVPNGatewayConnectionPatch() bool { return true } // UnmarshalVPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch unmarshals an instance of VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPatch) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPatch) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPatch) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // AsPatch returns a generic map representation of the VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch func (vpnGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch *VPNGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch) AsPatch() (_patch map[string]interface{}, err error) { var jsonData []byte jsonData, err = json.Marshal(vpnGatewayConnectionPatchVPNGatewayConnectionStaticRouteModePatch) if err == nil { err = json.Unmarshal(jsonData, &_patch) } return } // VPNGatewayConnectionPolicyMode : VPNGatewayConnectionPolicyMode struct // This model "extends" VPNGatewayConnection type VPNGatewayConnectionPolicyMode struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up" validate:"required"` // The authentication mode. Only `psk` is currently supported. AuthenticationMode *string `json:"authentication_mode" validate:"required"` // The date and time that this VPN gateway connection was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway connection. ID *string `json:"id" validate:"required"` // The IKE policy. If absent, [auto-negotiation is // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"` // The IPsec policy. If absent, [auto-negotiation is // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2). IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"` // The mode of the VPN gateway. Mode *string `json:"mode" validate:"required"` // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // The pre-shared key. Psk *string `json:"psk" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of a VPN gateway connection. Status *string `json:"status" validate:"required"` // The local CIDRs for this resource. LocalCIDRs []string `json:"local_cidrs" validate:"required"` // The peer CIDRs for this resource. PeerCIDRs []string `json:"peer_cidrs" validate:"required"` } // Constants associated with the VPNGatewayConnectionPolicyMode.AuthenticationMode property. // The authentication mode. Only `psk` is currently supported. const ( VPNGatewayConnectionPolicyModeAuthenticationModePskConst = "psk" ) // Constants associated with the VPNGatewayConnectionPolicyMode.Mode property. // The mode of the VPN gateway. const ( VPNGatewayConnectionPolicyModeModePolicyConst = "policy" VPNGatewayConnectionPolicyModeModeRouteConst = "route" ) // Constants associated with the VPNGatewayConnectionPolicyMode.ResourceType property. // The resource type. const ( VPNGatewayConnectionPolicyModeResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection" ) // Constants associated with the VPNGatewayConnectionPolicyMode.Status property. // The status of a VPN gateway connection. const ( VPNGatewayConnectionPolicyModeStatusDownConst = "down" VPNGatewayConnectionPolicyModeStatusUpConst = "up" ) func (*VPNGatewayConnectionPolicyMode) isaVPNGatewayConnection() bool { return true } // UnmarshalVPNGatewayConnectionPolicyMode unmarshals an instance of VPNGatewayConnectionPolicyMode from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPolicyMode(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPolicyMode) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct // This model "extends" VPNGatewayConnectionPrototype type VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up,omitempty"` DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"` // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // The pre-shared key. Psk *string `json:"psk" validate:"required"` // The local CIDRs for this resource. LocalCIDRs []string `json:"local_cidrs" validate:"required"` // The peer CIDRs for this resource. PeerCIDRs []string `json:"peer_cidrs" validate:"required"` } // NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(peerAddress string, psk string, localCIDRs []string, peerCIDRs []string) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype, err error) { _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype{ PeerAddress: core.StringPtr(peerAddress), Psk: core.StringPtr(psk), LocalCIDRs: localCIDRs, PeerCIDRs: peerCIDRs, } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype) isaVPNGatewayConnectionPrototype() bool { return true } // UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype unmarshals an instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionPolicyModePrototype) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype : VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype struct // This model "extends" VPNGatewayConnectionPrototype type VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up,omitempty"` DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` IkePolicy VPNGatewayConnectionIkePolicyPrototypeIntf `json:"ike_policy,omitempty"` IpsecPolicy VPNGatewayConnectionIPsecPolicyPrototypeIntf `json:"ipsec_policy,omitempty"` // The name for this VPN gateway connection. The name must not be used by another connection for the VPN gateway. If // unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // The pre-shared key. Psk *string `json:"psk" validate:"required"` // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol,omitempty"` } // Constants associated with the VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototypeRoutingProtocolNoneConst = "none" ) // NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype : Instantiate VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(peerAddress string, psk string) (_model *VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype, err error) { _model = &VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype{ PeerAddress: core.StringPtr(peerAddress), Psk: core.StringPtr(psk), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) isaVPNGatewayConnectionPrototype() bool { return true } // UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype unmarshals an instance of VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype from the specified map of raw messages. func UnmarshalVPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionPrototypeVPNGatewayConnectionStaticRouteModePrototype) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalVPNGatewayConnectionIkePolicyPrototype) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalVPNGatewayConnectionIPsecPolicyPrototype) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayConnectionStaticRouteMode : VPNGatewayConnectionStaticRouteMode struct // This model "extends" VPNGatewayConnection type VPNGatewayConnectionStaticRouteMode struct { // If set to false, the VPN gateway connection is shut down. AdminStateUp *bool `json:"admin_state_up" validate:"required"` // The authentication mode. Only `psk` is currently supported. AuthenticationMode *string `json:"authentication_mode" validate:"required"` // The date and time that this VPN gateway connection was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` DeadPeerDetection *VPNGatewayConnectionDpd `json:"dead_peer_detection" validate:"required"` // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway connection. ID *string `json:"id" validate:"required"` // The IKE policy. If absent, [auto-negotiation is // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ike-auto-negotiation-phase-1). IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"` // The IPsec policy. If absent, [auto-negotiation is // used](https://cloud.ibm.com/docs/vpc?topic=vpc-using-vpn&interface=ui#ipsec-auto-negotiation-phase-2). IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"` // The mode of the VPN gateway. Mode *string `json:"mode" validate:"required"` // The name for this VPN gateway connection. The name is unique across all connections for the VPN gateway. Name *string `json:"name" validate:"required"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // The pre-shared key. Psk *string `json:"psk" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of a VPN gateway connection. Status *string `json:"status" validate:"required"` // Routing protocols are disabled for this VPN gateway connection. RoutingProtocol *string `json:"routing_protocol" validate:"required"` // The VPN tunnel configuration for this VPN gateway connection (in static route mode). Tunnels []VPNGatewayConnectionStaticRouteModeTunnel `json:"tunnels" validate:"required"` } // Constants associated with the VPNGatewayConnectionStaticRouteMode.AuthenticationMode property. // The authentication mode. Only `psk` is currently supported. const ( VPNGatewayConnectionStaticRouteModeAuthenticationModePskConst = "psk" ) // Constants associated with the VPNGatewayConnectionStaticRouteMode.Mode property. // The mode of the VPN gateway. const ( VPNGatewayConnectionStaticRouteModeModePolicyConst = "policy" VPNGatewayConnectionStaticRouteModeModeRouteConst = "route" ) // Constants associated with the VPNGatewayConnectionStaticRouteMode.ResourceType property. // The resource type. const ( VPNGatewayConnectionStaticRouteModeResourceTypeVPNGatewayConnectionConst = "vpn_gateway_connection" ) // Constants associated with the VPNGatewayConnectionStaticRouteMode.Status property. // The status of a VPN gateway connection. const ( VPNGatewayConnectionStaticRouteModeStatusDownConst = "down" VPNGatewayConnectionStaticRouteModeStatusUpConst = "up" ) // Constants associated with the VPNGatewayConnectionStaticRouteMode.RoutingProtocol property. // Routing protocols are disabled for this VPN gateway connection. const ( VPNGatewayConnectionStaticRouteModeRoutingProtocolNoneConst = "none" ) func (*VPNGatewayConnectionStaticRouteMode) isaVPNGatewayConnection() bool { return true } // UnmarshalVPNGatewayConnectionStaticRouteMode unmarshals an instance of VPNGatewayConnectionStaticRouteMode from the specified map of raw messages. func UnmarshalVPNGatewayConnectionStaticRouteMode(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayConnectionStaticRouteMode) err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) if err != nil { return } err = core.UnmarshalPrimitive(m, "authentication_mode", &obj.AuthenticationMode) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpd) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) if err != nil { return } err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) if err != nil { return } err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "routing_protocol", &obj.RoutingProtocol) if err != nil { return } err = core.UnmarshalModel(m, "tunnels", &obj.Tunnels, UnmarshalVPNGatewayConnectionStaticRouteModeTunnel) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayPolicyMode : VPNGatewayPolicyMode struct // This model "extends" VPNGateway type VPNGatewayPolicyMode struct { // Connections for this VPN gateway. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this VPN gateway was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The VPN gateway's CRN. CRN *string `json:"crn" validate:"required"` // The VPN gateway's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway. ID *string `json:"id" validate:"required"` // Collection of VPN gateway members. Members []VPNGatewayMember `json:"members" validate:"required"` // The name for this VPN gateway. The name is unique across all VPN gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource group for this VPN gateway. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the VPN gateway. Status *string `json:"status" validate:"required"` Subnet *SubnetReference `json:"subnet" validate:"required"` // The VPC this VPN gateway resides in. VPC *VPCReference `json:"vpc" validate:"required"` // Policy mode VPN gateway. Mode *string `json:"mode" validate:"required"` } // Constants associated with the VPNGatewayPolicyMode.ResourceType property. // The resource type. const ( VPNGatewayPolicyModeResourceTypeVPNGatewayConst = "vpn_gateway" ) // Constants associated with the VPNGatewayPolicyMode.Status property. // The status of the VPN gateway. const ( VPNGatewayPolicyModeStatusAvailableConst = "available" VPNGatewayPolicyModeStatusDeletingConst = "deleting" VPNGatewayPolicyModeStatusFailedConst = "failed" VPNGatewayPolicyModeStatusPendingConst = "pending" ) // Constants associated with the VPNGatewayPolicyMode.Mode property. // Policy mode VPN gateway. const ( VPNGatewayPolicyModeModePolicyConst = "policy" ) func (*VPNGatewayPolicyMode) isaVPNGateway() bool { return true } // UnmarshalVPNGatewayPolicyMode unmarshals an instance of VPNGatewayPolicyMode from the specified map of raw messages. func UnmarshalVPNGatewayPolicyMode(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayPolicyMode) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayPrototypeVPNGatewayPolicyModePrototype : VPNGatewayPrototypeVPNGatewayPolicyModePrototype struct // This model "extends" VPNGatewayPrototype type VPNGatewayPrototypeVPNGatewayPolicyModePrototype struct { // The name for this VPN gateway. The name must not be used by another VPN gateway in the VPC. If unspecified, the name // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` // Policy mode VPN gateway. Mode *string `json:"mode,omitempty"` } // Constants associated with the VPNGatewayPrototypeVPNGatewayPolicyModePrototype.Mode property. // Policy mode VPN gateway. const ( VPNGatewayPrototypeVPNGatewayPolicyModePrototypeModePolicyConst = "policy" ) // NewVPNGatewayPrototypeVPNGatewayPolicyModePrototype : Instantiate VPNGatewayPrototypeVPNGatewayPolicyModePrototype (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayPrototypeVPNGatewayPolicyModePrototype(subnet SubnetIdentityIntf) (_model *VPNGatewayPrototypeVPNGatewayPolicyModePrototype, err error) { _model = &VPNGatewayPrototypeVPNGatewayPolicyModePrototype{ Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayPrototypeVPNGatewayPolicyModePrototype) isaVPNGatewayPrototype() bool { return true } // UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype unmarshals an instance of VPNGatewayPrototypeVPNGatewayPolicyModePrototype from the specified map of raw messages. func UnmarshalVPNGatewayPrototypeVPNGatewayPolicyModePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayPrototypeVPNGatewayPolicyModePrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayPrototypeVPNGatewayRouteModePrototype : VPNGatewayPrototypeVPNGatewayRouteModePrototype struct // This model "extends" VPNGatewayPrototype type VPNGatewayPrototypeVPNGatewayRouteModePrototype struct { // The name for this VPN gateway. The name must not be used by another VPN gateway in the VPC. If unspecified, the name // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` // Route mode VPN gateway. Mode *string `json:"mode,omitempty"` } // Constants associated with the VPNGatewayPrototypeVPNGatewayRouteModePrototype.Mode property. // Route mode VPN gateway. const ( VPNGatewayPrototypeVPNGatewayRouteModePrototypeModeRouteConst = "route" ) // NewVPNGatewayPrototypeVPNGatewayRouteModePrototype : Instantiate VPNGatewayPrototypeVPNGatewayRouteModePrototype (Generic Model Constructor) func (*VpcbetaV1) NewVPNGatewayPrototypeVPNGatewayRouteModePrototype(subnet SubnetIdentityIntf) (_model *VPNGatewayPrototypeVPNGatewayRouteModePrototype, err error) { _model = &VPNGatewayPrototypeVPNGatewayRouteModePrototype{ Subnet: subnet, } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNGatewayPrototypeVPNGatewayRouteModePrototype) isaVPNGatewayPrototype() bool { return true } // UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype unmarshals an instance of VPNGatewayPrototypeVPNGatewayRouteModePrototype from the specified map of raw messages. func UnmarshalVPNGatewayPrototypeVPNGatewayRouteModePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayPrototypeVPNGatewayRouteModePrototype) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNGatewayRouteMode : VPNGatewayRouteMode struct // This model "extends" VPNGateway type VPNGatewayRouteMode struct { // Connections for this VPN gateway. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this VPN gateway was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The VPN gateway's CRN. CRN *string `json:"crn" validate:"required"` // The VPN gateway's canonical URL. Href *string `json:"href" validate:"required"` // The unique identifier for this VPN gateway. ID *string `json:"id" validate:"required"` // Collection of VPN gateway members. Members []VPNGatewayMember `json:"members" validate:"required"` // The name for this VPN gateway. The name is unique across all VPN gateways in the VPC. Name *string `json:"name" validate:"required"` // The resource group for this VPN gateway. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the VPN gateway. Status *string `json:"status" validate:"required"` Subnet *SubnetReference `json:"subnet" validate:"required"` // The VPC this VPN gateway resides in. VPC *VPCReference `json:"vpc" validate:"required"` // Route mode VPN gateway. Mode *string `json:"mode" validate:"required"` } // Constants associated with the VPNGatewayRouteMode.ResourceType property. // The resource type. const ( VPNGatewayRouteModeResourceTypeVPNGatewayConst = "vpn_gateway" ) // Constants associated with the VPNGatewayRouteMode.Status property. // The status of the VPN gateway. const ( VPNGatewayRouteModeStatusAvailableConst = "available" VPNGatewayRouteModeStatusDeletingConst = "deleting" VPNGatewayRouteModeStatusFailedConst = "failed" VPNGatewayRouteModeStatusPendingConst = "pending" ) // Constants associated with the VPNGatewayRouteMode.Mode property. // Route mode VPN gateway. const ( VPNGatewayRouteModeModeRouteConst = "route" ) func (*VPNGatewayRouteMode) isaVPNGateway() bool { return true } // UnmarshalVPNGatewayRouteMode unmarshals an instance of VPNGatewayRouteMode from the specified map of raw messages. func UnmarshalVPNGatewayRouteMode(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNGatewayRouteMode) err = core.UnmarshalModel(m, "connections", &obj.Connections, UnmarshalVPNGatewayConnectionReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalModel(m, "members", &obj.Members, UnmarshalVPNGatewayMember) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalModel(m, "subnet", &obj.Subnet, UnmarshalSubnetReference) if err != nil { return } err = core.UnmarshalModel(m, "vpc", &obj.VPC, UnmarshalVPCReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "mode", &obj.Mode) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationByCertificate : VPNServerAuthenticationByCertificate struct // This model "extends" VPNServerAuthentication type VPNServerAuthenticationByCertificate struct { // The type of authentication. Method *string `json:"method" validate:"required"` // The certificate instance used for the VPN client certificate authority (CA). ClientCa *CertificateInstanceReference `json:"client_ca" validate:"required"` // The certificate revocation list contents, encoded in PEM format. Crl *string `json:"crl,omitempty"` } // Constants associated with the VPNServerAuthenticationByCertificate.Method property. // The type of authentication. const ( VPNServerAuthenticationByCertificateMethodCertificateConst = "certificate" VPNServerAuthenticationByCertificateMethodUsernameConst = "username" ) func (*VPNServerAuthenticationByCertificate) isaVPNServerAuthentication() bool { return true } // UnmarshalVPNServerAuthenticationByCertificate unmarshals an instance of VPNServerAuthenticationByCertificate from the specified map of raw messages. func UnmarshalVPNServerAuthenticationByCertificate(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthenticationByCertificate) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { return } err = core.UnmarshalModel(m, "client_ca", &obj.ClientCa, UnmarshalCertificateInstanceReference) if err != nil { return } err = core.UnmarshalPrimitive(m, "crl", &obj.Crl) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationByUsername : VPNServerAuthenticationByUsername struct // This model "extends" VPNServerAuthentication type VPNServerAuthenticationByUsername struct { // The type of authentication. Method *string `json:"method" validate:"required"` // The type of identity provider to be used by VPN client. IdentityProvider VPNServerAuthenticationByUsernameIDProviderIntf `json:"identity_provider" validate:"required"` } // Constants associated with the VPNServerAuthenticationByUsername.Method property. // The type of authentication. const ( VPNServerAuthenticationByUsernameMethodCertificateConst = "certificate" VPNServerAuthenticationByUsernameMethodUsernameConst = "username" ) func (*VPNServerAuthenticationByUsername) isaVPNServerAuthentication() bool { return true } // UnmarshalVPNServerAuthenticationByUsername unmarshals an instance of VPNServerAuthenticationByUsername from the specified map of raw messages. func UnmarshalVPNServerAuthenticationByUsername(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthenticationByUsername) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { return } err = core.UnmarshalModel(m, "identity_provider", &obj.IdentityProvider, UnmarshalVPNServerAuthenticationByUsernameIDProvider) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationByUsernameIDProviderByIam : VPNServerAuthenticationByUsernameIDProviderByIam struct // This model "extends" VPNServerAuthenticationByUsernameIDProvider type VPNServerAuthenticationByUsernameIDProviderByIam struct { // The type of identity provider to be used by the VPN client. // - `iam`: IBM identity and access management // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the route on which the // unexpected property value was encountered. ProviderType *string `json:"provider_type" validate:"required"` } // Constants associated with the VPNServerAuthenticationByUsernameIDProviderByIam.ProviderType property. // The type of identity provider to be used by the VPN client. // - `iam`: IBM identity and access management // // The enumerated values for this property are expected to expand in the future. When processing this property, check // for and log unknown values. Optionally halt processing and surface the error, or bypass the route on which the // unexpected property value was encountered. const ( VPNServerAuthenticationByUsernameIDProviderByIamProviderTypeIamConst = "iam" ) // NewVPNServerAuthenticationByUsernameIDProviderByIam : Instantiate VPNServerAuthenticationByUsernameIDProviderByIam (Generic Model Constructor) func (*VpcbetaV1) NewVPNServerAuthenticationByUsernameIDProviderByIam(providerType string) (_model *VPNServerAuthenticationByUsernameIDProviderByIam, err error) { _model = &VPNServerAuthenticationByUsernameIDProviderByIam{ ProviderType: core.StringPtr(providerType), } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNServerAuthenticationByUsernameIDProviderByIam) isaVPNServerAuthenticationByUsernameIDProvider() bool { return true } // UnmarshalVPNServerAuthenticationByUsernameIDProviderByIam unmarshals an instance of VPNServerAuthenticationByUsernameIDProviderByIam from the specified map of raw messages. func UnmarshalVPNServerAuthenticationByUsernameIDProviderByIam(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthenticationByUsernameIDProviderByIam) err = core.UnmarshalPrimitive(m, "provider_type", &obj.ProviderType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype : VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype struct // This model "extends" VPNServerAuthenticationPrototype type VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype struct { // The type of authentication. Method *string `json:"method" validate:"required"` // The certificate instance to use for the VPN client certificate authority (CA). ClientCa CertificateInstanceIdentityIntf `json:"client_ca" validate:"required"` // The certificate revocation list contents, encoded in PEM format. Crl *string `json:"crl,omitempty"` } // Constants associated with the VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype.Method property. // The type of authentication. const ( VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototypeMethodCertificateConst = "certificate" VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototypeMethodUsernameConst = "username" ) // NewVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype : Instantiate VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype (Generic Model Constructor) func (*VpcbetaV1) NewVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(method string, clientCa CertificateInstanceIdentityIntf) (_model *VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype, err error) { _model = &VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype{ Method: core.StringPtr(method), ClientCa: clientCa, } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype) isaVPNServerAuthenticationPrototype() bool { return true } // UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype unmarshals an instance of VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype from the specified map of raw messages. func UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthenticationPrototypeVPNServerAuthenticationByCertificatePrototype) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { return } err = core.UnmarshalModel(m, "client_ca", &obj.ClientCa, UnmarshalCertificateInstanceIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "crl", &obj.Crl) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype : VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype struct // This model "extends" VPNServerAuthenticationPrototype type VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype struct { // The type of authentication. Method *string `json:"method" validate:"required"` // The type of identity provider to be used by VPN client. IdentityProvider VPNServerAuthenticationByUsernameIDProviderIntf `json:"identity_provider" validate:"required"` } // Constants associated with the VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype.Method property. // The type of authentication. const ( VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototypeMethodCertificateConst = "certificate" VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototypeMethodUsernameConst = "username" ) // NewVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype : Instantiate VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype (Generic Model Constructor) func (*VpcbetaV1) NewVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(method string, identityProvider VPNServerAuthenticationByUsernameIDProviderIntf) (_model *VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype, err error) { _model = &VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype{ Method: core.StringPtr(method), IdentityProvider: identityProvider, } err = core.ValidateStruct(_model, "required parameters") return } func (*VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype) isaVPNServerAuthenticationPrototype() bool { return true } // UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype unmarshals an instance of VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype from the specified map of raw messages. func UnmarshalVPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VPNServerAuthenticationPrototypeVPNServerAuthenticationByUsernamePrototype) err = core.UnmarshalPrimitive(m, "method", &obj.Method) if err != nil { return } err = core.UnmarshalModel(m, "identity_provider", &obj.IdentityProvider, UnmarshalVPNServerAuthenticationByUsernameIDProvider) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext : Identifies a reserved IP by a unique property. Required if `subnet` is not specified. The reserved IP must be // currently unbound. // Models which "extend" this model: // - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID // - VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref // This model "extends" VirtualNetworkInterfacePrimaryIPPrototype type VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext struct { // The unique identifier for this reserved IP. ID *string `json:"id,omitempty"` // The URL for this reserved IP. Href *string `json:"href,omitempty"` } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext) isaVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext() bool { return true } type VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextIntf interface { VirtualNetworkInterfacePrimaryIPPrototypeIntf isaVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext() bool } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext) isaVirtualNetworkInterfacePrimaryIPPrototype() bool { return true } // UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext unmarshals an instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext from the specified map of raw messages. func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext : The prototype for a new reserved IP. Requires `subnet` to be specified. // This model "extends" VirtualNetworkInterfacePrimaryIPPrototype type VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext struct { // The IP address to reserve, which must not already be reserved on the subnet. // // If unspecified, an available address on the subnet will automatically be selected. Address *string `json:"address,omitempty"` // Indicates whether this reserved IP member will be automatically deleted when either // `target` is deleted, or the reserved IP is unbound. AutoDelete *bool `json:"auto_delete,omitempty"` // The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with // `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated // list of randomly-selected words. Name *string `json:"name,omitempty"` } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext) isaVirtualNetworkInterfacePrimaryIPPrototype() bool { return true } // UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext unmarshals an instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext from the specified map of raw messages. func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPPrototypeVirtualNetworkInterfacePrimaryIPContext) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfaceTargetShareMountTargetReference : VirtualNetworkInterfaceTargetShareMountTargetReference struct // This model "extends" VirtualNetworkInterfaceTarget type VirtualNetworkInterfaceTargetShareMountTargetReference struct { // If present, this property indicates the referenced resource has been deleted, and provides // some supplementary information. Deleted *ShareMountTargetReferenceDeleted `json:"deleted,omitempty"` // The URL for this share mount target. Href *string `json:"href" validate:"required"` // The unique identifier for this share mount target. ID *string `json:"id" validate:"required"` // The name for this share mount target. The name is unique across all mount targets for the file share. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the VirtualNetworkInterfaceTargetShareMountTargetReference.ResourceType property. // The resource type. const ( VirtualNetworkInterfaceTargetShareMountTargetReferenceResourceTypeShareMountTargetConst = "share_mount_target" ) func (*VirtualNetworkInterfaceTargetShareMountTargetReference) isaVirtualNetworkInterfaceTarget() bool { return true } // UnmarshalVirtualNetworkInterfaceTargetShareMountTargetReference unmarshals an instance of VirtualNetworkInterfaceTargetShareMountTargetReference from the specified map of raw messages. func UnmarshalVirtualNetworkInterfaceTargetShareMountTargetReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfaceTargetShareMountTargetReference) err = core.UnmarshalModel(m, "deleted", &obj.Deleted, UnmarshalShareMountTargetReferenceDeleted) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumeIdentity : Identifies a volume by a unique property. // Models which "extend" this model: // - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID // - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN // - VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref // This model "extends" VolumeAttachmentPrototypeVolume type VolumeAttachmentPrototypeVolumeVolumeIdentity struct { // The unique identifier for this volume. ID *string `json:"id,omitempty"` // The CRN for this volume. CRN *string `json:"crn,omitempty"` // The URL for this volume. Href *string `json:"href,omitempty"` } func (*VolumeAttachmentPrototypeVolumeVolumeIdentity) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool { return true } type VolumeAttachmentPrototypeVolumeVolumeIdentityIntf interface { VolumeAttachmentPrototypeVolumeIntf isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool } func (*VolumeAttachmentPrototypeVolumeVolumeIdentity) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentity from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentity) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext : VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext struct // Models which "extend" this model: // - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity // - VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot // This model "extends" VolumeAttachmentPrototypeVolume type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext struct { // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to // use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use for this volume. If unspecified, the instance's resource // group will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or // updating volumes may expand in the future. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The snapshot from which to clone the volume. SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot,omitempty"` } func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool { return true } type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextIntf interface { VolumeAttachmentPrototypeVolumeIntf isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool } func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeIdentityByCRN : VolumeIdentityByCRN struct // This model "extends" VolumeIdentity type VolumeIdentityByCRN struct { // The CRN for this volume. CRN *string `json:"crn" validate:"required"` } // NewVolumeIdentityByCRN : Instantiate VolumeIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewVolumeIdentityByCRN(crn string) (_model *VolumeIdentityByCRN, err error) { _model = &VolumeIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeIdentityByCRN) isaVolumeIdentity() bool { return true } // UnmarshalVolumeIdentityByCRN unmarshals an instance of VolumeIdentityByCRN from the specified map of raw messages. func UnmarshalVolumeIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeIdentityByHref : VolumeIdentityByHref struct // This model "extends" VolumeIdentity type VolumeIdentityByHref struct { // The URL for this volume. Href *string `json:"href" validate:"required"` } // NewVolumeIdentityByHref : Instantiate VolumeIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVolumeIdentityByHref(href string) (_model *VolumeIdentityByHref, err error) { _model = &VolumeIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeIdentityByHref) isaVolumeIdentity() bool { return true } // UnmarshalVolumeIdentityByHref unmarshals an instance of VolumeIdentityByHref from the specified map of raw messages. func UnmarshalVolumeIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeIdentityByID : VolumeIdentityByID struct // This model "extends" VolumeIdentity type VolumeIdentityByID struct { // The unique identifier for this volume. ID *string `json:"id" validate:"required"` } // NewVolumeIdentityByID : Instantiate VolumeIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVolumeIdentityByID(id string) (_model *VolumeIdentityByID, err error) { _model = &VolumeIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeIdentityByID) isaVolumeIdentity() bool { return true } // UnmarshalVolumeIdentityByID unmarshals an instance of VolumeIdentityByID from the specified map of raw messages. func UnmarshalVolumeIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeProfileIdentityByHref : VolumeProfileIdentityByHref struct // This model "extends" VolumeProfileIdentity type VolumeProfileIdentityByHref struct { // The URL for this volume profile. Href *string `json:"href" validate:"required"` } // NewVolumeProfileIdentityByHref : Instantiate VolumeProfileIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVolumeProfileIdentityByHref(href string) (_model *VolumeProfileIdentityByHref, err error) { _model = &VolumeProfileIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeProfileIdentityByHref) isaVolumeProfileIdentity() bool { return true } // UnmarshalVolumeProfileIdentityByHref unmarshals an instance of VolumeProfileIdentityByHref from the specified map of raw messages. func UnmarshalVolumeProfileIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeProfileIdentityByName : VolumeProfileIdentityByName struct // This model "extends" VolumeProfileIdentity type VolumeProfileIdentityByName struct { // The globally unique name for this volume profile. Name *string `json:"name" validate:"required"` } // NewVolumeProfileIdentityByName : Instantiate VolumeProfileIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewVolumeProfileIdentityByName(name string) (_model *VolumeProfileIdentityByName, err error) { _model = &VolumeProfileIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeProfileIdentityByName) isaVolumeProfileIdentity() bool { return true } // UnmarshalVolumeProfileIdentityByName unmarshals an instance of VolumeProfileIdentityByName from the specified map of raw messages. func UnmarshalVolumeProfileIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeProfileIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumePrototypeVolumeByCapacity : VolumePrototypeVolumeByCapacity struct // This model "extends" VolumePrototype type VolumePrototypeVolumeByCapacity struct { // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The zone this volume will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or // updating volumes may expand in the future. Capacity *int64 `json:"capacity" validate:"required"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` } // NewVolumePrototypeVolumeByCapacity : Instantiate VolumePrototypeVolumeByCapacity (Generic Model Constructor) func (*VpcbetaV1) NewVolumePrototypeVolumeByCapacity(profile VolumeProfileIdentityIntf, zone ZoneIdentityIntf, capacity int64) (_model *VolumePrototypeVolumeByCapacity, err error) { _model = &VolumePrototypeVolumeByCapacity{ Profile: profile, Zone: zone, Capacity: core.Int64Ptr(capacity), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumePrototypeVolumeByCapacity) isaVolumePrototype() bool { return true } // UnmarshalVolumePrototypeVolumeByCapacity unmarshals an instance of VolumePrototypeVolumeByCapacity from the specified map of raw messages. func UnmarshalVolumePrototypeVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumePrototypeVolumeByCapacity) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumePrototypeVolumeBySourceSnapshot : VolumePrototypeVolumeBySourceSnapshot struct // This model "extends" VolumePrototype type VolumePrototypeVolumeBySourceSnapshot struct { // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The zone this volume will reside in. Zone ZoneIdentityIntf `json:"zone" validate:"required"` // The capacity to use for the volume (in gigabytes). Must be at least the snapshot's // `minimum_capacity`. The maximum value may increase in the future. // // If unspecified, the capacity will be the source snapshot's `minimum_capacity`. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The snapshot from which to clone the volume. SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot" validate:"required"` } // NewVolumePrototypeVolumeBySourceSnapshot : Instantiate VolumePrototypeVolumeBySourceSnapshot (Generic Model Constructor) func (*VpcbetaV1) NewVolumePrototypeVolumeBySourceSnapshot(profile VolumeProfileIdentityIntf, zone ZoneIdentityIntf, sourceSnapshot SnapshotIdentityIntf) (_model *VolumePrototypeVolumeBySourceSnapshot, err error) { _model = &VolumePrototypeVolumeBySourceSnapshot{ Profile: profile, Zone: zone, SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumePrototypeVolumeBySourceSnapshot) isaVolumePrototype() bool { return true } // UnmarshalVolumePrototypeVolumeBySourceSnapshot unmarshals an instance of VolumePrototypeVolumeBySourceSnapshot from the specified map of raw messages. func UnmarshalVolumePrototypeVolumeBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumePrototypeVolumeBySourceSnapshot) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalModel(m, "zone", &obj.Zone, UnmarshalZoneIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ZoneIdentityByHref : ZoneIdentityByHref struct // This model "extends" ZoneIdentity type ZoneIdentityByHref struct { // The URL for this zone. Href *string `json:"href" validate:"required"` } // NewZoneIdentityByHref : Instantiate ZoneIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewZoneIdentityByHref(href string) (_model *ZoneIdentityByHref, err error) { _model = &ZoneIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*ZoneIdentityByHref) isaZoneIdentity() bool { return true } // UnmarshalZoneIdentityByHref unmarshals an instance of ZoneIdentityByHref from the specified map of raw messages. func UnmarshalZoneIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ZoneIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ZoneIdentityByName : ZoneIdentityByName struct // This model "extends" ZoneIdentity type ZoneIdentityByName struct { // The globally unique name for this zone. Name *string `json:"name" validate:"required"` } // NewZoneIdentityByName : Instantiate ZoneIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewZoneIdentityByName(name string) (_model *ZoneIdentityByName, err error) { _model = &ZoneIdentityByName{ Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*ZoneIdentityByName) isaZoneIdentity() bool { return true } // UnmarshalZoneIdentityByName unmarshals an instance of ZoneIdentityByName from the specified map of raw messages. func UnmarshalZoneIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ZoneIdentityByName) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayReservedIPReservedIPIdentityByHref : EndpointGatewayReservedIPReservedIPIdentityByHref struct // This model "extends" EndpointGatewayReservedIPReservedIPIdentity type EndpointGatewayReservedIPReservedIPIdentityByHref struct { // The URL for this reserved IP. Href *string `json:"href" validate:"required"` } // NewEndpointGatewayReservedIPReservedIPIdentityByHref : Instantiate EndpointGatewayReservedIPReservedIPIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewEndpointGatewayReservedIPReservedIPIdentityByHref(href string) (_model *EndpointGatewayReservedIPReservedIPIdentityByHref, err error) { _model = &EndpointGatewayReservedIPReservedIPIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*EndpointGatewayReservedIPReservedIPIdentityByHref) isaEndpointGatewayReservedIPReservedIPIdentity() bool { return true } func (*EndpointGatewayReservedIPReservedIPIdentityByHref) isaEndpointGatewayReservedIP() bool { return true } // UnmarshalEndpointGatewayReservedIPReservedIPIdentityByHref unmarshals an instance of EndpointGatewayReservedIPReservedIPIdentityByHref from the specified map of raw messages. func UnmarshalEndpointGatewayReservedIPReservedIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayReservedIPReservedIPIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayReservedIPReservedIPIdentityByID : EndpointGatewayReservedIPReservedIPIdentityByID struct // This model "extends" EndpointGatewayReservedIPReservedIPIdentity type EndpointGatewayReservedIPReservedIPIdentityByID struct { // The unique identifier for this reserved IP. ID *string `json:"id" validate:"required"` } // NewEndpointGatewayReservedIPReservedIPIdentityByID : Instantiate EndpointGatewayReservedIPReservedIPIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewEndpointGatewayReservedIPReservedIPIdentityByID(id string) (_model *EndpointGatewayReservedIPReservedIPIdentityByID, err error) { _model = &EndpointGatewayReservedIPReservedIPIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*EndpointGatewayReservedIPReservedIPIdentityByID) isaEndpointGatewayReservedIPReservedIPIdentity() bool { return true } func (*EndpointGatewayReservedIPReservedIPIdentityByID) isaEndpointGatewayReservedIP() bool { return true } // UnmarshalEndpointGatewayReservedIPReservedIPIdentityByID unmarshals an instance of EndpointGatewayReservedIPReservedIPIdentityByID from the specified map of raw messages. func UnmarshalEndpointGatewayReservedIPReservedIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayReservedIPReservedIPIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN : EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN struct // This model "extends" EndpointGatewayTargetPrototypeProviderCloudServiceIdentity type EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN struct { // The type of target for this endpoint gateway. ResourceType *string `json:"resource_type" validate:"required"` // The CRN for this provider cloud service, or the CRN for the user's instance of a provider cloud service. CRN *string `json:"crn" validate:"required"` } // Constants associated with the EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN.ResourceType property. // The type of target for this endpoint gateway. const ( EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRNResourceTypeProviderCloudServiceConst = "provider_cloud_service" EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRNResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service" ) // NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN : Instantiate EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(resourceType string, crn string) (_model *EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN, err error) { _model = &EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN{ ResourceType: core.StringPtr(resourceType), CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) isaEndpointGatewayTargetPrototypeProviderCloudServiceIdentity() bool { return true } func (*EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) isaEndpointGatewayTargetPrototype() bool { return true } // UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN unmarshals an instance of EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN from the specified map of raw messages. func UnmarshalEndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayTargetPrototypeProviderCloudServiceIdentityProviderCloudServiceIdentityByCRN) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName : The name of this provider infrastructure service. // This model "extends" EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity type EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName struct { // The type of target for this endpoint gateway. ResourceType *string `json:"resource_type" validate:"required"` // The name of a provider infrastructure service. Must be: // - `ibm-ntp-server`: An NTP (Network Time Protocol) server provided by IBM. Name *string `json:"name" validate:"required"` } // Constants associated with the EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName.ResourceType property. // The type of target for this endpoint gateway. const ( EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByNameResourceTypeProviderCloudServiceConst = "provider_cloud_service" EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByNameResourceTypeProviderInfrastructureServiceConst = "provider_infrastructure_service" ) // NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName : Instantiate EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName (Generic Model Constructor) func (*VpcbetaV1) NewEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(resourceType string, name string) (_model *EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName, err error) { _model = &EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName{ ResourceType: core.StringPtr(resourceType), Name: core.StringPtr(name), } err = core.ValidateStruct(_model, "required parameters") return } func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) isaEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentity() bool { return true } func (*EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) isaEndpointGatewayTargetPrototype() bool { return true } // UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName unmarshals an instance of EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName from the specified map of raw messages. func UnmarshalEndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(EndpointGatewayTargetPrototypeProviderInfrastructureServiceIdentityProviderInfrastructureServiceIdentityByName) err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct // This model "extends" FloatingIPTargetPatchNetworkInterfaceIdentity type FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { // The URL for this instance network interface. Href *string `json:"href" validate:"required"` } // NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (_model *FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { _model = &FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPTargetPatchNetworkInterfaceIdentity() bool { return true } func (*FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPTargetPatch() bool { return true } // UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct // This model "extends" FloatingIPTargetPatchNetworkInterfaceIdentity type FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` } // NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (_model *FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { _model = &FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPTargetPatchNetworkInterfaceIdentity() bool { return true } func (*FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPTargetPatch() bool { return true } // UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. func UnmarshalFloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPatchNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct // This model "extends" FloatingIPTargetPrototypeNetworkInterfaceIdentity type FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { // The URL for this instance network interface. Href *string `json:"href" validate:"required"` } // NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (_model *FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { _model = &FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPTargetPrototypeNetworkInterfaceIdentity() bool { return true } func (*FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPTargetPrototype() bool { return true } // UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. func UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct // This model "extends" FloatingIPTargetPrototypeNetworkInterfaceIdentity type FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` } // NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (_model *FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { _model = &FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPTargetPrototypeNetworkInterfaceIdentity() bool { return true } func (*FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPTargetPrototype() bool { return true } // UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. func UnmarshalFloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FloatingIPTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN : FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct // This model "extends" FlowLogCollectorTargetPrototypeInstanceIdentity type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct { // The CRN for this virtual server instance. CRN *string `json:"crn" validate:"required"` } // NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (_model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) { _model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref : FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref struct // This model "extends" FlowLogCollectorTargetPrototypeInstanceIdentity type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref struct { // The URL for this virtual server instance. Href *string `json:"href" validate:"required"` } // NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) { _model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID : FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID struct // This model "extends" FlowLogCollectorTargetPrototypeInstanceIdentity type FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID struct { // The unique identifier for this virtual server instance. ID *string `json:"id" validate:"required"` } // NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID : Instantiate FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) { _model = &FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) isaFlowLogCollectorTargetPrototypeInstanceIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeInstanceIdentityInstanceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct // This model "extends" FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { // The URL for this instance network interface. Href *string `json:"href" validate:"required"` } // NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { _model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct // This model "extends" FlowLogCollectorTargetPrototypeNetworkInterfaceIdentity type FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { // The unique identifier for this instance network interface. ID *string `json:"id" validate:"required"` } // NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { _model = &FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorTargetPrototypeNetworkInterfaceIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN : FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN struct // This model "extends" FlowLogCollectorTargetPrototypeSubnetIdentity type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN struct { // The CRN for this subnet. CRN *string `json:"crn" validate:"required"` } // NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(crn string) (_model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN, err error) { _model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref : FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref struct // This model "extends" FlowLogCollectorTargetPrototypeSubnetIdentity type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref struct { // The URL for this subnet. Href *string `json:"href" validate:"required"` } // NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref, err error) { _model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID : FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID struct // This model "extends" FlowLogCollectorTargetPrototypeSubnetIdentity type FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID struct { // The unique identifier for this subnet. ID *string `json:"id" validate:"required"` } // NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID : Instantiate FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID, err error) { _model = &FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) isaFlowLogCollectorTargetPrototypeSubnetIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeSubnetIdentitySubnetIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN : FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN struct // This model "extends" FlowLogCollectorTargetPrototypeVPCIdentity type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN struct { // The CRN for this VPC. CRN *string `json:"crn" validate:"required"` } // NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(crn string) (_model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN, err error) { _model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref : FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref struct // This model "extends" FlowLogCollectorTargetPrototypeVPCIdentity type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref struct { // The URL for this VPC. Href *string `json:"href" validate:"required"` } // NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(href string) (_model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref, err error) { _model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID : FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID struct // This model "extends" FlowLogCollectorTargetPrototypeVPCIdentity type FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID struct { // The unique identifier for this VPC. ID *string `json:"id" validate:"required"` } // NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID : Instantiate FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(id string) (_model *FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID, err error) { _model = &FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) isaFlowLogCollectorTargetPrototypeVPCIdentity() bool { return true } func (*FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) isaFlowLogCollectorTargetPrototype() bool { return true } // UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID unmarshals an instance of FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID from the specified map of raw messages. func UnmarshalFlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(FlowLogCollectorTargetPrototypeVPCIdentityVPCIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct // Models which "extend" this model: // - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup // - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool { return true } type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecIntf interface { InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct // Models which "extend" this model: // - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup // - InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototype type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The date and time the scheduled action will run. RunAt *strfmt.DateTime `json:"run_at,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager,omitempty"` } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool { return true } type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtIntf interface { InstanceGroupManagerActionPrototypeScheduledActionPrototypeIntf isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionScheduledActionGroupTarget : InstanceGroupManagerActionScheduledActionGroupTarget struct // This model "extends" InstanceGroupManagerActionScheduledAction type InstanceGroupManagerActionScheduledActionGroupTarget struct { // Indicates whether this scheduled action will be automatically deleted after it has completed and // `auto_delete_timeout` hours have passed. At present, this is always // `true`, but may be modifiable in the future. AutoDelete *bool `json:"auto_delete" validate:"required"` // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the // future. AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"` // The date and time that the instance group manager action was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The URL for this instance group manager action. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager action. ID *string `json:"id" validate:"required"` // The name for this instance group manager action. The name is unique across all actions for the instance group // manager. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the instance group action // - `active`: Action is ready to be run // - `completed`: Action was completed successfully // - `failed`: Action could not be completed successfully // - `incompatible`: Action parameters are not compatible with the group or manager // - `omitted`: Action was not applied because this action's manager was disabled. Status *string `json:"status" validate:"required"` // The date and time that the instance group manager action was updated. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` // The type of action for the instance group. ActionType *string `json:"action_type" validate:"required"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` // The date and time the scheduled action was last applied. If absent, the action has never been applied. LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"` // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run // time. NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"` Group *InstanceGroupManagerScheduledActionGroup `json:"group" validate:"required"` } // Constants associated with the InstanceGroupManagerActionScheduledActionGroupTarget.ResourceType property. // The resource type. const ( InstanceGroupManagerActionScheduledActionGroupTargetResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action" ) // Constants associated with the InstanceGroupManagerActionScheduledActionGroupTarget.Status property. // The status of the instance group action // - `active`: Action is ready to be run // - `completed`: Action was completed successfully // - `failed`: Action could not be completed successfully // - `incompatible`: Action parameters are not compatible with the group or manager // - `omitted`: Action was not applied because this action's manager was disabled. const ( InstanceGroupManagerActionScheduledActionGroupTargetStatusActiveConst = "active" InstanceGroupManagerActionScheduledActionGroupTargetStatusCompletedConst = "completed" InstanceGroupManagerActionScheduledActionGroupTargetStatusFailedConst = "failed" InstanceGroupManagerActionScheduledActionGroupTargetStatusIncompatibleConst = "incompatible" InstanceGroupManagerActionScheduledActionGroupTargetStatusOmittedConst = "omitted" ) // Constants associated with the InstanceGroupManagerActionScheduledActionGroupTarget.ActionType property. // The type of action for the instance group. const ( InstanceGroupManagerActionScheduledActionGroupTargetActionTypeScheduledConst = "scheduled" ) func (*InstanceGroupManagerActionScheduledActionGroupTarget) isaInstanceGroupManagerActionScheduledAction() bool { return true } func (*InstanceGroupManagerActionScheduledActionGroupTarget) isaInstanceGroupManagerAction() bool { return true } // UnmarshalInstanceGroupManagerActionScheduledActionGroupTarget unmarshals an instance of InstanceGroupManagerActionScheduledActionGroupTarget from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionScheduledActionGroupTarget(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionScheduledActionGroupTarget) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroup) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionScheduledActionManagerTarget : InstanceGroupManagerActionScheduledActionManagerTarget struct // This model "extends" InstanceGroupManagerActionScheduledAction type InstanceGroupManagerActionScheduledActionManagerTarget struct { // Indicates whether this scheduled action will be automatically deleted after it has completed and // `auto_delete_timeout` hours have passed. At present, this is always // `true`, but may be modifiable in the future. AutoDelete *bool `json:"auto_delete" validate:"required"` // If `auto_delete` is `true`, and this scheduled action has finished, the hours after which it will be automatically // deleted. If the value is `0`, the action will be deleted once it has finished. This value may be modifiable in the // future. AutoDeleteTimeout *int64 `json:"auto_delete_timeout" validate:"required"` // The date and time that the instance group manager action was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The URL for this instance group manager action. Href *string `json:"href" validate:"required"` // The unique identifier for this instance group manager action. ID *string `json:"id" validate:"required"` // The name for this instance group manager action. The name is unique across all actions for the instance group // manager. Name *string `json:"name" validate:"required"` // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the instance group action // - `active`: Action is ready to be run // - `completed`: Action was completed successfully // - `failed`: Action could not be completed successfully // - `incompatible`: Action parameters are not compatible with the group or manager // - `omitted`: Action was not applied because this action's manager was disabled. Status *string `json:"status" validate:"required"` // The date and time that the instance group manager action was updated. UpdatedAt *strfmt.DateTime `json:"updated_at" validate:"required"` // The type of action for the instance group. ActionType *string `json:"action_type" validate:"required"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` // The date and time the scheduled action was last applied. If absent, the action has never been applied. LastAppliedAt *strfmt.DateTime `json:"last_applied_at,omitempty"` // The date and time the scheduled action will next run. If absent, the system is currently calculating the next run // time. NextRunAt *strfmt.DateTime `json:"next_run_at,omitempty"` Manager InstanceGroupManagerScheduledActionManagerIntf `json:"manager" validate:"required"` } // Constants associated with the InstanceGroupManagerActionScheduledActionManagerTarget.ResourceType property. // The resource type. const ( InstanceGroupManagerActionScheduledActionManagerTargetResourceTypeInstanceGroupManagerActionConst = "instance_group_manager_action" ) // Constants associated with the InstanceGroupManagerActionScheduledActionManagerTarget.Status property. // The status of the instance group action // - `active`: Action is ready to be run // - `completed`: Action was completed successfully // - `failed`: Action could not be completed successfully // - `incompatible`: Action parameters are not compatible with the group or manager // - `omitted`: Action was not applied because this action's manager was disabled. const ( InstanceGroupManagerActionScheduledActionManagerTargetStatusActiveConst = "active" InstanceGroupManagerActionScheduledActionManagerTargetStatusCompletedConst = "completed" InstanceGroupManagerActionScheduledActionManagerTargetStatusFailedConst = "failed" InstanceGroupManagerActionScheduledActionManagerTargetStatusIncompatibleConst = "incompatible" InstanceGroupManagerActionScheduledActionManagerTargetStatusOmittedConst = "omitted" ) // Constants associated with the InstanceGroupManagerActionScheduledActionManagerTarget.ActionType property. // The type of action for the instance group. const ( InstanceGroupManagerActionScheduledActionManagerTargetActionTypeScheduledConst = "scheduled" ) func (*InstanceGroupManagerActionScheduledActionManagerTarget) isaInstanceGroupManagerActionScheduledAction() bool { return true } func (*InstanceGroupManagerActionScheduledActionManagerTarget) isaInstanceGroupManagerAction() bool { return true } // UnmarshalInstanceGroupManagerActionScheduledActionManagerTarget unmarshals an instance of InstanceGroupManagerActionScheduledActionManagerTarget from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionScheduledActionManagerTarget(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionScheduledActionManagerTarget) err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) if err != nil { return } err = core.UnmarshalPrimitive(m, "auto_delete_timeout", &obj.AutoDeleteTimeout) if err != nil { return } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "resource_type", &obj.ResourceType) if err != nil { return } err = core.UnmarshalPrimitive(m, "status", &obj.Status) if err != nil { return } err = core.UnmarshalPrimitive(m, "updated_at", &obj.UpdatedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "action_type", &obj.ActionType) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } err = core.UnmarshalPrimitive(m, "last_applied_at", &obj.LastAppliedAt) if err != nil { return } err = core.UnmarshalPrimitive(m, "next_run_at", &obj.NextRunAt) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManager) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref : InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref struct // This model "extends" InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref struct { // The desired maximum number of instance group members at the scheduled time. MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` // The desired minimum number of instance group members at the scheduled time. MinMembershipCount *int64 `json:"min_membership_count,omitempty"` // The URL for this instance group manager. Href *string `json:"href" validate:"required"` } // NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref : Instantiate InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(href string) (_model *InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref, err error) { _model = &InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool { return true } func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) isaInstanceGroupManagerScheduledActionManagerPrototype() bool { return true } // UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref from the specified map of raw messages. func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByHref) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID : InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID struct // This model "extends" InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype type InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID struct { // The desired maximum number of instance group members at the scheduled time. MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` // The desired minimum number of instance group members at the scheduled time. MinMembershipCount *int64 `json:"min_membership_count,omitempty"` // The unique identifier for this instance group manager. ID *string `json:"id" validate:"required"` } // NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID : Instantiate InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID(id string) (_model *InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID, err error) { _model = &InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) isaInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototype() bool { return true } func (*InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) isaInstanceGroupManagerScheduledActionManagerPrototype() bool { return true } // UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID unmarshals an instance of InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID from the specified map of raw messages. func UnmarshalInstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerScheduledActionManagerPrototypeAutoScalePrototypeByID) err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) if err != nil { return } err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct // This model "extends" InstancePlacementTargetPatchDedicatedHostGroupIdentity type InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct { // The CRN for this dedicated host group. CRN *string `json:"crn" validate:"required"` } // NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : Instantiate InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn string) (_model *InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN, err error) { _model = &InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool { return true } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct // This model "extends" InstancePlacementTargetPatchDedicatedHostGroupIdentity type InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct { // The URL for this dedicated host group. Href *string `json:"href" validate:"required"` } // NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : Instantiate InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(href string) (_model *InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref, err error) { _model = &InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool { return true } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct // This model "extends" InstancePlacementTargetPatchDedicatedHostGroupIdentity type InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct { // The unique identifier for this dedicated host group. ID *string `json:"id" validate:"required"` } // NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : Instantiate InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(id string) (_model *InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID, err error) { _model = &InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPatchDedicatedHostGroupIdentity() bool { return true } func (*InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID unmarshals an instance of InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN : InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN struct // This model "extends" InstancePlacementTargetPatchDedicatedHostIdentity type InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN struct { // The CRN for this dedicated host. CRN *string `json:"crn" validate:"required"` } // NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN : Instantiate InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(crn string) (_model *InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN, err error) { _model = &InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool { return true } func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref : InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref struct // This model "extends" InstancePlacementTargetPatchDedicatedHostIdentity type InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref struct { // The URL for this dedicated host. Href *string `json:"href" validate:"required"` } // NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref : Instantiate InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(href string) (_model *InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref, err error) { _model = &InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool { return true } func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID : InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID struct // This model "extends" InstancePlacementTargetPatchDedicatedHostIdentity type InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID struct { // The unique identifier for this dedicated host. ID *string `json:"id" validate:"required"` } // NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID : Instantiate InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID(id string) (_model *InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID, err error) { _model = &InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPatchDedicatedHostIdentity() bool { return true } func (*InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPatch() bool { return true } // UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID unmarshals an instance of InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID from the specified map of raw messages. func UnmarshalInstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPatchDedicatedHostIdentityDedicatedHostIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct // This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN struct { // The CRN for this dedicated host group. CRN *string `json:"crn" validate:"required"` } // NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(crn string) (_model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN, err error) { _model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool { return true } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct // This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref struct { // The URL for this dedicated host group. Href *string `json:"href" validate:"required"` } // NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(href string) (_model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref, err error) { _model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool { return true } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct // This model "extends" InstancePlacementTargetPrototypeDedicatedHostGroupIdentity type InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID struct { // The unique identifier for this dedicated host group. ID *string `json:"id" validate:"required"` } // NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID : Instantiate InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(id string) (_model *InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID, err error) { _model = &InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPrototypeDedicatedHostGroupIdentity() bool { return true } func (*InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostGroupIdentityDedicatedHostGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN struct // This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN struct { // The CRN for this dedicated host. CRN *string `json:"crn" validate:"required"` } // NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(crn string) (_model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN, err error) { _model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool { return true } func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref struct // This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref struct { // The URL for this dedicated host. Href *string `json:"href" validate:"required"` } // NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(href string) (_model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref, err error) { _model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool { return true } func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID : InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID struct // This model "extends" InstancePlacementTargetPrototypeDedicatedHostIdentity type InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID struct { // The unique identifier for this dedicated host. ID *string `json:"id" validate:"required"` } // NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID : Instantiate InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(id string) (_model *InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID, err error) { _model = &InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPrototypeDedicatedHostIdentity() bool { return true } func (*InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID unmarshals an instance of InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypeDedicatedHostIdentityDedicatedHostIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN : InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN struct // This model "extends" InstancePlacementTargetPrototypePlacementGroupIdentity type InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN struct { // The CRN for this placement group. CRN *string `json:"crn" validate:"required"` } // NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN : Instantiate InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(crn string) (_model *InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN, err error) { _model = &InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool { return true } func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref : InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref struct // This model "extends" InstancePlacementTargetPrototypePlacementGroupIdentity type InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref struct { // The URL for this placement group. Href *string `json:"href" validate:"required"` } // NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref : Instantiate InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(href string) (_model *InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref, err error) { _model = &InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool { return true } func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID : InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID struct // This model "extends" InstancePlacementTargetPrototypePlacementGroupIdentity type InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID struct { // The unique identifier for this placement group. ID *string `json:"id" validate:"required"` } // NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID : Instantiate InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID(id string) (_model *InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID, err error) { _model = &InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) isaInstancePlacementTargetPrototypePlacementGroupIdentity() bool { return true } func (*InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) isaInstancePlacementTargetPrototype() bool { return true } // UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID unmarshals an instance of InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID from the specified map of raw messages. func UnmarshalInstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstancePlacementTargetPrototypePlacementGroupIdentityPlacementGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct // This model "extends" LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct { // The pool's canonical URL. Href *string `json:"href" validate:"required"` } // NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (_model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) { _model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool { return true } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPatch() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct // This model "extends" LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity type LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct { // The unique identifier for this load balancer pool. ID *string `json:"id" validate:"required"` } // NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : Instantiate LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (_model *LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) { _model = &LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentity() bool { return true } func (*LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPatch() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID unmarshals an instance of LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPatchLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct // This model "extends" LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref struct { // The pool's canonical URL. Href *string `json:"href" validate:"required"` } // NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(href string) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref, err error) { _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool { return true } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) isaLoadBalancerListenerPolicyTargetPrototype() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct // This model "extends" LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity type LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID struct { // The unique identifier for this load balancer pool. ID *string `json:"id" validate:"required"` } // NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID : Instantiate LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(id string) (_model *LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID, err error) { _model = &LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentity() bool { return true } func (*LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) isaLoadBalancerListenerPolicyTargetPrototype() bool { return true } // UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID unmarshals an instance of LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID from the specified map of raw messages. func UnmarshalLoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerListenerPolicyTargetPrototypeLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN : LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct // This model "extends" LoadBalancerPoolMemberTargetPrototypeInstanceIdentity type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN struct { // The CRN for this virtual server instance. CRN *string `json:"crn" validate:"required"` } // NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(crn string) (_model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN, err error) { _model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool { return true } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) isaLoadBalancerPoolMemberTargetPrototype() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref : LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref struct // This model "extends" LoadBalancerPoolMemberTargetPrototypeInstanceIdentity type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref struct { // The URL for this virtual server instance. Href *string `json:"href" validate:"required"` } // NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(href string) (_model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref, err error) { _model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool { return true } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) isaLoadBalancerPoolMemberTargetPrototype() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID : LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID struct // This model "extends" LoadBalancerPoolMemberTargetPrototypeInstanceIdentity type LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID struct { // The unique identifier for this virtual server instance. ID *string `json:"id" validate:"required"` } // NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID : Instantiate LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(id string) (_model *LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID, err error) { _model = &LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) isaLoadBalancerPoolMemberTargetPrototypeInstanceIdentity() bool { return true } func (*LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) isaLoadBalancerPoolMemberTargetPrototype() bool { return true } // UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID unmarshals an instance of LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID from the specified map of raw messages. func UnmarshalLoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkInterfaceIPPrototypeReservedIPIdentityByHref : NetworkInterfaceIPPrototypeReservedIPIdentityByHref struct // This model "extends" NetworkInterfaceIPPrototypeReservedIPIdentity type NetworkInterfaceIPPrototypeReservedIPIdentityByHref struct { // The URL for this reserved IP. Href *string `json:"href" validate:"required"` } // NewNetworkInterfaceIPPrototypeReservedIPIdentityByHref : Instantiate NetworkInterfaceIPPrototypeReservedIPIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewNetworkInterfaceIPPrototypeReservedIPIdentityByHref(href string) (_model *NetworkInterfaceIPPrototypeReservedIPIdentityByHref, err error) { _model = &NetworkInterfaceIPPrototypeReservedIPIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkInterfaceIPPrototypeReservedIPIdentityByHref) isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool { return true } func (*NetworkInterfaceIPPrototypeReservedIPIdentityByHref) isaNetworkInterfaceIPPrototype() bool { return true } // UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByHref unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPIdentityByHref from the specified map of raw messages. func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkInterfaceIPPrototypeReservedIPIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // NetworkInterfaceIPPrototypeReservedIPIdentityByID : NetworkInterfaceIPPrototypeReservedIPIdentityByID struct // This model "extends" NetworkInterfaceIPPrototypeReservedIPIdentity type NetworkInterfaceIPPrototypeReservedIPIdentityByID struct { // The unique identifier for this reserved IP. ID *string `json:"id" validate:"required"` } // NewNetworkInterfaceIPPrototypeReservedIPIdentityByID : Instantiate NetworkInterfaceIPPrototypeReservedIPIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewNetworkInterfaceIPPrototypeReservedIPIdentityByID(id string) (_model *NetworkInterfaceIPPrototypeReservedIPIdentityByID, err error) { _model = &NetworkInterfaceIPPrototypeReservedIPIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*NetworkInterfaceIPPrototypeReservedIPIdentityByID) isaNetworkInterfaceIPPrototypeReservedIPIdentity() bool { return true } func (*NetworkInterfaceIPPrototypeReservedIPIdentityByID) isaNetworkInterfaceIPPrototype() bool { return true } // UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByID unmarshals an instance of NetworkInterfaceIPPrototypeReservedIPIdentityByID from the specified map of raw messages. func UnmarshalNetworkInterfaceIPPrototypeReservedIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkInterfaceIPPrototypeReservedIPIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress struct // This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress struct { // The globally unique IP address. Address *string `json:"address" validate:"required"` } // NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(address string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress, err error) { _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool { return true } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) isaPublicGatewayFloatingIPPrototype() bool { return true } // UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress from the specified map of raw messages. func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByAddress) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN struct // This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN struct { // The CRN for this floating IP. CRN *string `json:"crn" validate:"required"` } // NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(crn string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN, err error) { _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool { return true } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) isaPublicGatewayFloatingIPPrototype() bool { return true } // UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN from the specified map of raw messages. func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref struct // This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref struct { // The URL for this floating IP. Href *string `json:"href" validate:"required"` } // NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(href string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref, err error) { _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool { return true } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) isaPublicGatewayFloatingIPPrototype() bool { return true } // UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref from the specified map of raw messages. func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID : PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID struct // This model "extends" PublicGatewayFloatingIPPrototypeFloatingIPIdentity type PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID struct { // The unique identifier for this floating IP. ID *string `json:"id" validate:"required"` } // NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID : Instantiate PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(id string) (_model *PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID, err error) { _model = &PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) isaPublicGatewayFloatingIPPrototypeFloatingIPIdentity() bool { return true } func (*PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) isaPublicGatewayFloatingIPPrototype() bool { return true } // UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID unmarshals an instance of PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID from the specified map of raw messages. func UnmarshalPublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(PublicGatewayFloatingIPPrototypeFloatingIPIdentityFloatingIPIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN : ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN struct // This model "extends" ReservedIPTargetPrototypeEndpointGatewayIdentity type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN struct { // The CRN for this endpoint gateway. CRN *string `json:"crn" validate:"required"` } // NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(crn string) (_model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN, err error) { _model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool { return true } func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) isaReservedIPTargetPrototype() bool { return true } // UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN from the specified map of raw messages. func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref : ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref struct // This model "extends" ReservedIPTargetPrototypeEndpointGatewayIdentity type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref struct { // The URL for this endpoint gateway. Href *string `json:"href" validate:"required"` } // NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(href string) (_model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref, err error) { _model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool { return true } func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) isaReservedIPTargetPrototype() bool { return true } // UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref from the specified map of raw messages. func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID : ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID struct // This model "extends" ReservedIPTargetPrototypeEndpointGatewayIdentity type ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID struct { // The unique identifier for this endpoint gateway. ID *string `json:"id" validate:"required"` } // NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID : Instantiate ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(id string) (_model *ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID, err error) { _model = &ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) isaReservedIPTargetPrototypeEndpointGatewayIdentity() bool { return true } func (*ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) isaReservedIPTargetPrototype() bool { return true } // UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID unmarshals an instance of ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID from the specified map of raw messages. func UnmarshalReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(ReservedIPTargetPrototypeEndpointGatewayIdentityEndpointGatewayIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP : RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP struct // This model "extends" RouteNextHopPatchRouteNextHopIP type RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP struct { // The sentinel IP address (`0.0.0.0`). // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP : Instantiate RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP (Generic Model Constructor) func (*VpcbetaV1) NewRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(address string) (_model *RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP, err error) { _model = &RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP) isaRouteNextHopPatchRouteNextHopIP() bool { return true } func (*RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP) isaRouteNextHopPatch() bool { return true } // UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP unmarshals an instance of RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP from the specified map of raw messages. func UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopPatchRouteNextHopIPRouteNextHopIPSentinelIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP : RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP struct // This model "extends" RouteNextHopPatchRouteNextHopIP type RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP struct { // A unicast IP address, which must not be any of the following values: // // - `0.0.0.0` (the sentinel IP address) // - `224.0.0.0` to `239.255.255.255` (multicast IP addresses) // - `255.255.255.255` (the broadcast IP address) // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP : Instantiate RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP (Generic Model Constructor) func (*VpcbetaV1) NewRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(address string) (_model *RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP, err error) { _model = &RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP) isaRouteNextHopPatchRouteNextHopIP() bool { return true } func (*RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP) isaRouteNextHopPatch() bool { return true } // UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP unmarshals an instance of RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP from the specified map of raw messages. func UnmarshalRouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopPatchRouteNextHopIPRouteNextHopIPUnicastIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct // This model "extends" RouteNextHopPatchVPNGatewayConnectionIdentity type RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct { // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` } // NewRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : Instantiate RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href string) (_model *RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref, err error) { _model = &RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRouteNextHopPatchVPNGatewayConnectionIdentity() bool { return true } func (*RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRouteNextHopPatch() bool { return true } // UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref unmarshals an instance of RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref from the specified map of raw messages. func UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct // This model "extends" RouteNextHopPatchVPNGatewayConnectionIdentity type RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct { // The unique identifier for this VPN gateway connection. ID *string `json:"id" validate:"required"` } // NewRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : Instantiate RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id string) (_model *RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID, err error) { _model = &RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRouteNextHopPatchVPNGatewayConnectionIdentity() bool { return true } func (*RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRouteNextHopPatch() bool { return true } // UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID unmarshals an instance of RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID from the specified map of raw messages. func UnmarshalRouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RouteNextHopPatchVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP : RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP struct // This model "extends" RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP type RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP struct { // The sentinel IP address (`0.0.0.0`). // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP : Instantiate RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP (Generic Model Constructor) func (*VpcbetaV1) NewRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(address string) (_model *RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP, err error) { _model = &RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP) isaRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP() bool { return true } func (*RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP) isaRoutePrototypeNextHop() bool { return true } // UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP unmarshals an instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP from the specified map of raw messages. func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPSentinelIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP : RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP struct // This model "extends" RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP type RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP struct { // A unicast IP address, which must not be any of the following values: // // - `0.0.0.0` (the sentinel IP address) // - `224.0.0.0` to `239.255.255.255` (multicast IP addresses) // - `255.255.255.255` (the broadcast IP address) // // This property may add support for IPv6 addresses in the future. When processing a value in this property, verify // that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the // error, or bypass the resource on which the unexpected IP address format was encountered. Address *string `json:"address" validate:"required"` } // NewRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP : Instantiate RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP (Generic Model Constructor) func (*VpcbetaV1) NewRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(address string) (_model *RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP, err error) { _model = &RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP{ Address: core.StringPtr(address), } err = core.ValidateStruct(_model, "required parameters") return } func (*RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP) isaRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIP() bool { return true } func (*RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP) isaRoutePrototypeNextHop() bool { return true } // UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP unmarshals an instance of RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP from the specified map of raw messages. func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutePrototypeNextHopRouteNextHopPrototypeRouteNextHopIPRouteNextHopPrototypeRouteNextHopIPRouteNextHopIPUnicastIP) err = core.UnmarshalPrimitive(m, "address", &obj.Address) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct // This model "extends" RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity type RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref struct { // The VPN connection's canonical URL. Href *string `json:"href" validate:"required"` } // NewRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref : Instantiate RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(href string) (_model *RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref, err error) { _model = &RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool { return true } func (*RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) isaRoutePrototypeNextHop() bool { return true } // UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref unmarshals an instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref from the specified map of raw messages. func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct // This model "extends" RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity type RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID struct { // The unique identifier for this VPN gateway connection. ID *string `json:"id" validate:"required"` } // NewRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID : Instantiate RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(id string) (_model *RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID, err error) { _model = &RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentity() bool { return true } func (*RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) isaRoutePrototypeNextHop() bool { return true } // UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID unmarshals an instance of RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID from the specified map of raw messages. func UnmarshalRoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(RoutePrototypeNextHopRouteNextHopPrototypeVPNGatewayConnectionIdentityRouteNextHopPrototypeVPNGatewayConnectionIdentityVPNGatewayConnectionIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN struct // This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN struct { // The security group's CRN. CRN *string `json:"crn" validate:"required"` } // NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { _model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool { return true } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePatch() bool { return true } // UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref struct // This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref struct { // The security group's canonical URL. Href *string `json:"href" validate:"required"` } // NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (_model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { _model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool { return true } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePatch() bool { return true } // UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID struct // This model "extends" SecurityGroupRuleRemotePatchSecurityGroupIdentity type SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID struct { // The unique identifier for this security group. ID *string `json:"id" validate:"required"` } // NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(id string) (_model *SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID, err error) { _model = &SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePatchSecurityGroupIdentity() bool { return true } func (*SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePatch() bool { return true } // UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePatchSecurityGroupIdentitySecurityGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN struct // This model "extends" SecurityGroupRuleRemotePrototypeSecurityGroupIdentity type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN struct { // The security group's CRN. CRN *string `json:"crn" validate:"required"` } // NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (_model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { _model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool { return true } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRuleRemotePrototype() bool { return true } // UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref struct // This model "extends" SecurityGroupRuleRemotePrototypeSecurityGroupIdentity type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref struct { // The security group's canonical URL. Href *string `json:"href" validate:"required"` } // NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (_model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { _model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool { return true } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRuleRemotePrototype() bool { return true } // UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID struct // This model "extends" SecurityGroupRuleRemotePrototypeSecurityGroupIdentity type SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID struct { // The unique identifier for this security group. ID *string `json:"id" validate:"required"` } // NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(id string) (_model *SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID, err error) { _model = &SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePrototypeSecurityGroupIdentity() bool { return true } func (*SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRuleRemotePrototype() bool { return true } // UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. func UnmarshalSecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(SecurityGroupRuleRemotePrototypeSecurityGroupIdentitySecurityGroupIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref : VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref struct // This model "extends" VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext type VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref struct { // The URL for this reserved IP. Href *string `json:"href" validate:"required"` } // NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref : Instantiate VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref (Generic Model Constructor) func (*VpcbetaV1) NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref(href string) (_model *VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref, err error) { _model = &VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref) isaVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext() bool { return true } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref) isaVirtualNetworkInterfacePrimaryIPPrototype() bool { return true } // UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref unmarshals an instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref from the specified map of raw messages. func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID : VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID struct // This model "extends" VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext type VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID struct { // The unique identifier for this reserved IP. ID *string `json:"id" validate:"required"` } // NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID : Instantiate VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID (Generic Model Constructor) func (*VpcbetaV1) NewVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID(id string) (_model *VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID, err error) { _model = &VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) isaVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContext() bool { return true } func (*VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) isaVirtualNetworkInterfacePrimaryIPPrototype() bool { return true } // UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID unmarshals an instance of VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID from the specified map of raw messages. func UnmarshalVirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VirtualNetworkInterfacePrimaryIPPrototypeReservedIPIdentityVirtualNetworkInterfacePrimaryIPContextByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN : VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN struct // This model "extends" VolumeAttachmentPrototypeVolumeVolumeIdentity type VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN struct { // The CRN for this volume. CRN *string `json:"crn" validate:"required"` } // NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN : Instantiate VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(crn string) (_model *VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN, err error) { _model = &VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN{ CRN: core.StringPtr(crn), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool { return true } func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByCRN) err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref : VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref struct // This model "extends" VolumeAttachmentPrototypeVolumeVolumeIdentity type VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref struct { // The URL for this volume. Href *string `json:"href" validate:"required"` } // NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref : Instantiate VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(href string) (_model *VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref, err error) { _model = &VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool { return true } func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID : VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID struct // This model "extends" VolumeAttachmentPrototypeVolumeVolumeIdentity type VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID struct { // The unique identifier for this volume. ID *string `json:"id" validate:"required"` } // NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID : Instantiate VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(id string) (_model *VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID, err error) { _model = &VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) isaVolumeAttachmentPrototypeVolumeVolumeIdentity() bool { return true } func (*VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumeIdentityVolumeIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct // This model "extends" VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct { // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use for this volume. If unspecified, the instance's resource group will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or // updating volumes may expand in the future. Capacity *int64 `json:"capacity" validate:"required"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` } // NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : Instantiate VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(profile VolumeProfileIdentityIntf, capacity int64) (_model *VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity, err error) { _model = &VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity{ Profile: profile, Capacity: core.Int64Ptr(capacity), } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool { return true } func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot : VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot struct // This model "extends" VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext type VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot struct { // The maximum I/O operations per second (IOPS) to use for this volume. Applicable only to volumes using a profile // `family` of `custom`. Iops *int64 `json:"iops,omitempty"` // The name for this volume. The name must not be used by another volume in the region. If unspecified, the name will // be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The [profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles) to use for this volume. Profile VolumeProfileIdentityIntf `json:"profile" validate:"required"` // The resource group to use for this volume. If unspecified, the instance's resource group will be used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The [user tags](https://cloud.ibm.com/apidocs/tagging#types-of-tags) associated with this volume. UserTags []string `json:"user_tags,omitempty"` // The capacity to use for the volume (in gigabytes). Must be at least the snapshot's // `minimum_capacity`. The maximum value may increase in the future. // // If unspecified, the capacity will be the source snapshot's `minimum_capacity`. Capacity *int64 `json:"capacity,omitempty"` // The root key to use to wrap the data encryption key for the volume. // // If unspecified, the `encryption` type for the volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The snapshot from which to clone the volume. SourceSnapshot SnapshotIdentityIntf `json:"source_snapshot" validate:"required"` } // NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot : Instantiate VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot (Generic Model Constructor) func (*VpcbetaV1) NewVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(profile VolumeProfileIdentityIntf, sourceSnapshot SnapshotIdentityIntf) (_model *VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot, err error) { _model = &VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot{ Profile: profile, SourceSnapshot: sourceSnapshot, } err = core.ValidateStruct(_model, "required parameters") return } func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) isaVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContext() bool { return true } func (*VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) isaVolumeAttachmentPrototypeVolume() bool { return true } // UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot unmarshals an instance of VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeBySourceSnapshot) err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return } err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalModel(m, "profile", &obj.Profile, UnmarshalVolumeProfileIdentity) if err != nil { return } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return } err = core.UnmarshalPrimitive(m, "user_tags", &obj.UserTags) if err != nil { return } err = core.UnmarshalPrimitive(m, "capacity", &obj.Capacity) if err != nil { return } err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) if err != nil { return } err = core.UnmarshalModel(m, "source_snapshot", &obj.SourceSnapshot, UnmarshalSnapshotIdentity) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"` } // NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup, err error) { _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup{ Group: group, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The cron specification for a recurring scheduled action. Actions can be applied a maximum of one time within a 5 min // period. CronSpec *string `json:"cron_spec,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"` } // NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager, err error) { _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager{ Manager: manager, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpec() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByCronSpecByManager) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "cron_spec", &obj.CronSpec) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The date and time the scheduled action will run. RunAt *strfmt.DateTime `json:"run_at,omitempty"` Group *InstanceGroupManagerScheduledActionGroupPrototype `json:"group" validate:"required"` } // NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(group *InstanceGroupManagerScheduledActionGroupPrototype) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup, err error) { _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup{ Group: group, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByGroup) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { return } err = core.UnmarshalModel(m, "group", &obj.Group, UnmarshalInstanceGroupManagerScheduledActionGroupPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct // This model "extends" InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt type InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager struct { // The name for this instance group manager action. The name must not be used by another action for the instance group // manager. If unspecified, the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` // The date and time the scheduled action will run. RunAt *strfmt.DateTime `json:"run_at,omitempty"` Manager InstanceGroupManagerScheduledActionManagerPrototypeIntf `json:"manager" validate:"required"` } // NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager : Instantiate InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager (Generic Model Constructor) func (*VpcbetaV1) NewInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(manager InstanceGroupManagerScheduledActionManagerPrototypeIntf) (_model *InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager, err error) { _model = &InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager{ Manager: manager, } err = core.ValidateStruct(_model, "required parameters") return } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAt() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototypeScheduledActionPrototype() bool { return true } func (*InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) isaInstanceGroupManagerActionPrototype() bool { return true } // UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager unmarshals an instance of InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager from the specified map of raw messages. func UnmarshalInstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(InstanceGroupManagerActionPrototypeScheduledActionPrototypeByRunAtByManager) err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } err = core.UnmarshalPrimitive(m, "run_at", &obj.RunAt) if err != nil { return } err = core.UnmarshalModel(m, "manager", &obj.Manager, UnmarshalInstanceGroupManagerScheduledActionManagerPrototype) if err != nil { return } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } // VpcsPager can be used to simplify the use of the "ListVpcs" method. type VpcsPager struct { hasNext bool options *ListVpcsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVpcsPager returns a new VpcsPager instance. func (vpcbeta *VpcbetaV1) NewVpcsPager(options *ListVpcsOptions) (pager *VpcsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVpcsOptions = *options pager = &VpcsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VpcsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VpcsPager) GetNextWithContext(ctx context.Context) (page []VPC, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVpcsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Vpcs return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VpcsPager) GetAllWithContext(ctx context.Context) (allItems []VPC, err error) { for pager.HasNext() { var nextPage []VPC nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VpcsPager) GetNext() (page []VPC, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VpcsPager) GetAll() (allItems []VPC, err error) { return pager.GetAllWithContext(context.Background()) } // VPCAddressPrefixesPager can be used to simplify the use of the "ListVPCAddressPrefixes" method. type VPCAddressPrefixesPager struct { hasNext bool options *ListVPCAddressPrefixesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPCAddressPrefixesPager returns a new VPCAddressPrefixesPager instance. func (vpcbeta *VpcbetaV1) NewVPCAddressPrefixesPager(options *ListVPCAddressPrefixesOptions) (pager *VPCAddressPrefixesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPCAddressPrefixesOptions = *options pager = &VPCAddressPrefixesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPCAddressPrefixesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPCAddressPrefixesPager) GetNextWithContext(ctx context.Context) (page []AddressPrefix, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPCAddressPrefixesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.AddressPrefixes return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPCAddressPrefixesPager) GetAllWithContext(ctx context.Context) (allItems []AddressPrefix, err error) { for pager.HasNext() { var nextPage []AddressPrefix nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCAddressPrefixesPager) GetNext() (page []AddressPrefix, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCAddressPrefixesPager) GetAll() (allItems []AddressPrefix, err error) { return pager.GetAllWithContext(context.Background()) } // VPCRoutesPager can be used to simplify the use of the "ListVPCRoutes" method. type VPCRoutesPager struct { hasNext bool options *ListVPCRoutesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPCRoutesPager returns a new VPCRoutesPager instance. func (vpcbeta *VpcbetaV1) NewVPCRoutesPager(options *ListVPCRoutesOptions) (pager *VPCRoutesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPCRoutesOptions = *options pager = &VPCRoutesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPCRoutesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPCRoutesPager) GetNextWithContext(ctx context.Context) (page []RouteCollectionVPCContextRoutesItem, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPCRoutesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Routes return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPCRoutesPager) GetAllWithContext(ctx context.Context) (allItems []RouteCollectionVPCContextRoutesItem, err error) { for pager.HasNext() { var nextPage []RouteCollectionVPCContextRoutesItem nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutesPager) GetNext() (page []RouteCollectionVPCContextRoutesItem, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutesPager) GetAll() (allItems []RouteCollectionVPCContextRoutesItem, err error) { return pager.GetAllWithContext(context.Background()) } // VPCRoutingTablesPager can be used to simplify the use of the "ListVPCRoutingTables" method. type VPCRoutingTablesPager struct { hasNext bool options *ListVPCRoutingTablesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPCRoutingTablesPager returns a new VPCRoutingTablesPager instance. func (vpcbeta *VpcbetaV1) NewVPCRoutingTablesPager(options *ListVPCRoutingTablesOptions) (pager *VPCRoutingTablesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPCRoutingTablesOptions = *options pager = &VPCRoutingTablesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPCRoutingTablesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPCRoutingTablesPager) GetNextWithContext(ctx context.Context) (page []RoutingTable, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPCRoutingTablesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.RoutingTables return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPCRoutingTablesPager) GetAllWithContext(ctx context.Context) (allItems []RoutingTable, err error) { for pager.HasNext() { var nextPage []RoutingTable nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTablesPager) GetNext() (page []RoutingTable, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTablesPager) GetAll() (allItems []RoutingTable, err error) { return pager.GetAllWithContext(context.Background()) } // VPCRoutingTableRoutesPager can be used to simplify the use of the "ListVPCRoutingTableRoutes" method. type VPCRoutingTableRoutesPager struct { hasNext bool options *ListVPCRoutingTableRoutesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPCRoutingTableRoutesPager returns a new VPCRoutingTableRoutesPager instance. func (vpcbeta *VpcbetaV1) NewVPCRoutingTableRoutesPager(options *ListVPCRoutingTableRoutesOptions) (pager *VPCRoutingTableRoutesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPCRoutingTableRoutesOptions = *options pager = &VPCRoutingTableRoutesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPCRoutingTableRoutesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPCRoutingTableRoutesPager) GetNextWithContext(ctx context.Context) (page []Route, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPCRoutingTableRoutesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Routes return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPCRoutingTableRoutesPager) GetAllWithContext(ctx context.Context) (allItems []Route, err error) { for pager.HasNext() { var nextPage []Route nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTableRoutesPager) GetNext() (page []Route, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPCRoutingTableRoutesPager) GetAll() (allItems []Route, err error) { return pager.GetAllWithContext(context.Background()) } // SubnetsPager can be used to simplify the use of the "ListSubnets" method. type SubnetsPager struct { hasNext bool options *ListSubnetsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewSubnetsPager returns a new SubnetsPager instance. func (vpcbeta *VpcbetaV1) NewSubnetsPager(options *ListSubnetsOptions) (pager *SubnetsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListSubnetsOptions = *options pager = &SubnetsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *SubnetsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *SubnetsPager) GetNextWithContext(ctx context.Context) (page []Subnet, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListSubnetsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Subnets return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *SubnetsPager) GetAllWithContext(ctx context.Context) (allItems []Subnet, err error) { for pager.HasNext() { var nextPage []Subnet nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SubnetsPager) GetNext() (page []Subnet, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SubnetsPager) GetAll() (allItems []Subnet, err error) { return pager.GetAllWithContext(context.Background()) } // SubnetReservedIpsPager can be used to simplify the use of the "ListSubnetReservedIps" method. type SubnetReservedIpsPager struct { hasNext bool options *ListSubnetReservedIpsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewSubnetReservedIpsPager returns a new SubnetReservedIpsPager instance. func (vpcbeta *VpcbetaV1) NewSubnetReservedIpsPager(options *ListSubnetReservedIpsOptions) (pager *SubnetReservedIpsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListSubnetReservedIpsOptions = *options pager = &SubnetReservedIpsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *SubnetReservedIpsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *SubnetReservedIpsPager) GetNextWithContext(ctx context.Context) (page []ReservedIP, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListSubnetReservedIpsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.ReservedIps return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *SubnetReservedIpsPager) GetAllWithContext(ctx context.Context) (allItems []ReservedIP, err error) { for pager.HasNext() { var nextPage []ReservedIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SubnetReservedIpsPager) GetNext() (page []ReservedIP, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SubnetReservedIpsPager) GetAll() (allItems []ReservedIP, err error) { return pager.GetAllWithContext(context.Background()) } // ImagesPager can be used to simplify the use of the "ListImages" method. type ImagesPager struct { hasNext bool options *ListImagesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewImagesPager returns a new ImagesPager instance. func (vpcbeta *VpcbetaV1) NewImagesPager(options *ListImagesOptions) (pager *ImagesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListImagesOptions = *options pager = &ImagesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *ImagesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *ImagesPager) GetNextWithContext(ctx context.Context) (page []Image, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListImagesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Images return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *ImagesPager) GetAllWithContext(ctx context.Context) (allItems []Image, err error) { for pager.HasNext() { var nextPage []Image nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ImagesPager) GetNext() (page []Image, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ImagesPager) GetAll() (allItems []Image, err error) { return pager.GetAllWithContext(context.Background()) } // OperatingSystemsPager can be used to simplify the use of the "ListOperatingSystems" method. type OperatingSystemsPager struct { hasNext bool options *ListOperatingSystemsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewOperatingSystemsPager returns a new OperatingSystemsPager instance. func (vpcbeta *VpcbetaV1) NewOperatingSystemsPager(options *ListOperatingSystemsOptions) (pager *OperatingSystemsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListOperatingSystemsOptions = *options pager = &OperatingSystemsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *OperatingSystemsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *OperatingSystemsPager) GetNextWithContext(ctx context.Context) (page []OperatingSystem, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListOperatingSystemsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.OperatingSystems return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *OperatingSystemsPager) GetAllWithContext(ctx context.Context) (allItems []OperatingSystem, err error) { for pager.HasNext() { var nextPage []OperatingSystem nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *OperatingSystemsPager) GetNext() (page []OperatingSystem, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *OperatingSystemsPager) GetAll() (allItems []OperatingSystem, err error) { return pager.GetAllWithContext(context.Background()) } // KeysPager can be used to simplify the use of the "ListKeys" method. type KeysPager struct { hasNext bool options *ListKeysOptions client *VpcbetaV1 pageContext struct { next *string } } // NewKeysPager returns a new KeysPager instance. func (vpcbeta *VpcbetaV1) NewKeysPager(options *ListKeysOptions) (pager *KeysPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListKeysOptions = *options pager = &KeysPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *KeysPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *KeysPager) GetNextWithContext(ctx context.Context) (page []Key, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListKeysWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Keys return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *KeysPager) GetAllWithContext(ctx context.Context) (allItems []Key, err error) { for pager.HasNext() { var nextPage []Key nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *KeysPager) GetNext() (page []Key, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *KeysPager) GetAll() (allItems []Key, err error) { return pager.GetAllWithContext(context.Background()) } // InstancesPager can be used to simplify the use of the "ListInstances" method. type InstancesPager struct { hasNext bool options *ListInstancesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstancesPager returns a new InstancesPager instance. func (vpcbeta *VpcbetaV1) NewInstancesPager(options *ListInstancesOptions) (pager *InstancesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstancesOptions = *options pager = &InstancesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstancesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstancesPager) GetNextWithContext(ctx context.Context) (page []Instance, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstancesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Instances return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstancesPager) GetAllWithContext(ctx context.Context) (allItems []Instance, err error) { for pager.HasNext() { var nextPage []Instance nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstancesPager) GetNext() (page []Instance, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstancesPager) GetAll() (allItems []Instance, err error) { return pager.GetAllWithContext(context.Background()) } // InstanceNetworkInterfaceIpsPager can be used to simplify the use of the "ListInstanceNetworkInterfaceIps" method. type InstanceNetworkInterfaceIpsPager struct { hasNext bool options *ListInstanceNetworkInterfaceIpsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstanceNetworkInterfaceIpsPager returns a new InstanceNetworkInterfaceIpsPager instance. func (vpcbeta *VpcbetaV1) NewInstanceNetworkInterfaceIpsPager(options *ListInstanceNetworkInterfaceIpsOptions) (pager *InstanceNetworkInterfaceIpsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstanceNetworkInterfaceIpsOptions = *options pager = &InstanceNetworkInterfaceIpsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstanceNetworkInterfaceIpsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstanceNetworkInterfaceIpsPager) GetNextWithContext(ctx context.Context) (page []ReservedIP, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstanceNetworkInterfaceIpsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Ips return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstanceNetworkInterfaceIpsPager) GetAllWithContext(ctx context.Context) (allItems []ReservedIP, err error) { for pager.HasNext() { var nextPage []ReservedIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceNetworkInterfaceIpsPager) GetNext() (page []ReservedIP, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceNetworkInterfaceIpsPager) GetAll() (allItems []ReservedIP, err error) { return pager.GetAllWithContext(context.Background()) } // InstanceGroupsPager can be used to simplify the use of the "ListInstanceGroups" method. type InstanceGroupsPager struct { hasNext bool options *ListInstanceGroupsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstanceGroupsPager returns a new InstanceGroupsPager instance. func (vpcbeta *VpcbetaV1) NewInstanceGroupsPager(options *ListInstanceGroupsOptions) (pager *InstanceGroupsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstanceGroupsOptions = *options pager = &InstanceGroupsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstanceGroupsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstanceGroupsPager) GetNextWithContext(ctx context.Context) (page []InstanceGroup, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstanceGroupsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.InstanceGroups return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstanceGroupsPager) GetAllWithContext(ctx context.Context) (allItems []InstanceGroup, err error) { for pager.HasNext() { var nextPage []InstanceGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupsPager) GetNext() (page []InstanceGroup, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupsPager) GetAll() (allItems []InstanceGroup, err error) { return pager.GetAllWithContext(context.Background()) } // InstanceGroupManagersPager can be used to simplify the use of the "ListInstanceGroupManagers" method. type InstanceGroupManagersPager struct { hasNext bool options *ListInstanceGroupManagersOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstanceGroupManagersPager returns a new InstanceGroupManagersPager instance. func (vpcbeta *VpcbetaV1) NewInstanceGroupManagersPager(options *ListInstanceGroupManagersOptions) (pager *InstanceGroupManagersPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstanceGroupManagersOptions = *options pager = &InstanceGroupManagersPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstanceGroupManagersPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstanceGroupManagersPager) GetNextWithContext(ctx context.Context) (page []InstanceGroupManagerIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstanceGroupManagersWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Managers return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstanceGroupManagersPager) GetAllWithContext(ctx context.Context) (allItems []InstanceGroupManagerIntf, err error) { for pager.HasNext() { var nextPage []InstanceGroupManagerIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagersPager) GetNext() (page []InstanceGroupManagerIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagersPager) GetAll() (allItems []InstanceGroupManagerIntf, err error) { return pager.GetAllWithContext(context.Background()) } // InstanceGroupManagerActionsPager can be used to simplify the use of the "ListInstanceGroupManagerActions" method. type InstanceGroupManagerActionsPager struct { hasNext bool options *ListInstanceGroupManagerActionsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstanceGroupManagerActionsPager returns a new InstanceGroupManagerActionsPager instance. func (vpcbeta *VpcbetaV1) NewInstanceGroupManagerActionsPager(options *ListInstanceGroupManagerActionsOptions) (pager *InstanceGroupManagerActionsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstanceGroupManagerActionsOptions = *options pager = &InstanceGroupManagerActionsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstanceGroupManagerActionsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstanceGroupManagerActionsPager) GetNextWithContext(ctx context.Context) (page []InstanceGroupManagerActionIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstanceGroupManagerActionsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Actions return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstanceGroupManagerActionsPager) GetAllWithContext(ctx context.Context) (allItems []InstanceGroupManagerActionIntf, err error) { for pager.HasNext() { var nextPage []InstanceGroupManagerActionIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerActionsPager) GetNext() (page []InstanceGroupManagerActionIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerActionsPager) GetAll() (allItems []InstanceGroupManagerActionIntf, err error) { return pager.GetAllWithContext(context.Background()) } // InstanceGroupManagerPoliciesPager can be used to simplify the use of the "ListInstanceGroupManagerPolicies" method. type InstanceGroupManagerPoliciesPager struct { hasNext bool options *ListInstanceGroupManagerPoliciesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstanceGroupManagerPoliciesPager returns a new InstanceGroupManagerPoliciesPager instance. func (vpcbeta *VpcbetaV1) NewInstanceGroupManagerPoliciesPager(options *ListInstanceGroupManagerPoliciesOptions) (pager *InstanceGroupManagerPoliciesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstanceGroupManagerPoliciesOptions = *options pager = &InstanceGroupManagerPoliciesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstanceGroupManagerPoliciesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstanceGroupManagerPoliciesPager) GetNextWithContext(ctx context.Context) (page []InstanceGroupManagerPolicyIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstanceGroupManagerPoliciesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Policies return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstanceGroupManagerPoliciesPager) GetAllWithContext(ctx context.Context) (allItems []InstanceGroupManagerPolicyIntf, err error) { for pager.HasNext() { var nextPage []InstanceGroupManagerPolicyIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerPoliciesPager) GetNext() (page []InstanceGroupManagerPolicyIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupManagerPoliciesPager) GetAll() (allItems []InstanceGroupManagerPolicyIntf, err error) { return pager.GetAllWithContext(context.Background()) } // InstanceGroupMembershipsPager can be used to simplify the use of the "ListInstanceGroupMemberships" method. type InstanceGroupMembershipsPager struct { hasNext bool options *ListInstanceGroupMembershipsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewInstanceGroupMembershipsPager returns a new InstanceGroupMembershipsPager instance. func (vpcbeta *VpcbetaV1) NewInstanceGroupMembershipsPager(options *ListInstanceGroupMembershipsOptions) (pager *InstanceGroupMembershipsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListInstanceGroupMembershipsOptions = *options pager = &InstanceGroupMembershipsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *InstanceGroupMembershipsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *InstanceGroupMembershipsPager) GetNextWithContext(ctx context.Context) (page []InstanceGroupMembership, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListInstanceGroupMembershipsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Memberships return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *InstanceGroupMembershipsPager) GetAllWithContext(ctx context.Context) (allItems []InstanceGroupMembership, err error) { for pager.HasNext() { var nextPage []InstanceGroupMembership nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupMembershipsPager) GetNext() (page []InstanceGroupMembership, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *InstanceGroupMembershipsPager) GetAll() (allItems []InstanceGroupMembership, err error) { return pager.GetAllWithContext(context.Background()) } // DedicatedHostGroupsPager can be used to simplify the use of the "ListDedicatedHostGroups" method. type DedicatedHostGroupsPager struct { hasNext bool options *ListDedicatedHostGroupsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewDedicatedHostGroupsPager returns a new DedicatedHostGroupsPager instance. func (vpcbeta *VpcbetaV1) NewDedicatedHostGroupsPager(options *ListDedicatedHostGroupsOptions) (pager *DedicatedHostGroupsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListDedicatedHostGroupsOptions = *options pager = &DedicatedHostGroupsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *DedicatedHostGroupsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *DedicatedHostGroupsPager) GetNextWithContext(ctx context.Context) (page []DedicatedHostGroup, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListDedicatedHostGroupsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Groups return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *DedicatedHostGroupsPager) GetAllWithContext(ctx context.Context) (allItems []DedicatedHostGroup, err error) { for pager.HasNext() { var nextPage []DedicatedHostGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostGroupsPager) GetNext() (page []DedicatedHostGroup, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostGroupsPager) GetAll() (allItems []DedicatedHostGroup, err error) { return pager.GetAllWithContext(context.Background()) } // DedicatedHostProfilesPager can be used to simplify the use of the "ListDedicatedHostProfiles" method. type DedicatedHostProfilesPager struct { hasNext bool options *ListDedicatedHostProfilesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewDedicatedHostProfilesPager returns a new DedicatedHostProfilesPager instance. func (vpcbeta *VpcbetaV1) NewDedicatedHostProfilesPager(options *ListDedicatedHostProfilesOptions) (pager *DedicatedHostProfilesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListDedicatedHostProfilesOptions = *options pager = &DedicatedHostProfilesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *DedicatedHostProfilesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *DedicatedHostProfilesPager) GetNextWithContext(ctx context.Context) (page []DedicatedHostProfile, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListDedicatedHostProfilesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Profiles return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *DedicatedHostProfilesPager) GetAllWithContext(ctx context.Context) (allItems []DedicatedHostProfile, err error) { for pager.HasNext() { var nextPage []DedicatedHostProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostProfilesPager) GetNext() (page []DedicatedHostProfile, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostProfilesPager) GetAll() (allItems []DedicatedHostProfile, err error) { return pager.GetAllWithContext(context.Background()) } // DedicatedHostsPager can be used to simplify the use of the "ListDedicatedHosts" method. type DedicatedHostsPager struct { hasNext bool options *ListDedicatedHostsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewDedicatedHostsPager returns a new DedicatedHostsPager instance. func (vpcbeta *VpcbetaV1) NewDedicatedHostsPager(options *ListDedicatedHostsOptions) (pager *DedicatedHostsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListDedicatedHostsOptions = *options pager = &DedicatedHostsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *DedicatedHostsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *DedicatedHostsPager) GetNextWithContext(ctx context.Context) (page []DedicatedHost, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListDedicatedHostsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.DedicatedHosts return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *DedicatedHostsPager) GetAllWithContext(ctx context.Context) (allItems []DedicatedHost, err error) { for pager.HasNext() { var nextPage []DedicatedHost nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostsPager) GetNext() (page []DedicatedHost, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *DedicatedHostsPager) GetAll() (allItems []DedicatedHost, err error) { return pager.GetAllWithContext(context.Background()) } // BackupPoliciesPager can be used to simplify the use of the "ListBackupPolicies" method. type BackupPoliciesPager struct { hasNext bool options *ListBackupPoliciesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewBackupPoliciesPager returns a new BackupPoliciesPager instance. func (vpcbeta *VpcbetaV1) NewBackupPoliciesPager(options *ListBackupPoliciesOptions) (pager *BackupPoliciesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListBackupPoliciesOptions = *options pager = &BackupPoliciesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *BackupPoliciesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *BackupPoliciesPager) GetNextWithContext(ctx context.Context) (page []BackupPolicy, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListBackupPoliciesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.BackupPolicies return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *BackupPoliciesPager) GetAllWithContext(ctx context.Context) (allItems []BackupPolicy, err error) { for pager.HasNext() { var nextPage []BackupPolicy nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BackupPoliciesPager) GetNext() (page []BackupPolicy, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BackupPoliciesPager) GetAll() (allItems []BackupPolicy, err error) { return pager.GetAllWithContext(context.Background()) } // BackupPolicyJobsPager can be used to simplify the use of the "ListBackupPolicyJobs" method. type BackupPolicyJobsPager struct { hasNext bool options *ListBackupPolicyJobsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewBackupPolicyJobsPager returns a new BackupPolicyJobsPager instance. func (vpcbeta *VpcbetaV1) NewBackupPolicyJobsPager(options *ListBackupPolicyJobsOptions) (pager *BackupPolicyJobsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListBackupPolicyJobsOptions = *options pager = &BackupPolicyJobsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *BackupPolicyJobsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *BackupPolicyJobsPager) GetNextWithContext(ctx context.Context) (page []BackupPolicyJob, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListBackupPolicyJobsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Jobs return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *BackupPolicyJobsPager) GetAllWithContext(ctx context.Context) (allItems []BackupPolicyJob, err error) { for pager.HasNext() { var nextPage []BackupPolicyJob nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BackupPolicyJobsPager) GetNext() (page []BackupPolicyJob, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BackupPolicyJobsPager) GetAll() (allItems []BackupPolicyJob, err error) { return pager.GetAllWithContext(context.Background()) } // PlacementGroupsPager can be used to simplify the use of the "ListPlacementGroups" method. type PlacementGroupsPager struct { hasNext bool options *ListPlacementGroupsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewPlacementGroupsPager returns a new PlacementGroupsPager instance. func (vpcbeta *VpcbetaV1) NewPlacementGroupsPager(options *ListPlacementGroupsOptions) (pager *PlacementGroupsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListPlacementGroupsOptions = *options pager = &PlacementGroupsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *PlacementGroupsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *PlacementGroupsPager) GetNextWithContext(ctx context.Context) (page []PlacementGroup, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListPlacementGroupsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.PlacementGroups return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *PlacementGroupsPager) GetAllWithContext(ctx context.Context) (allItems []PlacementGroup, err error) { for pager.HasNext() { var nextPage []PlacementGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *PlacementGroupsPager) GetNext() (page []PlacementGroup, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *PlacementGroupsPager) GetAll() (allItems []PlacementGroup, err error) { return pager.GetAllWithContext(context.Background()) } // BareMetalServerProfilesPager can be used to simplify the use of the "ListBareMetalServerProfiles" method. type BareMetalServerProfilesPager struct { hasNext bool options *ListBareMetalServerProfilesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewBareMetalServerProfilesPager returns a new BareMetalServerProfilesPager instance. func (vpcbeta *VpcbetaV1) NewBareMetalServerProfilesPager(options *ListBareMetalServerProfilesOptions) (pager *BareMetalServerProfilesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListBareMetalServerProfilesOptions = *options pager = &BareMetalServerProfilesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *BareMetalServerProfilesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *BareMetalServerProfilesPager) GetNextWithContext(ctx context.Context) (page []BareMetalServerProfile, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListBareMetalServerProfilesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Profiles return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *BareMetalServerProfilesPager) GetAllWithContext(ctx context.Context) (allItems []BareMetalServerProfile, err error) { for pager.HasNext() { var nextPage []BareMetalServerProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerProfilesPager) GetNext() (page []BareMetalServerProfile, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerProfilesPager) GetAll() (allItems []BareMetalServerProfile, err error) { return pager.GetAllWithContext(context.Background()) } // BareMetalServersPager can be used to simplify the use of the "ListBareMetalServers" method. type BareMetalServersPager struct { hasNext bool options *ListBareMetalServersOptions client *VpcbetaV1 pageContext struct { next *string } } // NewBareMetalServersPager returns a new BareMetalServersPager instance. func (vpcbeta *VpcbetaV1) NewBareMetalServersPager(options *ListBareMetalServersOptions) (pager *BareMetalServersPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListBareMetalServersOptions = *options pager = &BareMetalServersPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *BareMetalServersPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *BareMetalServersPager) GetNextWithContext(ctx context.Context) (page []BareMetalServer, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListBareMetalServersWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.BareMetalServers return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *BareMetalServersPager) GetAllWithContext(ctx context.Context) (allItems []BareMetalServer, err error) { for pager.HasNext() { var nextPage []BareMetalServer nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServersPager) GetNext() (page []BareMetalServer, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServersPager) GetAll() (allItems []BareMetalServer, err error) { return pager.GetAllWithContext(context.Background()) } // BareMetalServerNetworkInterfacesPager can be used to simplify the use of the "ListBareMetalServerNetworkInterfaces" method. type BareMetalServerNetworkInterfacesPager struct { hasNext bool options *ListBareMetalServerNetworkInterfacesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewBareMetalServerNetworkInterfacesPager returns a new BareMetalServerNetworkInterfacesPager instance. func (vpcbeta *VpcbetaV1) NewBareMetalServerNetworkInterfacesPager(options *ListBareMetalServerNetworkInterfacesOptions) (pager *BareMetalServerNetworkInterfacesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListBareMetalServerNetworkInterfacesOptions = *options pager = &BareMetalServerNetworkInterfacesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *BareMetalServerNetworkInterfacesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *BareMetalServerNetworkInterfacesPager) GetNextWithContext(ctx context.Context) (page []BareMetalServerNetworkInterfaceIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListBareMetalServerNetworkInterfacesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.NetworkInterfaces return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *BareMetalServerNetworkInterfacesPager) GetAllWithContext(ctx context.Context) (allItems []BareMetalServerNetworkInterfaceIntf, err error) { for pager.HasNext() { var nextPage []BareMetalServerNetworkInterfaceIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerNetworkInterfacesPager) GetNext() (page []BareMetalServerNetworkInterfaceIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *BareMetalServerNetworkInterfacesPager) GetAll() (allItems []BareMetalServerNetworkInterfaceIntf, err error) { return pager.GetAllWithContext(context.Background()) } // VolumeProfilesPager can be used to simplify the use of the "ListVolumeProfiles" method. type VolumeProfilesPager struct { hasNext bool options *ListVolumeProfilesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVolumeProfilesPager returns a new VolumeProfilesPager instance. func (vpcbeta *VpcbetaV1) NewVolumeProfilesPager(options *ListVolumeProfilesOptions) (pager *VolumeProfilesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVolumeProfilesOptions = *options pager = &VolumeProfilesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VolumeProfilesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VolumeProfilesPager) GetNextWithContext(ctx context.Context) (page []VolumeProfile, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVolumeProfilesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Profiles return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VolumeProfilesPager) GetAllWithContext(ctx context.Context) (allItems []VolumeProfile, err error) { for pager.HasNext() { var nextPage []VolumeProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VolumeProfilesPager) GetNext() (page []VolumeProfile, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VolumeProfilesPager) GetAll() (allItems []VolumeProfile, err error) { return pager.GetAllWithContext(context.Background()) } // VolumesPager can be used to simplify the use of the "ListVolumes" method. type VolumesPager struct { hasNext bool options *ListVolumesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVolumesPager returns a new VolumesPager instance. func (vpcbeta *VpcbetaV1) NewVolumesPager(options *ListVolumesOptions) (pager *VolumesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVolumesOptions = *options pager = &VolumesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VolumesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VolumesPager) GetNextWithContext(ctx context.Context) (page []Volume, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVolumesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Volumes return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VolumesPager) GetAllWithContext(ctx context.Context) (allItems []Volume, err error) { for pager.HasNext() { var nextPage []Volume nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VolumesPager) GetNext() (page []Volume, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VolumesPager) GetAll() (allItems []Volume, err error) { return pager.GetAllWithContext(context.Background()) } // SnapshotsPager can be used to simplify the use of the "ListSnapshots" method. type SnapshotsPager struct { hasNext bool options *ListSnapshotsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewSnapshotsPager returns a new SnapshotsPager instance. func (vpcbeta *VpcbetaV1) NewSnapshotsPager(options *ListSnapshotsOptions) (pager *SnapshotsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListSnapshotsOptions = *options pager = &SnapshotsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *SnapshotsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *SnapshotsPager) GetNextWithContext(ctx context.Context) (page []Snapshot, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListSnapshotsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Snapshots return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *SnapshotsPager) GetAllWithContext(ctx context.Context) (allItems []Snapshot, err error) { for pager.HasNext() { var nextPage []Snapshot nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SnapshotsPager) GetNext() (page []Snapshot, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SnapshotsPager) GetAll() (allItems []Snapshot, err error) { return pager.GetAllWithContext(context.Background()) } // ShareProfilesPager can be used to simplify the use of the "ListShareProfiles" method. type ShareProfilesPager struct { hasNext bool options *ListShareProfilesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewShareProfilesPager returns a new ShareProfilesPager instance. func (vpcbeta *VpcbetaV1) NewShareProfilesPager(options *ListShareProfilesOptions) (pager *ShareProfilesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListShareProfilesOptions = *options pager = &ShareProfilesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *ShareProfilesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *ShareProfilesPager) GetNextWithContext(ctx context.Context) (page []ShareProfile, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListShareProfilesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Profiles return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *ShareProfilesPager) GetAllWithContext(ctx context.Context) (allItems []ShareProfile, err error) { for pager.HasNext() { var nextPage []ShareProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ShareProfilesPager) GetNext() (page []ShareProfile, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ShareProfilesPager) GetAll() (allItems []ShareProfile, err error) { return pager.GetAllWithContext(context.Background()) } // SharesPager can be used to simplify the use of the "ListShares" method. type SharesPager struct { hasNext bool options *ListSharesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewSharesPager returns a new SharesPager instance. func (vpcbeta *VpcbetaV1) NewSharesPager(options *ListSharesOptions) (pager *SharesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListSharesOptions = *options pager = &SharesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *SharesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *SharesPager) GetNextWithContext(ctx context.Context) (page []Share, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListSharesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Shares return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *SharesPager) GetAllWithContext(ctx context.Context) (allItems []Share, err error) { for pager.HasNext() { var nextPage []Share nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SharesPager) GetNext() (page []Share, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SharesPager) GetAll() (allItems []Share, err error) { return pager.GetAllWithContext(context.Background()) } // ShareMountTargetsPager can be used to simplify the use of the "ListShareMountTargets" method. type ShareMountTargetsPager struct { hasNext bool options *ListShareMountTargetsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewShareMountTargetsPager returns a new ShareMountTargetsPager instance. func (vpcbeta *VpcbetaV1) NewShareMountTargetsPager(options *ListShareMountTargetsOptions) (pager *ShareMountTargetsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListShareMountTargetsOptions = *options pager = &ShareMountTargetsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *ShareMountTargetsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *ShareMountTargetsPager) GetNextWithContext(ctx context.Context) (page []ShareMountTarget, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListShareMountTargetsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.MountTargets return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *ShareMountTargetsPager) GetAllWithContext(ctx context.Context) (allItems []ShareMountTarget, err error) { for pager.HasNext() { var nextPage []ShareMountTarget nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *ShareMountTargetsPager) GetNext() (page []ShareMountTarget, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *ShareMountTargetsPager) GetAll() (allItems []ShareMountTarget, err error) { return pager.GetAllWithContext(context.Background()) } // VirtualNetworkInterfacesPager can be used to simplify the use of the "ListVirtualNetworkInterfaces" method. type VirtualNetworkInterfacesPager struct { hasNext bool options *ListVirtualNetworkInterfacesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVirtualNetworkInterfacesPager returns a new VirtualNetworkInterfacesPager instance. func (vpcbeta *VpcbetaV1) NewVirtualNetworkInterfacesPager(options *ListVirtualNetworkInterfacesOptions) (pager *VirtualNetworkInterfacesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVirtualNetworkInterfacesOptions = *options pager = &VirtualNetworkInterfacesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VirtualNetworkInterfacesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VirtualNetworkInterfacesPager) GetNextWithContext(ctx context.Context) (page []VirtualNetworkInterface, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVirtualNetworkInterfacesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.VirtualNetworkInterfaces return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VirtualNetworkInterfacesPager) GetAllWithContext(ctx context.Context) (allItems []VirtualNetworkInterface, err error) { for pager.HasNext() { var nextPage []VirtualNetworkInterface nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VirtualNetworkInterfacesPager) GetNext() (page []VirtualNetworkInterface, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VirtualNetworkInterfacesPager) GetAll() (allItems []VirtualNetworkInterface, err error) { return pager.GetAllWithContext(context.Background()) } // PublicGatewaysPager can be used to simplify the use of the "ListPublicGateways" method. type PublicGatewaysPager struct { hasNext bool options *ListPublicGatewaysOptions client *VpcbetaV1 pageContext struct { next *string } } // NewPublicGatewaysPager returns a new PublicGatewaysPager instance. func (vpcbeta *VpcbetaV1) NewPublicGatewaysPager(options *ListPublicGatewaysOptions) (pager *PublicGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListPublicGatewaysOptions = *options pager = &PublicGatewaysPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *PublicGatewaysPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *PublicGatewaysPager) GetNextWithContext(ctx context.Context) (page []PublicGateway, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListPublicGatewaysWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.PublicGateways return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *PublicGatewaysPager) GetAllWithContext(ctx context.Context) (allItems []PublicGateway, err error) { for pager.HasNext() { var nextPage []PublicGateway nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *PublicGatewaysPager) GetNext() (page []PublicGateway, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *PublicGatewaysPager) GetAll() (allItems []PublicGateway, err error) { return pager.GetAllWithContext(context.Background()) } // FloatingIpsPager can be used to simplify the use of the "ListFloatingIps" method. type FloatingIpsPager struct { hasNext bool options *ListFloatingIpsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewFloatingIpsPager returns a new FloatingIpsPager instance. func (vpcbeta *VpcbetaV1) NewFloatingIpsPager(options *ListFloatingIpsOptions) (pager *FloatingIpsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListFloatingIpsOptions = *options pager = &FloatingIpsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *FloatingIpsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *FloatingIpsPager) GetNextWithContext(ctx context.Context) (page []FloatingIP, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListFloatingIpsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.FloatingIps return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *FloatingIpsPager) GetAllWithContext(ctx context.Context) (allItems []FloatingIP, err error) { for pager.HasNext() { var nextPage []FloatingIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *FloatingIpsPager) GetNext() (page []FloatingIP, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *FloatingIpsPager) GetAll() (allItems []FloatingIP, err error) { return pager.GetAllWithContext(context.Background()) } // NetworkAclsPager can be used to simplify the use of the "ListNetworkAcls" method. type NetworkAclsPager struct { hasNext bool options *ListNetworkAclsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewNetworkAclsPager returns a new NetworkAclsPager instance. func (vpcbeta *VpcbetaV1) NewNetworkAclsPager(options *ListNetworkAclsOptions) (pager *NetworkAclsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListNetworkAclsOptions = *options pager = &NetworkAclsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *NetworkAclsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *NetworkAclsPager) GetNextWithContext(ctx context.Context) (page []NetworkACL, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListNetworkAclsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.NetworkAcls return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *NetworkAclsPager) GetAllWithContext(ctx context.Context) (allItems []NetworkACL, err error) { for pager.HasNext() { var nextPage []NetworkACL nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *NetworkAclsPager) GetNext() (page []NetworkACL, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *NetworkAclsPager) GetAll() (allItems []NetworkACL, err error) { return pager.GetAllWithContext(context.Background()) } // NetworkACLRulesPager can be used to simplify the use of the "ListNetworkACLRules" method. type NetworkACLRulesPager struct { hasNext bool options *ListNetworkACLRulesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewNetworkACLRulesPager returns a new NetworkACLRulesPager instance. func (vpcbeta *VpcbetaV1) NewNetworkACLRulesPager(options *ListNetworkACLRulesOptions) (pager *NetworkACLRulesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListNetworkACLRulesOptions = *options pager = &NetworkACLRulesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *NetworkACLRulesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *NetworkACLRulesPager) GetNextWithContext(ctx context.Context) (page []NetworkACLRuleItemIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListNetworkACLRulesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Rules return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *NetworkACLRulesPager) GetAllWithContext(ctx context.Context) (allItems []NetworkACLRuleItemIntf, err error) { for pager.HasNext() { var nextPage []NetworkACLRuleItemIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *NetworkACLRulesPager) GetNext() (page []NetworkACLRuleItemIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *NetworkACLRulesPager) GetAll() (allItems []NetworkACLRuleItemIntf, err error) { return pager.GetAllWithContext(context.Background()) } // SecurityGroupsPager can be used to simplify the use of the "ListSecurityGroups" method. type SecurityGroupsPager struct { hasNext bool options *ListSecurityGroupsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewSecurityGroupsPager returns a new SecurityGroupsPager instance. func (vpcbeta *VpcbetaV1) NewSecurityGroupsPager(options *ListSecurityGroupsOptions) (pager *SecurityGroupsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListSecurityGroupsOptions = *options pager = &SecurityGroupsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *SecurityGroupsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *SecurityGroupsPager) GetNextWithContext(ctx context.Context) (page []SecurityGroup, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListSecurityGroupsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.SecurityGroups return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *SecurityGroupsPager) GetAllWithContext(ctx context.Context) (allItems []SecurityGroup, err error) { for pager.HasNext() { var nextPage []SecurityGroup nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupsPager) GetNext() (page []SecurityGroup, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupsPager) GetAll() (allItems []SecurityGroup, err error) { return pager.GetAllWithContext(context.Background()) } // SecurityGroupTargetsPager can be used to simplify the use of the "ListSecurityGroupTargets" method. type SecurityGroupTargetsPager struct { hasNext bool options *ListSecurityGroupTargetsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewSecurityGroupTargetsPager returns a new SecurityGroupTargetsPager instance. func (vpcbeta *VpcbetaV1) NewSecurityGroupTargetsPager(options *ListSecurityGroupTargetsOptions) (pager *SecurityGroupTargetsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListSecurityGroupTargetsOptions = *options pager = &SecurityGroupTargetsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *SecurityGroupTargetsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *SecurityGroupTargetsPager) GetNextWithContext(ctx context.Context) (page []SecurityGroupTargetReferenceIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListSecurityGroupTargetsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Targets return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *SecurityGroupTargetsPager) GetAllWithContext(ctx context.Context) (allItems []SecurityGroupTargetReferenceIntf, err error) { for pager.HasNext() { var nextPage []SecurityGroupTargetReferenceIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupTargetsPager) GetNext() (page []SecurityGroupTargetReferenceIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *SecurityGroupTargetsPager) GetAll() (allItems []SecurityGroupTargetReferenceIntf, err error) { return pager.GetAllWithContext(context.Background()) } // IkePoliciesPager can be used to simplify the use of the "ListIkePolicies" method. type IkePoliciesPager struct { hasNext bool options *ListIkePoliciesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewIkePoliciesPager returns a new IkePoliciesPager instance. func (vpcbeta *VpcbetaV1) NewIkePoliciesPager(options *ListIkePoliciesOptions) (pager *IkePoliciesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListIkePoliciesOptions = *options pager = &IkePoliciesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *IkePoliciesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *IkePoliciesPager) GetNextWithContext(ctx context.Context) (page []IkePolicy, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListIkePoliciesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.IkePolicies return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *IkePoliciesPager) GetAllWithContext(ctx context.Context) (allItems []IkePolicy, err error) { for pager.HasNext() { var nextPage []IkePolicy nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *IkePoliciesPager) GetNext() (page []IkePolicy, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *IkePoliciesPager) GetAll() (allItems []IkePolicy, err error) { return pager.GetAllWithContext(context.Background()) } // IpsecPoliciesPager can be used to simplify the use of the "ListIpsecPolicies" method. type IpsecPoliciesPager struct { hasNext bool options *ListIpsecPoliciesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewIpsecPoliciesPager returns a new IpsecPoliciesPager instance. func (vpcbeta *VpcbetaV1) NewIpsecPoliciesPager(options *ListIpsecPoliciesOptions) (pager *IpsecPoliciesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListIpsecPoliciesOptions = *options pager = &IpsecPoliciesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *IpsecPoliciesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *IpsecPoliciesPager) GetNextWithContext(ctx context.Context) (page []IPsecPolicy, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListIpsecPoliciesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.IpsecPolicies return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *IpsecPoliciesPager) GetAllWithContext(ctx context.Context) (allItems []IPsecPolicy, err error) { for pager.HasNext() { var nextPage []IPsecPolicy nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *IpsecPoliciesPager) GetNext() (page []IPsecPolicy, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *IpsecPoliciesPager) GetAll() (allItems []IPsecPolicy, err error) { return pager.GetAllWithContext(context.Background()) } // VPNGatewaysPager can be used to simplify the use of the "ListVPNGateways" method. type VPNGatewaysPager struct { hasNext bool options *ListVPNGatewaysOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPNGatewaysPager returns a new VPNGatewaysPager instance. func (vpcbeta *VpcbetaV1) NewVPNGatewaysPager(options *ListVPNGatewaysOptions) (pager *VPNGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPNGatewaysOptions = *options pager = &VPNGatewaysPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPNGatewaysPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPNGatewaysPager) GetNextWithContext(ctx context.Context) (page []VPNGatewayIntf, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPNGatewaysWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.VPNGateways return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPNGatewaysPager) GetAllWithContext(ctx context.Context) (allItems []VPNGatewayIntf, err error) { for pager.HasNext() { var nextPage []VPNGatewayIntf nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNGatewaysPager) GetNext() (page []VPNGatewayIntf, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNGatewaysPager) GetAll() (allItems []VPNGatewayIntf, err error) { return pager.GetAllWithContext(context.Background()) } // VPNServersPager can be used to simplify the use of the "ListVPNServers" method. type VPNServersPager struct { hasNext bool options *ListVPNServersOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPNServersPager returns a new VPNServersPager instance. func (vpcbeta *VpcbetaV1) NewVPNServersPager(options *ListVPNServersOptions) (pager *VPNServersPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPNServersOptions = *options pager = &VPNServersPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPNServersPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPNServersPager) GetNextWithContext(ctx context.Context) (page []VPNServer, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPNServersWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.VPNServers return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPNServersPager) GetAllWithContext(ctx context.Context) (allItems []VPNServer, err error) { for pager.HasNext() { var nextPage []VPNServer nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNServersPager) GetNext() (page []VPNServer, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNServersPager) GetAll() (allItems []VPNServer, err error) { return pager.GetAllWithContext(context.Background()) } // VPNServerClientsPager can be used to simplify the use of the "ListVPNServerClients" method. type VPNServerClientsPager struct { hasNext bool options *ListVPNServerClientsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPNServerClientsPager returns a new VPNServerClientsPager instance. func (vpcbeta *VpcbetaV1) NewVPNServerClientsPager(options *ListVPNServerClientsOptions) (pager *VPNServerClientsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPNServerClientsOptions = *options pager = &VPNServerClientsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPNServerClientsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPNServerClientsPager) GetNextWithContext(ctx context.Context) (page []VPNServerClient, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPNServerClientsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Clients return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPNServerClientsPager) GetAllWithContext(ctx context.Context) (allItems []VPNServerClient, err error) { for pager.HasNext() { var nextPage []VPNServerClient nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNServerClientsPager) GetNext() (page []VPNServerClient, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNServerClientsPager) GetAll() (allItems []VPNServerClient, err error) { return pager.GetAllWithContext(context.Background()) } // VPNServerRoutesPager can be used to simplify the use of the "ListVPNServerRoutes" method. type VPNServerRoutesPager struct { hasNext bool options *ListVPNServerRoutesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewVPNServerRoutesPager returns a new VPNServerRoutesPager instance. func (vpcbeta *VpcbetaV1) NewVPNServerRoutesPager(options *ListVPNServerRoutesOptions) (pager *VPNServerRoutesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListVPNServerRoutesOptions = *options pager = &VPNServerRoutesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *VPNServerRoutesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *VPNServerRoutesPager) GetNextWithContext(ctx context.Context) (page []VPNServerRoute, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListVPNServerRoutesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Routes return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *VPNServerRoutesPager) GetAllWithContext(ctx context.Context) (allItems []VPNServerRoute, err error) { for pager.HasNext() { var nextPage []VPNServerRoute nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *VPNServerRoutesPager) GetNext() (page []VPNServerRoute, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *VPNServerRoutesPager) GetAll() (allItems []VPNServerRoute, err error) { return pager.GetAllWithContext(context.Background()) } // LoadBalancerProfilesPager can be used to simplify the use of the "ListLoadBalancerProfiles" method. type LoadBalancerProfilesPager struct { hasNext bool options *ListLoadBalancerProfilesOptions client *VpcbetaV1 pageContext struct { next *string } } // NewLoadBalancerProfilesPager returns a new LoadBalancerProfilesPager instance. func (vpcbeta *VpcbetaV1) NewLoadBalancerProfilesPager(options *ListLoadBalancerProfilesOptions) (pager *LoadBalancerProfilesPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListLoadBalancerProfilesOptions = *options pager = &LoadBalancerProfilesPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *LoadBalancerProfilesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *LoadBalancerProfilesPager) GetNextWithContext(ctx context.Context) (page []LoadBalancerProfile, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListLoadBalancerProfilesWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Profiles return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *LoadBalancerProfilesPager) GetAllWithContext(ctx context.Context) (allItems []LoadBalancerProfile, err error) { for pager.HasNext() { var nextPage []LoadBalancerProfile nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancerProfilesPager) GetNext() (page []LoadBalancerProfile, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancerProfilesPager) GetAll() (allItems []LoadBalancerProfile, err error) { return pager.GetAllWithContext(context.Background()) } // LoadBalancersPager can be used to simplify the use of the "ListLoadBalancers" method. type LoadBalancersPager struct { hasNext bool options *ListLoadBalancersOptions client *VpcbetaV1 pageContext struct { next *string } } // NewLoadBalancersPager returns a new LoadBalancersPager instance. func (vpcbeta *VpcbetaV1) NewLoadBalancersPager(options *ListLoadBalancersOptions) (pager *LoadBalancersPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListLoadBalancersOptions = *options pager = &LoadBalancersPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *LoadBalancersPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *LoadBalancersPager) GetNextWithContext(ctx context.Context) (page []LoadBalancer, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListLoadBalancersWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.LoadBalancers return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *LoadBalancersPager) GetAllWithContext(ctx context.Context) (allItems []LoadBalancer, err error) { for pager.HasNext() { var nextPage []LoadBalancer nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancersPager) GetNext() (page []LoadBalancer, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *LoadBalancersPager) GetAll() (allItems []LoadBalancer, err error) { return pager.GetAllWithContext(context.Background()) } // EndpointGatewaysPager can be used to simplify the use of the "ListEndpointGateways" method. type EndpointGatewaysPager struct { hasNext bool options *ListEndpointGatewaysOptions client *VpcbetaV1 pageContext struct { next *string } } // NewEndpointGatewaysPager returns a new EndpointGatewaysPager instance. func (vpcbeta *VpcbetaV1) NewEndpointGatewaysPager(options *ListEndpointGatewaysOptions) (pager *EndpointGatewaysPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListEndpointGatewaysOptions = *options pager = &EndpointGatewaysPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *EndpointGatewaysPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *EndpointGatewaysPager) GetNextWithContext(ctx context.Context) (page []EndpointGateway, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListEndpointGatewaysWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.EndpointGateways return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *EndpointGatewaysPager) GetAllWithContext(ctx context.Context) (allItems []EndpointGateway, err error) { for pager.HasNext() { var nextPage []EndpointGateway nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewaysPager) GetNext() (page []EndpointGateway, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewaysPager) GetAll() (allItems []EndpointGateway, err error) { return pager.GetAllWithContext(context.Background()) } // EndpointGatewayIpsPager can be used to simplify the use of the "ListEndpointGatewayIps" method. type EndpointGatewayIpsPager struct { hasNext bool options *ListEndpointGatewayIpsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewEndpointGatewayIpsPager returns a new EndpointGatewayIpsPager instance. func (vpcbeta *VpcbetaV1) NewEndpointGatewayIpsPager(options *ListEndpointGatewayIpsOptions) (pager *EndpointGatewayIpsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListEndpointGatewayIpsOptions = *options pager = &EndpointGatewayIpsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *EndpointGatewayIpsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *EndpointGatewayIpsPager) GetNextWithContext(ctx context.Context) (page []ReservedIP, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListEndpointGatewayIpsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.Ips return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *EndpointGatewayIpsPager) GetAllWithContext(ctx context.Context) (allItems []ReservedIP, err error) { for pager.HasNext() { var nextPage []ReservedIP nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewayIpsPager) GetNext() (page []ReservedIP, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *EndpointGatewayIpsPager) GetAll() (allItems []ReservedIP, err error) { return pager.GetAllWithContext(context.Background()) } // FlowLogCollectorsPager can be used to simplify the use of the "ListFlowLogCollectors" method. type FlowLogCollectorsPager struct { hasNext bool options *ListFlowLogCollectorsOptions client *VpcbetaV1 pageContext struct { next *string } } // NewFlowLogCollectorsPager returns a new FlowLogCollectorsPager instance. func (vpcbeta *VpcbetaV1) NewFlowLogCollectorsPager(options *ListFlowLogCollectorsOptions) (pager *FlowLogCollectorsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } var optionsCopy ListFlowLogCollectorsOptions = *options pager = &FlowLogCollectorsPager{ hasNext: true, options: &optionsCopy, client: vpcbeta, } return } // HasNext returns true if there are potentially more results to be retrieved. func (pager *FlowLogCollectorsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. func (pager *FlowLogCollectorsPager) GetNextWithContext(ctx context.Context) (page []FlowLogCollector, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next result, _, err := pager.client.ListFlowLogCollectorsWithContext(ctx, pager.options) if err != nil { return } var next *string if result.Next != nil { var start *string start, err = core.GetQueryParam(result.Next.Href, "start") if err != nil { err = fmt.Errorf("error retrieving 'start' query parameter from URL '%s': %s", *result.Next.Href, err.Error()) return } next = start } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) page = result.FlowLogCollectors return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. func (pager *FlowLogCollectorsPager) GetAllWithContext(ctx context.Context) (allItems []FlowLogCollector, err error) { for pager.HasNext() { var nextPage []FlowLogCollector nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return } allItems = append(allItems, nextPage...) } return } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. func (pager *FlowLogCollectorsPager) GetNext() (page []FlowLogCollector, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. func (pager *FlowLogCollectorsPager) GetAll() (allItems []FlowLogCollector, err error) { return pager.GetAllWithContext(context.Background()) }