diff --git a/go.mod b/go.mod index 5afd84f..edf387b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/IBM/vpc-go-sdk go 1.14 require ( - github.com/IBM/go-sdk-core/v4 v4.0.4 + github.com/IBM/go-sdk-core/v4 v4.0.6 github.com/go-openapi/strfmt v0.19.5 github.com/onsi/ginkgo v1.13.0 github.com/onsi/gomega v1.10.1 diff --git a/go.sum b/go.sum index 79f9174..b298710 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/IBM/go-sdk-core/v4 v4.0.4 h1:HP5NEwifM9G4RWaUM8ZvvjJ8haGrjRAi4WnPdmTCyak= -github.com/IBM/go-sdk-core/v4 v4.0.4/go.mod h1:lTUXbqIX6/aAbSCkP6q59+dyFsTwZAc0ewRS2vJWVbg= +github.com/IBM/go-sdk-core/v4 v4.0.6 h1:87OcgjuoUpgEZXygcV94C1xUSZ1Iav+RvARZrVwAve8= +github.com/IBM/go-sdk-core/v4 v4.0.6/go.mod h1:lTUXbqIX6/aAbSCkP6q59+dyFsTwZAc0ewRS2vJWVbg= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/vpcclassicv1/vpc_classic_v1.go b/vpcclassicv1/vpc_classic_v1.go index ef85ff8..3915bb1 100644 --- a/vpcclassicv1/vpc_classic_v1.go +++ b/vpcclassicv1/vpc_classic_v1.go @@ -30,7 +30,7 @@ import ( // VpcClassicV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage // infrastructure resources, including virtual server instances, subnets, volumes, and load balancers. // -// Version: 2020-06-02 +// Version: 2020-07-28 type VpcClassicV1 struct { Service *core.BaseService @@ -107,7 +107,7 @@ func NewVpcClassicV1(options *VpcClassicV1Options) (service *VpcClassicV1, err e } if options.Version == nil { - options.Version = core.StringPtr("2020-06-02") + options.Version = core.StringPtr("2020-07-28") } if options.URL != "" { @@ -1254,7 +1254,8 @@ func (vpcClassic *VpcClassicV1) CreateInstance(createInstanceOptions *CreateInst // DeleteInstance : Delete specified instance // This request deletes an instance. This operation cannot be reversed. Any floating IPs associated with the instance's -// network interfaces are implicitly disassociated. +// network interfaces are implicitly disassociated. All flow log collectors with `auto_delete` set to `true` targeting +// the instance and/or the instance's network interfaces are automatically deleted. func (vpcClassic *VpcClassicV1) DeleteInstance(deleteInstanceOptions *DeleteInstanceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceOptions, "deleteInstanceOptions cannot be nil") if err != nil { @@ -1536,7 +1537,7 @@ func (vpcClassic *VpcClassicV1) CreateInstanceAction(createInstanceActionOptions // network interface card and connects an instance to a subnet. While each network interface can attach to only one // subnet, multiple network interfaces can be created to attach to multiple subnets. Multiple interfaces may also attach // to the same subnet. -func (vpcClassic *VpcClassicV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceCollection, response *core.DetailedResponse, err error) { +func (vpcClassic *VpcClassicV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceNetworkInterfacesOptions, "listInstanceNetworkInterfacesOptions cannot be nil") if err != nil { return @@ -1578,7 +1579,7 @@ func (vpcClassic *VpcClassicV1) ListInstanceNetworkInterfaces(listInstanceNetwor if err != nil { return } - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceCollection) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceUnpaginatedCollection) if err != nil { return } @@ -4626,10 +4627,12 @@ func (vpcClassic *VpcClassicV1) ListPublicGateways(listPublicGatewaysOptions *Li } // CreatePublicGateway : Create a public gateway -// This request creates a new public gateway from a public gateway prototype object. If a floating IP is provided, it -// must be unbound. If a floating IP is not provided, one will be created and bound to the public gateway. Once a public -// gateway has been created, its floating IP cannot be unbound. A public gateway must be explicitly attached to each -// subnet it will provide connectivity for. +// This request creates a new public gateway from a public gateway prototype object. For this to succeed, the VPC must +// not already have a public gateway in the specified zone. +// +// If a floating IP is provided, it must be unbound. If a floating IP is not provided, one will be created and bound to +// the public gateway. Once a public gateway has been created, its floating IP cannot be unbound. A public gateway must +// be explicitly attached to each subnet it will provide connectivity for. func (vpcClassic *VpcClassicV1) CreatePublicGateway(createPublicGatewayOptions *CreatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createPublicGatewayOptions, "createPublicGatewayOptions cannot be nil") if err != nil { @@ -6056,7 +6059,9 @@ func (vpcClassic *VpcClassicV1) CreateSubnet(createSubnetOptions *CreateSubnetOp // DeleteSubnet : Delete specified subnet // This request deletes a subnet. This operation cannot be reversed. For this request to succeed, the subnet must not be // referenced by any network interfaces, VPN gateways, or load balancers. A delete operation automatically detaches the -// subnet from any network ACLs and public gateways. +// subnet from any network ACLs, public gateways, or endpoint gateways. All flow log collectors with `auto_delete` set +// to +// `true` targeting the subnet or any resource in the subnet are automatically deleted. func (vpcClassic *VpcClassicV1) DeleteSubnet(deleteSubnetOptions *DeleteSubnetOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSubnetOptions, "deleteSubnetOptions cannot be nil") if err != nil { @@ -7230,15 +7235,15 @@ func (vpcClassic *VpcClassicV1) CreateVPCRoute(createVPCRouteOptions *CreateVPCR if createVPCRouteOptions.Destination != nil { body["destination"] = createVPCRouteOptions.Destination } + if createVPCRouteOptions.NextHop != nil { + body["next_hop"] = createVPCRouteOptions.NextHop + } if createVPCRouteOptions.Zone != nil { body["zone"] = createVPCRouteOptions.Zone } if createVPCRouteOptions.Name != nil { body["name"] = createVPCRouteOptions.Name } - if createVPCRouteOptions.NextHop != nil { - body["next_hop"] = createVPCRouteOptions.NextHop - } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -8272,7 +8277,7 @@ func (vpcClassic *VpcClassicV1) CreateVPNGateway(createVPNGatewayOptions *Create // DeleteVPNGateway : Delete a VPN gateway // This request deletes a VPN gateway. A VPN gateway with a `status` of `pending` cannot be deleted. This operation -// deletes all VPN connections associated with this VPN gateway. This operation cannot be reversed. +// deletes all VPN gateway connections associated with this VPN gateway. This operation cannot be reversed. func (vpcClassic *VpcClassicV1) DeleteVPNGateway(deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNGatewayOptions, "deleteVPNGatewayOptions cannot be nil") if err != nil { @@ -8486,8 +8491,8 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnections(listVPNGatewayConnecti return } -// CreateVPNGatewayConnection : Create a VPN connection -// This request creates a new VPN connection. +// CreateVPNGatewayConnection : Create a VPN gateway connection +// This request creates a new VPN gateway connection. func (vpcClassic *VpcClassicV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions *CreateVPNGatewayConnectionOptions) (result *VPNGatewayConnection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPNGatewayConnectionOptions, "createVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -8540,14 +8545,14 @@ func (vpcClassic *VpcClassicV1) CreateVPNGatewayConnection(createVPNGatewayConne if createVPNGatewayConnectionOptions.IpsecPolicy != nil { body["ipsec_policy"] = createVPNGatewayConnectionOptions.IpsecPolicy } - if createVPNGatewayConnectionOptions.LocalCidrs != nil { - body["local_cidrs"] = createVPNGatewayConnectionOptions.LocalCidrs + if createVPNGatewayConnectionOptions.LocalCIDRs != nil { + body["local_cidrs"] = createVPNGatewayConnectionOptions.LocalCIDRs } if createVPNGatewayConnectionOptions.Name != nil { body["name"] = createVPNGatewayConnectionOptions.Name } - if createVPNGatewayConnectionOptions.PeerCidrs != nil { - body["peer_cidrs"] = createVPNGatewayConnectionOptions.PeerCidrs + if createVPNGatewayConnectionOptions.PeerCIDRs != nil { + body["peer_cidrs"] = createVPNGatewayConnectionOptions.PeerCIDRs } _, err = builder.SetBodyContentJSON(body) if err != nil { @@ -8573,8 +8578,8 @@ func (vpcClassic *VpcClassicV1) CreateVPNGatewayConnection(createVPNGatewayConne return } -// DeleteVPNGatewayConnection : Delete a VPN connection -// This request deletes a VPN connection. This operation cannot be reversed. +// DeleteVPNGatewayConnection : Delete a VPN gateway connection +// This request deletes a VPN gateway connection. This operation cannot be reversed. func (vpcClassic *VpcClassicV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNGatewayConnectionOptions, "deleteVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -8616,8 +8621,8 @@ func (vpcClassic *VpcClassicV1) DeleteVPNGatewayConnection(deleteVPNGatewayConne return } -// GetVPNGatewayConnection : Retrieve the specified VPN connection -// This request retrieves a single VPN connection specified by the identifier in the URL. +// GetVPNGatewayConnection : Retrieve the specified VPN gateway connection +// This request retrieves a single VPN gateway connection specified by the identifier in the URL. func (vpcClassic *VpcClassicV1) GetVPNGatewayConnection(getVPNGatewayConnectionOptions *GetVPNGatewayConnectionOptions) (result *VPNGatewayConnection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNGatewayConnectionOptions, "getVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -8669,8 +8674,8 @@ func (vpcClassic *VpcClassicV1) GetVPNGatewayConnection(getVPNGatewayConnectionO return } -// UpdateVPNGatewayConnection : Update a VPN connection -// This request updates the properties of an existing VPN connection. +// UpdateVPNGatewayConnection : Update a VPN gateway connection +// This request updates the properties of an existing VPN gateway connection. func (vpcClassic *VpcClassicV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions *UpdateVPNGatewayConnectionOptions) (result *VPNGatewayConnection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPNGatewayConnectionOptions, "updateVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -8750,20 +8755,20 @@ func (vpcClassic *VpcClassicV1) UpdateVPNGatewayConnection(updateVPNGatewayConne return } -// ListVPNGatewayConnectionLocalCidrs : List all local CIDRs for a VPN gateway connection +// ListVPNGatewayConnectionLocalCIDRs : List all local CIDRs for a VPN gateway connection // This request lists all local CIDRs for a VPN gateway connection specified by the identifier in the URL. -func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptions *ListVPNGatewayConnectionLocalCidrsOptions) (result *VPNGatewayConnectionLocalCidrs, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(listVPNGatewayConnectionLocalCidrsOptions, "listVPNGatewayConnectionLocalCidrsOptions cannot be nil") +func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) (result *VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(listVPNGatewayConnectionLocalCidrsOptions, "listVPNGatewayConnectionLocalCidrsOptions") + err = core.ValidateStruct(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions") if err != nil { return } pathSegments := []string{"vpn_gateways", "connections", "local_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionLocalCidrsOptions.VPNGatewayID, *listVPNGatewayConnectionLocalCidrsOptions.ID} + pathParameters := []string{*listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionLocalCIDRsOptions.ID} builder := core.NewRequestBuilder(core.GET) _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) @@ -8771,11 +8776,11 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionLocalCidrs(listVPNGatewa return } - for headerName, headerValue := range listVPNGatewayConnectionLocalCidrsOptions.Headers { + for headerName, headerValue := range listVPNGatewayConnectionLocalCIDRsOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc_classic", "V1", "ListVPNGatewayConnectionLocalCidrs") + sdkHeaders := common.GetSdkHeaders("vpc_classic", "V1", "ListVPNGatewayConnectionLocalCIDRs") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -8794,7 +8799,7 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionLocalCidrs(listVPNGatewa if err != nil { return } - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCidrs) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCIDRs) if err != nil { return } @@ -8933,20 +8938,20 @@ func (vpcClassic *VpcClassicV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayCo return } -// ListVPNGatewayConnectionPeerCidrs : List all peer CIDRs for a VPN gateway connection +// ListVPNGatewayConnectionPeerCIDRs : List all peer CIDRs for a VPN gateway connection // This request lists all peer CIDRs for a VPN gateway connection specified by the identifier in the URL. -func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptions *ListVPNGatewayConnectionPeerCidrsOptions) (result *VPNGatewayConnectionPeerCidrs, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(listVPNGatewayConnectionPeerCidrsOptions, "listVPNGatewayConnectionPeerCidrsOptions cannot be nil") +func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) (result *VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(listVPNGatewayConnectionPeerCidrsOptions, "listVPNGatewayConnectionPeerCidrsOptions") + err = core.ValidateStruct(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions") if err != nil { return } pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionPeerCidrsOptions.VPNGatewayID, *listVPNGatewayConnectionPeerCidrsOptions.ID} + pathParameters := []string{*listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionPeerCIDRsOptions.ID} builder := core.NewRequestBuilder(core.GET) _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) @@ -8954,11 +8959,11 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionPeerCidrs(listVPNGateway return } - for headerName, headerValue := range listVPNGatewayConnectionPeerCidrsOptions.Headers { + for headerName, headerValue := range listVPNGatewayConnectionPeerCIDRsOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc_classic", "V1", "ListVPNGatewayConnectionPeerCidrs") + sdkHeaders := common.GetSdkHeaders("vpc_classic", "V1", "ListVPNGatewayConnectionPeerCIDRs") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -8977,7 +8982,7 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionPeerCidrs(listVPNGateway if err != nil { return } - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCidrs) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCIDRs) if err != nil { return } @@ -9599,7 +9604,7 @@ type AddVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -9657,7 +9662,7 @@ type AddVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -9900,7 +9905,7 @@ type CheckVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -9958,7 +9963,7 @@ type CheckVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -10775,7 +10780,8 @@ type CreateLoadBalancerOptions struct { // The pools of this load balancer. Pools []LoadBalancerPoolPrototype `json:"pools,omitempty"` - // The resource group for this load balancer. + // 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"` // Allows users to set headers on API requests @@ -11424,9 +11430,13 @@ type CreateVPCRouteOptions struct { VPCID *string `json:"vpc_id" validate:"required"` // The destination of the route. At most two routes per `zone` in a table can have the same destination, and only if - // both routes have an `action` of `deliver`. + // both routes have an `action` of `deliver` and the + // `next_hop` is an IP address. Destination *string `json:"destination" validate:"required"` + // The next hop that packets will be delivered to. + NextHop RouteNextHopPrototypeIntf `json:"next_hop" validate:"required"` + // The zone to apply the route to. (Traffic from subnets in this zone will be // subject to this route.). Zone ZoneIdentityIntf `json:"zone" validate:"required"` @@ -11435,18 +11445,16 @@ type CreateVPCRouteOptions struct { // Names must be unique within the VPC routing table the route resides in. Name *string `json:"name,omitempty"` - // The next hop that packets will be delivered to. - NextHop RouteNextHopPrototypeIntf `json:"next_hop,omitempty"` - // Allows users to set headers on API requests Headers map[string]string } // NewCreateVPCRouteOptions : Instantiate CreateVPCRouteOptions -func (*VpcClassicV1) NewCreateVPCRouteOptions(vpcID string, destination string, zone ZoneIdentityIntf) *CreateVPCRouteOptions { +func (*VpcClassicV1) NewCreateVPCRouteOptions(vpcID string, destination string, nextHop RouteNextHopPrototypeIntf, zone ZoneIdentityIntf) *CreateVPCRouteOptions { return &CreateVPCRouteOptions{ VPCID: core.StringPtr(vpcID), Destination: core.StringPtr(destination), + NextHop: nextHop, Zone: zone, } } @@ -11463,6 +11471,12 @@ func (options *CreateVPCRouteOptions) SetDestination(destination string) *Create return options } +// SetNextHop : Allow user to set NextHop +func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions { + options.NextHop = nextHop + return options +} + // SetZone : Allow user to set Zone func (options *CreateVPCRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRouteOptions { options.Zone = zone @@ -11475,12 +11489,6 @@ func (options *CreateVPCRouteOptions) SetName(name string) *CreateVPCRouteOption return options } -// SetNextHop : Allow user to set NextHop -func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions { - options.NextHop = nextHop - return options -} - // SetHeaders : Allow user to set Headers func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *CreateVPCRouteOptions { options.Headers = param @@ -11512,13 +11520,13 @@ type CreateVPNGatewayConnectionOptions struct { IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` // A collection of local CIDRs for this resource. - LocalCidrs []string `json:"local_cidrs,omitempty"` + LocalCIDRs []string `json:"local_cidrs,omitempty"` - // The user-defined name for this VPN connection. + // The user-defined name for this VPN gateway connection. Name *string `json:"name,omitempty"` // A collection of peer CIDRs for this resource. - PeerCidrs []string `json:"peer_cidrs,omitempty"` + PeerCIDRs []string `json:"peer_cidrs,omitempty"` // Allows users to set headers on API requests Headers map[string]string @@ -11575,9 +11583,9 @@ func (options *CreateVPNGatewayConnectionOptions) SetIpsecPolicy(ipsecPolicy IPs return options } -// SetLocalCidrs : Allow user to set LocalCidrs -func (options *CreateVPNGatewayConnectionOptions) SetLocalCidrs(localCidrs []string) *CreateVPNGatewayConnectionOptions { - options.LocalCidrs = localCidrs +// SetLocalCIDRs : Allow user to set LocalCIDRs +func (options *CreateVPNGatewayConnectionOptions) SetLocalCIDRs(localCIDRs []string) *CreateVPNGatewayConnectionOptions { + options.LocalCIDRs = localCIDRs return options } @@ -11587,9 +11595,9 @@ func (options *CreateVPNGatewayConnectionOptions) SetName(name string) *CreateVP return options } -// SetPeerCidrs : Allow user to set PeerCidrs -func (options *CreateVPNGatewayConnectionOptions) SetPeerCidrs(peerCidrs []string) *CreateVPNGatewayConnectionOptions { - options.PeerCidrs = peerCidrs +// SetPeerCIDRs : Allow user to set PeerCIDRs +func (options *CreateVPNGatewayConnectionOptions) SetPeerCIDRs(peerCIDRs []string) *CreateVPNGatewayConnectionOptions { + options.PeerCIDRs = peerCIDRs return options } @@ -12497,7 +12505,7 @@ type DeleteVPNGatewayConnectionOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests @@ -12688,6 +12696,41 @@ func UnmarshalFloatingIP(m map[string]json.RawMessage, result interface{}) (err return } +// FloatingIPByTargetTarget : The network interface this floating IP is to be bound to. +// Models which "extend" this model: +// - FloatingIPByTargetTargetNetworkInterfaceIdentityByID +// - FloatingIPByTargetTargetNetworkInterfaceIdentityByHref +type FloatingIPByTargetTarget struct { + // The unique identifier for this network interface. + ID *string `json:"id,omitempty"` + + // The URL for this network interface. + Href *string `json:"href,omitempty"` +} + +func (*FloatingIPByTargetTarget) isaFloatingIPByTargetTarget() bool { + return true +} + +type FloatingIPByTargetTargetIntf interface { + isaFloatingIPByTargetTarget() bool +} + +// UnmarshalFloatingIPByTargetTarget unmarshals an instance of FloatingIPByTargetTarget from the specified map of raw messages. +func UnmarshalFloatingIPByTargetTarget(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPByTargetTarget) + 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 +} + // FloatingIPCollection : FloatingIPCollection struct type FloatingIPCollection struct { // A reference to the first page of resources. @@ -12761,6 +12804,42 @@ func UnmarshalFloatingIPCollectionNext(m map[string]json.RawMessage, result inte return } +// FloatingIPPatchTargetNetworkInterfaceIdentity : A new network interface to bind this floating IP to, replacing any existing binding. For this request to succeed, the +// existing floating IP must not be required by another resource, such as a public gateway. +// Models which "extend" this model: +// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID +// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref +type FloatingIPPatchTargetNetworkInterfaceIdentity struct { + // The unique identifier for this network interface. + ID *string `json:"id,omitempty"` + + // The URL for this network interface. + Href *string `json:"href,omitempty"` +} + +func (*FloatingIPPatchTargetNetworkInterfaceIdentity) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool { + return true +} + +type FloatingIPPatchTargetNetworkInterfaceIdentityIntf interface { + isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool +} + +// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentity from the specified map of raw messages. +func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatchTargetNetworkInterfaceIdentity) + 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 +} + // FloatingIPPrototype : FloatingIPPrototype struct // Models which "extend" this model: // - FloatingIPPrototypeFloatingIPByZone @@ -12773,8 +12852,8 @@ type FloatingIPPrototype struct { // The identity of the zone to provision a floating IP in. Zone ZoneIdentityIntf `json:"zone,omitempty"` - // The target this address is to be bound to. - Target NetworkInterfaceIdentityIntf `json:"target,omitempty"` + // The network interface this floating IP is to be bound to. + Target FloatingIPByTargetTargetIntf `json:"target,omitempty"` } func (*FloatingIPPrototype) isaFloatingIPPrototype() bool { @@ -12796,7 +12875,7 @@ func UnmarshalFloatingIPPrototype(m map[string]json.RawMessage, result interface if err != nil { return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalNetworkInterfaceIdentity) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPByTargetTarget) if err != nil { return } @@ -12866,7 +12945,7 @@ type FloatingIPTarget struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type,omitempty"` // The CRN for this public gateway. @@ -12874,7 +12953,7 @@ type FloatingIPTarget struct { } // Constants associated with the FloatingIPTarget.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FloatingIPTargetResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -14138,7 +14217,7 @@ type GetVPNGatewayConnectionOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests @@ -14204,7 +14283,7 @@ type IkePolicy struct { // The authentication algorithm. AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"` - // Collection of references to VPN connections that use this IKE policy. + // Collection of references to VPN gateway connections that use this IKE policy. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this IKE policy was created. @@ -14396,6 +14475,37 @@ func UnmarshalIkePolicyIdentity(m map[string]json.RawMessage, result interface{} return } +// IkePolicyReference : IkePolicyReference struct +type IkePolicyReference struct { + // The IKE policy's canonical URL. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this IKE policy. + ID *string `json:"id" validate:"required"` + + // The user-defined name for this IKE policy. + Name *string `json:"name" validate:"required"` +} + +// UnmarshalIkePolicyReference unmarshals an instance of IkePolicyReference from the specified map of raw messages. +func UnmarshalIkePolicyReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IkePolicyReference) + 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 +} + // IP : IP struct type IP struct { // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this @@ -14420,7 +14530,7 @@ type IPsecPolicy struct { // The authentication algorithm. AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"` - // Collection of references to VPN connections that use this IPsec policy. + // Collection of references to VPN gateway connections that use this IPsec policy. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this IPsec policy was created. @@ -14661,6 +14771,37 @@ func UnmarshalIPsecPolicyIdentity(m map[string]json.RawMessage, result interface return } +// IPsecPolicyReference : IPsecPolicyReference struct +type IPsecPolicyReference struct { + // The IPsec policy's canonical URL. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this IPsec policy. + ID *string `json:"id" validate:"required"` + + // The user-defined name for this IPsec policy. + Name *string `json:"name" validate:"required"` +} + +// UnmarshalIPsecPolicyReference unmarshals an instance of IPsecPolicyReference from the specified map of raw messages. +func UnmarshalIPsecPolicyReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IPsecPolicyReference) + 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 +} + // IkePolicyCollectionFirst : A reference to the first page of resources. type IkePolicyCollectionFirst struct { // The URL for the first page of resources. @@ -15735,9 +15876,12 @@ func UnmarshalInstanceProfileReference(m map[string]json.RawMessage, result inte // Models which "extend" this model: // - InstancePrototypeInstanceByImage type InstancePrototype struct { - // The public SSH keys to install on the virtual server instance. Up to 10 keys may be provided; if no keys are - // provided the instance will be inaccessible unless the image used provides a means of access. For Windows instances, - // one of the keys will be used to encrypt the administrator password. + // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no + // keys are provided the instance will be inaccessible unless the image used provides another means of access. For + // Windows instances, one of the keys will be used to encrypt the administrator password. + // + // 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. Keys []KeyIdentityIntf `json:"keys,omitempty"` // The user-defined name for this virtual server instance (and default system hostname). If unspecified, the name will @@ -16074,7 +16218,7 @@ func UnmarshalKeyCollectionNext(m map[string]json.RawMessage, result interface{} // - KeyIdentityByID // - KeyIdentityByCRN // - KeyIdentityByHref -// - KeyIdentityByFingerprint +// - KeyIdentityKeyIdentityByFingerprint type KeyIdentity struct { // The unique identifier for this key. ID *string `json:"id,omitempty"` @@ -17398,78 +17542,78 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt return options } -// ListVPNGatewayConnectionLocalCidrsOptions : The ListVPNGatewayConnectionLocalCidrs options. -type ListVPNGatewayConnectionLocalCidrsOptions struct { +// ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options. +type ListVPNGatewayConnectionLocalCIDRsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// NewListVPNGatewayConnectionLocalCidrsOptions : Instantiate ListVPNGatewayConnectionLocalCidrsOptions -func (*VpcClassicV1) NewListVPNGatewayConnectionLocalCidrsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionLocalCidrsOptions { - return &ListVPNGatewayConnectionLocalCidrsOptions{ +// NewListVPNGatewayConnectionLocalCIDRsOptions : Instantiate ListVPNGatewayConnectionLocalCIDRsOptions +func (*VpcClassicV1) NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionLocalCIDRsOptions { + return &ListVPNGatewayConnectionLocalCIDRsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (options *ListVPNGatewayConnectionLocalCidrsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCidrsOptions { +func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCIDRsOptions { options.VPNGatewayID = core.StringPtr(vpnGatewayID) return options } // SetID : Allow user to set ID -func (options *ListVPNGatewayConnectionLocalCidrsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCidrsOptions { +func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCIDRsOptions { options.ID = core.StringPtr(id) return options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionLocalCidrsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionLocalCidrsOptions { +func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionLocalCIDRsOptions { options.Headers = param return options } -// ListVPNGatewayConnectionPeerCidrsOptions : The ListVPNGatewayConnectionPeerCidrs options. -type ListVPNGatewayConnectionPeerCidrsOptions struct { +// ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options. +type ListVPNGatewayConnectionPeerCIDRsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// NewListVPNGatewayConnectionPeerCidrsOptions : Instantiate ListVPNGatewayConnectionPeerCidrsOptions -func (*VpcClassicV1) NewListVPNGatewayConnectionPeerCidrsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionPeerCidrsOptions { - return &ListVPNGatewayConnectionPeerCidrsOptions{ +// NewListVPNGatewayConnectionPeerCIDRsOptions : Instantiate ListVPNGatewayConnectionPeerCIDRsOptions +func (*VpcClassicV1) NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionPeerCIDRsOptions { + return &ListVPNGatewayConnectionPeerCIDRsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (options *ListVPNGatewayConnectionPeerCidrsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCidrsOptions { +func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCIDRsOptions { options.VPNGatewayID = core.StringPtr(vpnGatewayID) return options } // SetID : Allow user to set ID -func (options *ListVPNGatewayConnectionPeerCidrsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCidrsOptions { +func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCIDRsOptions { options.ID = core.StringPtr(id) return options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionPeerCidrsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionPeerCidrsOptions { +func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionPeerCIDRsOptions { options.Headers = param return options } @@ -17479,7 +17623,7 @@ type ListVPNGatewayConnectionsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // Filters the collection to VPN connections with the specified status. + // Filters the collection to VPN gateway connections with the specified status. Status *string `json:"status,omitempty"` // Allows users to set headers on API requests @@ -18678,10 +18822,6 @@ type LoadBalancerPoolHealthMonitorPatch struct { Timeout *int64 `json:"timeout" validate:"required"` // The protocol type of this load balancer pool health monitor. - // - // 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 health monitor on which - // the unexpected property value was encountered. Type *string `json:"type" validate:"required"` // The health check URL. This is applicable only to `http` type of health monitor. @@ -18690,10 +18830,6 @@ type LoadBalancerPoolHealthMonitorPatch struct { // Constants associated with the LoadBalancerPoolHealthMonitorPatch.Type property. // The protocol type of this load balancer pool health monitor. -// -// 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 health monitor on which -// the unexpected property value was encountered. const ( LoadBalancerPoolHealthMonitorPatchTypeHTTPConst = "http" LoadBalancerPoolHealthMonitorPatchTypeHTTPSConst = "https" @@ -18758,10 +18894,6 @@ type LoadBalancerPoolHealthMonitorPrototype struct { Timeout *int64 `json:"timeout" validate:"required"` // The protocol type of this load balancer pool health monitor. - // - // 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 health monitor on which - // the unexpected property value was encountered. Type *string `json:"type" validate:"required"` // The health check URL. This is applicable only to `http` type of health monitor. @@ -18770,10 +18902,6 @@ type LoadBalancerPoolHealthMonitorPrototype struct { // Constants associated with the LoadBalancerPoolHealthMonitorPrototype.Type property. // The protocol type of this load balancer pool health monitor. -// -// 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 health monitor on which -// the unexpected property value was encountered. const ( LoadBalancerPoolHealthMonitorPrototypeTypeHTTPConst = "http" LoadBalancerPoolHealthMonitorPrototypeTypeHTTPSConst = "https" @@ -19593,9 +19721,9 @@ func UnmarshalNetworkACLReference(m map[string]json.RawMessage, result interface // NetworkACLRule : NetworkACLRule struct // Models which "extend" this model: -// - NetworkACLRuleProtocolTcpudp -// - NetworkACLRuleProtocolIcmp -// - NetworkACLRuleProtocolAll +// - NetworkACLRuleNetworkACLRuleProtocolTcpudp +// - NetworkACLRuleNetworkACLRuleProtocolIcmp +// - NetworkACLRuleNetworkACLRuleProtocolAll type NetworkACLRule struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -19626,7 +19754,7 @@ type NetworkACLRule struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -19703,13 +19831,13 @@ func UnmarshalNetworkACLRule(m map[string]json.RawMessage, result interface{}) ( return } if discValue == "all" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolAll) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll) } else if discValue == "icmp" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolIcmp) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp) } else if discValue == "tcp" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) } else if discValue == "udp" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) } else { err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) } @@ -19789,6 +19917,41 @@ func UnmarshalNetworkACLRuleCollectionNext(m map[string]json.RawMessage, result return } +// NetworkACLRuleIdentity : Identifies a network ACL rule by a unique property. +// Models which "extend" this model: +// - NetworkACLRuleIdentityByID +// - NetworkACLRuleIdentityByHref +type NetworkACLRuleIdentity struct { + // The unique identifier for this Network ACL rule. + ID *string `json:"id,omitempty"` + + // The URL for this Network ACL rule. + Href *string `json:"href,omitempty"` +} + +func (*NetworkACLRuleIdentity) isaNetworkACLRuleIdentity() bool { + return true +} + +type NetworkACLRuleIdentityIntf interface { + isaNetworkACLRuleIdentity() bool +} + +// UnmarshalNetworkACLRuleIdentity unmarshals an instance of NetworkACLRuleIdentity from the specified map of raw messages. +func UnmarshalNetworkACLRuleIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRuleIdentity) + 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 +} + // NetworkACLRuleItem : NetworkACLRuleItem struct // Models which "extend" this model: // - NetworkACLRuleItemNetworkACLRuleProtocolTcpudp @@ -19825,7 +19988,7 @@ type NetworkACLRuleItem struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -19926,7 +20089,7 @@ type NetworkACLRulePatch struct { // The rule to move this rule immediately before. Specify `null` to move this rule after // all existing rules. - Before NetworkACLRulePatchBeforeIntf `json:"before,omitempty"` + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination,omitempty"` @@ -19943,18 +20106,6 @@ type NetworkACLRulePatch struct { // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source,omitempty"` - // The date and time that the rule was created. - CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` - - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The IP version for this rule. - IPVersion *string `json:"ip_version,omitempty"` - // The inclusive upper bound of TCP/UDP destination port range. PortMax *int64 `json:"port_max,omitempty"` @@ -19998,13 +20149,6 @@ const ( NetworkACLRulePatchProtocolUDPConst = "udp" ) -// Constants associated with the NetworkACLRulePatch.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePatchIPVersionIpv4Const = "ipv4" - NetworkACLRulePatchIPVersionIpv6Const = "ipv6" -) - func (*NetworkACLRulePatch) isaNetworkACLRulePatch() bool { return true } @@ -20040,41 +20184,6 @@ func UnmarshalNetworkACLRulePatch(m map[string]json.RawMessage, result interface return } -// NetworkACLRulePatchBefore : The rule to move this rule immediately before. Specify `null` to move this rule after all existing rules. -// Models which "extend" this model: -// - NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID -// - NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref -type NetworkACLRulePatchBefore struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` -} - -func (*NetworkACLRulePatchBefore) isaNetworkACLRulePatchBefore() bool { - return true -} - -type NetworkACLRulePatchBeforeIntf interface { - isaNetworkACLRulePatchBefore() bool -} - -// UnmarshalNetworkACLRulePatchBefore unmarshals an instance of NetworkACLRulePatchBefore from the specified map of raw messages. -func UnmarshalNetworkACLRulePatchBefore(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePatchBefore) - 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 -} - // NetworkACLRulePrototype : NetworkACLRulePrototype struct // Models which "extend" this model: // - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp @@ -20086,7 +20195,7 @@ type NetworkACLRulePrototype struct { // The rule to insert this rule immediately before. If omitted, this rule will be // inserted after all existing rules. - Before NetworkACLRulePrototypeBeforeIntf `json:"before,omitempty"` + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` @@ -20099,23 +20208,11 @@ type NetworkACLRulePrototype struct { Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` - // The date and time that the rule was created. - CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` - - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The IP version for this rule. - IPVersion *string `json:"ip_version,omitempty"` - // The inclusive upper bound of TCP/UDP destination port range. PortMax *int64 `json:"port_max,omitempty"` @@ -20159,13 +20256,6 @@ const ( NetworkACLRulePrototypeProtocolUDPConst = "udp" ) -// Constants associated with the NetworkACLRulePrototype.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeIPVersionIpv6Const = "ipv6" -) - func (*NetworkACLRulePrototype) isaNetworkACLRulePrototype() bool { return true } @@ -20201,41 +20291,6 @@ func UnmarshalNetworkACLRulePrototype(m map[string]json.RawMessage, result inter return } -// NetworkACLRulePrototypeBefore : The rule to insert this rule immediately before. If omitted, this rule will be inserted after all existing rules. -// Models which "extend" this model: -// - NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID -// - NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref -type NetworkACLRulePrototypeBefore struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` -} - -func (*NetworkACLRulePrototypeBefore) isaNetworkACLRulePrototypeBefore() bool { - return true -} - -type NetworkACLRulePrototypeBeforeIntf interface { - isaNetworkACLRulePrototypeBefore() bool -} - -// UnmarshalNetworkACLRulePrototypeBefore unmarshals an instance of NetworkACLRulePrototypeBefore from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeBefore(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeBefore) - 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 -} - // NetworkACLRulePrototypeNetworkACLContext : NetworkACLRulePrototypeNetworkACLContext struct // Models which "extend" this model: // - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp @@ -20256,26 +20311,11 @@ type NetworkACLRulePrototypeNetworkACLContext struct { Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" 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,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` - - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The IP version for this rule. - IPVersion *string `json:"ip_version,omitempty"` - // The inclusive upper bound of TCP/UDP destination port range. PortMax *int64 `json:"port_max,omitempty"` @@ -20319,13 +20359,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextProtocolUDPConst = "udp" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContext.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextIPVersionIpv6Const = "ipv6" -) - func (*NetworkACLRulePrototypeNetworkACLContext) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -20373,17 +20406,6 @@ type NetworkACLRuleReference struct { Name *string `json:"name" validate:"required"` } -// NewNetworkACLRuleReference : Instantiate NetworkACLRuleReference (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRuleReference(href string, id string, name string) (model *NetworkACLRuleReference, err error) { - model = &NetworkACLRuleReference{ - Href: core.StringPtr(href), - ID: core.StringPtr(id), - Name: core.StringPtr(name), - } - err = core.ValidateStruct(model, "required parameters") - return -} - // UnmarshalNetworkACLRuleReference unmarshals an instance of NetworkACLRuleReference from the specified map of raw messages. func UnmarshalNetworkACLRuleReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleReference) @@ -20426,7 +20448,7 @@ type NetworkInterface struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // Collection of security groups. @@ -20443,7 +20465,7 @@ type NetworkInterface struct { } // Constants associated with the NetworkInterface.ResourceType property. -// The type of resource referenced. +// The resource type. const ( NetworkInterfaceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -20535,41 +20557,6 @@ func UnmarshalNetworkInterfaceCollection(m map[string]json.RawMessage, result in return } -// NetworkInterfaceIdentity : Identifies a network interface by a unique property. -// Models which "extend" this model: -// - NetworkInterfaceIdentityByID -// - NetworkInterfaceIdentityByHref -type NetworkInterfaceIdentity struct { - // The unique identifier for this network interface. - ID *string `json:"id,omitempty"` - - // The URL for this network interface. - Href *string `json:"href,omitempty"` -} - -func (*NetworkInterfaceIdentity) isaNetworkInterfaceIdentity() bool { - return true -} - -type NetworkInterfaceIdentityIntf interface { - isaNetworkInterfaceIdentity() bool -} - -// UnmarshalNetworkInterfaceIdentity unmarshals an instance of NetworkInterfaceIdentity from the specified map of raw messages. -func UnmarshalNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkInterfaceIdentity) - 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 -} - // NetworkInterfaceInstanceContextReference : NetworkInterfaceInstanceContextReference struct type NetworkInterfaceInstanceContextReference struct { // The URL for this network interface. @@ -20584,7 +20571,7 @@ type NetworkInterfaceInstanceContextReference struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The associated subnet. @@ -20592,7 +20579,7 @@ type NetworkInterfaceInstanceContextReference struct { } // Constants associated with the NetworkInterfaceInstanceContextReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( NetworkInterfaceInstanceContextReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -20634,7 +20621,8 @@ type NetworkInterfacePrototype struct { // randomly-selected words. Name *string `json:"name,omitempty"` - // The primary IPv4 address. + // The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If + // unspecified, an available address on the subnet will be automatically selected. PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"` // Collection of security groups. @@ -20690,12 +20678,12 @@ type NetworkInterfaceReference struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the NetworkInterfaceReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( NetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -20727,6 +20715,23 @@ func UnmarshalNetworkInterfaceReference(m map[string]json.RawMessage, result int return } +// NetworkInterfaceUnpaginatedCollection : NetworkInterfaceUnpaginatedCollection struct +type NetworkInterfaceUnpaginatedCollection struct { + // Collection of network interfaces. + NetworkInterfaces []NetworkInterface `json:"network_interfaces" validate:"required"` +} + +// UnmarshalNetworkInterfaceUnpaginatedCollection unmarshals an instance of NetworkInterfaceUnpaginatedCollection from the specified map of raw messages. +func UnmarshalNetworkInterfaceUnpaginatedCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkInterfaceUnpaginatedCollection) + err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // OperatingSystem : OperatingSystem struct type OperatingSystem struct { // The operating system architecture. @@ -20914,7 +20919,7 @@ type PublicGateway struct { // The user-defined name for this public gateway. Name *string `json:"name" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the volume. @@ -20928,7 +20933,7 @@ type PublicGateway struct { } // Constants associated with the PublicGateway.ResourceType property. -// The type of resource referenced. +// The resource type. const ( PublicGatewayResourceTypePublicGatewayConst = "public_gateway" ) @@ -21221,12 +21226,12 @@ type PublicGatewayReference struct { // The user-defined name for this public gateway. Name *string `json:"name" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the PublicGatewayReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( PublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway" ) @@ -21435,7 +21440,7 @@ type RemoveVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -21493,7 +21498,7 @@ type RemoveVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -21715,13 +21720,14 @@ type Route struct { // Constants associated with the Route.LifecycleState property. // The lifecycle state of the route. const ( - RouteLifecycleStateDeletedConst = "deleted" - RouteLifecycleStateDeletingConst = "deleting" - RouteLifecycleStateFailedConst = "failed" - RouteLifecycleStatePendingConst = "pending" - RouteLifecycleStateStableConst = "stable" - RouteLifecycleStateUpdatingConst = "updating" - RouteLifecycleStateWaitingConst = "waiting" + RouteLifecycleStateDeletedConst = "deleted" + RouteLifecycleStateDeletingConst = "deleting" + RouteLifecycleStateFailedConst = "failed" + RouteLifecycleStatePendingConst = "pending" + RouteLifecycleStateStableConst = "stable" + RouteLifecycleStateSuspendedConst = "suspended" + RouteLifecycleStateUpdatingConst = "updating" + RouteLifecycleStateWaitingConst = "waiting" ) // UnmarshalRoute unmarshals an instance of Route from the specified map of raw messages. @@ -21809,7 +21815,7 @@ func UnmarshalRouteNextHop(m map[string]json.RawMessage, result interface{}) (er return } -// RouteNextHopPrototype : RouteNextHopPrototype struct +// RouteNextHopPrototype : The next hop packets will be routed to. // Models which "extend" this model: // - RouteNextHopPrototypeRouteNextHopIP type RouteNextHopPrototype struct { @@ -22011,9 +22017,9 @@ func UnmarshalSecurityGroupReference(m map[string]json.RawMessage, result interf // SecurityGroupRule : SecurityGroupRule struct // Models which "extend" this model: -// - SecurityGroupRuleProtocolAll -// - SecurityGroupRuleProtocolIcmp -// - SecurityGroupRuleProtocolTcpudp +// - SecurityGroupRuleSecurityGroupRuleProtocolAll +// - SecurityGroupRuleSecurityGroupRuleProtocolIcmp +// - SecurityGroupRuleSecurityGroupRuleProtocolTcpudp type SecurityGroupRule struct { // The direction of traffic to enforce, either `inbound` or `outbound`. Direction *string `json:"direction" validate:"required"` @@ -22094,13 +22100,13 @@ func UnmarshalSecurityGroupRule(m map[string]json.RawMessage, result interface{} return } if discValue == "all" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolAll) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll) } else if discValue == "icmp" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolIcmp) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp) } else if discValue == "tcp" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) } else if discValue == "udp" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) } else { err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) } @@ -22282,195 +22288,6 @@ func UnmarshalSecurityGroupRulePatchRemote(m map[string]json.RawMessage, result return } -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote : The 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. If omitted, then traffic will be allowed from any -// source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP -// - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR -// - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIntf interface { - isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote : The 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. If omitted, then traffic will be allowed from any -// source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP -// - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR -// - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIntf interface { - isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote : The 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. If omitted, then traffic will be allowed from any -// source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP -// - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR -// - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIntf interface { - isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - // SecurityGroupRulePrototype : SecurityGroupRulePrototype struct // Models which "extend" this model: // - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll @@ -22629,195 +22446,6 @@ func UnmarshalSecurityGroupRulePrototypeRemote(m map[string]json.RawMessage, res return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote : The 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. If omitted, then traffic will be allowed from any -// source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIntf interface { - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote : The 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. If omitted, then traffic will be allowed from any -// source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIntf interface { - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote : The 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. If omitted, then traffic will be allowed from any -// source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIntf interface { - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - // SecurityGroupRuleRemote : The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be // specified as an IP address, a CIDR block, or a security group. If omitted, then traffic is allowed from any source // (or to any source, for outbound rules). @@ -22945,7 +22573,7 @@ type Subnet struct { ID *string `json:"id" validate:"required"` // The IPv4 range of the subnet, expressed in CIDR format. - Ipv4CIDRBlock *string `json:"ipv4_cidr_block,omitempty"` + Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"` // The user-defined name for this subnet. Name *string `json:"name" validate:"required"` @@ -23305,10 +22933,10 @@ type UpdateFloatingIPOptions struct { // The unique user-defined name for this floating IP. Name *string `json:"name,omitempty"` - // A new target to bind this floating IP with, replacing any existing binding. + // A new network interface to bind this floating IP to, replacing any existing binding. // For this request to succeed, the existing floating IP must not be required by another // resource, such as a public gateway. - Target NetworkInterfaceIdentityIntf `json:"target,omitempty"` + Target FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"` // Allows users to set headers on API requests Headers map[string]string @@ -23334,7 +22962,7 @@ func (options *UpdateFloatingIPOptions) SetName(name string) *UpdateFloatingIPOp } // SetTarget : Allow user to set Target -func (options *UpdateFloatingIPOptions) SetTarget(target NetworkInterfaceIdentityIntf) *UpdateFloatingIPOptions { +func (options *UpdateFloatingIPOptions) SetTarget(target FloatingIPPatchTargetNetworkInterfaceIdentityIntf) *UpdateFloatingIPOptions { options.Target = target return options } @@ -24654,7 +24282,7 @@ type UpdateVPNGatewayConnectionOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // If set to false, the VPN connection is shut down. @@ -24670,7 +24298,7 @@ type UpdateVPNGatewayConnectionOptions struct { // autonegotiation. IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` - // The user-defined name for this VPN connection. + // The user-defined name for this VPN gateway connection. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. @@ -25067,7 +24695,7 @@ func UnmarshalVPCReference(m map[string]json.RawMessage, result interface{}) (er // VPNGateway : VPNGateway struct type VPNGateway struct { - // Collection of references to VPN connections. + // Collection of references to VPN gateway connections. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this VPN gateway was created. @@ -25241,7 +24869,7 @@ type VPNGatewayConnection struct { // The authentication mode. Only `psk` is currently supported. AuthenticationMode *string `json:"authentication_mode" validate:"required"` - // The date and time that this VPN connection was created. + // The date and time that this VPN gateway connection was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The Dead Peer Detection settings. @@ -25254,23 +24882,23 @@ type VPNGatewayConnection struct { ID *string `json:"id" validate:"required"` // Optional IKE policy configuration. The absence of a policy indicates autonegotiation. - IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"` + IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"` // Optional IPsec policy configuration. The absence of a policy indicates // autonegotiation. - IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` + IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"` // A collection of local CIDRs for this resource. - LocalCidrs []string `json:"local_cidrs" validate:"required"` + LocalCIDRs []string `json:"local_cidrs" validate:"required"` - // The user-defined name for this VPN connection. + // The user-defined name for this VPN gateway connection. Name *string `json:"name" validate:"required"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // A collection of peer CIDRs for this resource. - PeerCidrs []string `json:"peer_cidrs" validate:"required"` + PeerCIDRs []string `json:"peer_cidrs" validate:"required"` // The preshared key. Psk *string `json:"psk" validate:"required"` @@ -25328,15 +24956,15 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac if err != nil { return } - err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity) + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) if err != nil { return } - err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity) + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) if err != nil { return } - err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCidrs) + err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) if err != nil { return } @@ -25348,7 +24976,7 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac if err != nil { return } - err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCidrs) + err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) if err != nil { return } @@ -25368,9 +24996,9 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac return } -// VPNGatewayConnectionCollection : Collection of VPN connections in a VPN gateway. +// VPNGatewayConnectionCollection : Collection of VPN gateway connections in a VPN gateway. type VPNGatewayConnectionCollection struct { - // Array of VPN connections. + // Array of VPN gateway connections. Connections []VPNGatewayConnection `json:"connections" validate:"required"` } @@ -25465,16 +25093,16 @@ func UnmarshalVPNGatewayConnectionDpdPrototype(m map[string]json.RawMessage, res return } -// VPNGatewayConnectionLocalCidrs : VPNGatewayConnectionLocalCidrs struct -type VPNGatewayConnectionLocalCidrs struct { +// VPNGatewayConnectionLocalCIDRs : VPNGatewayConnectionLocalCIDRs struct +type VPNGatewayConnectionLocalCIDRs struct { // A collection of local CIDRs for this resource. - LocalCidrs []string `json:"local_cidrs,omitempty"` + 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) +// 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 } @@ -25482,16 +25110,16 @@ func UnmarshalVPNGatewayConnectionLocalCidrs(m map[string]json.RawMessage, resul return } -// VPNGatewayConnectionPeerCidrs : VPNGatewayConnectionPeerCidrs struct -type VPNGatewayConnectionPeerCidrs struct { +// VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct +type VPNGatewayConnectionPeerCIDRs struct { // A collection of peer CIDRs for this resource. - PeerCidrs []string `json:"peer_cidrs,omitempty"` + 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) +// 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 } @@ -25887,7 +25515,7 @@ func UnmarshalVolumeAttachmentPrototypeInstanceContext(m map[string]json.RawMess // Models which "extend" this model: // - VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext type VolumeAttachmentPrototypeInstanceContextVolume struct { - // A reference to the root key to use to wrap the data encryption key for the volume. + // The identity of the root key to use to wrap the data encryption key for the volume. // // If this property is not provided, the `encryption` type for the volume will be // `provider_managed`. @@ -26340,7 +25968,7 @@ func UnmarshalVolumeProfileReference(m map[string]json.RawMessage, result interf // Models which "extend" this model: // - VolumePrototypeVolumeByCapacity type VolumePrototype struct { - // A reference to the root key to use to wrap the data encryption key for the volume. + // The identity of the root key to use to wrap the data encryption key for the volume. // // If this property is not provided, the `encryption` type for the volume will be // `provider_managed`. @@ -26416,7 +26044,7 @@ type VolumePrototypeInstanceByImageContext struct { // updating volumes may expand in the future. Capacity *int64 `json:"capacity,omitempty"` - // A reference to the root key to use to wrap the data encryption key for the volume. + // The identity of the root key to use to wrap the data encryption key for the volume. // // If this property is not provided, the `encryption` type for the volume will be // `provider_managed`. @@ -26692,6 +26320,130 @@ func UnmarshalEncryptionKeyIdentityByCRN(m map[string]json.RawMessage, result in return } +// FloatingIPByTargetTargetNetworkInterfaceIdentityByHref : FloatingIPByTargetTargetNetworkInterfaceIdentityByHref struct +// This model "extends" FloatingIPByTargetTarget +type FloatingIPByTargetTargetNetworkInterfaceIdentityByHref struct { + // The URL for this network interface. + Href *string `json:"href" validate:"required"` +} + +// NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref : Instantiate FloatingIPByTargetTargetNetworkInterfaceIdentityByHref (Generic Model Constructor) +func (*VpcClassicV1) NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref(href string) (model *FloatingIPByTargetTargetNetworkInterfaceIdentityByHref, err error) { + model = &FloatingIPByTargetTargetNetworkInterfaceIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPByTargetTargetNetworkInterfaceIdentityByHref) isaFloatingIPByTargetTarget() bool { + return true +} + +// UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPByTargetTargetNetworkInterfaceIdentityByHref from the specified map of raw messages. +func UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPByTargetTargetNetworkInterfaceIdentityByHref) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// FloatingIPByTargetTargetNetworkInterfaceIdentityByID : FloatingIPByTargetTargetNetworkInterfaceIdentityByID struct +// This model "extends" FloatingIPByTargetTarget +type FloatingIPByTargetTargetNetworkInterfaceIdentityByID struct { + // The unique identifier for this network interface. + ID *string `json:"id" validate:"required"` +} + +// NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID : Instantiate FloatingIPByTargetTargetNetworkInterfaceIdentityByID (Generic Model Constructor) +func (*VpcClassicV1) NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID(id string) (model *FloatingIPByTargetTargetNetworkInterfaceIdentityByID, err error) { + model = &FloatingIPByTargetTargetNetworkInterfaceIdentityByID{ + ID: core.StringPtr(id), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPByTargetTargetNetworkInterfaceIdentityByID) isaFloatingIPByTargetTarget() bool { + return true +} + +// UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPByTargetTargetNetworkInterfaceIdentityByID from the specified map of raw messages. +func UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPByTargetTargetNetworkInterfaceIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct +// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity +type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { + // The URL for this network interface. + Href *string `json:"href" validate:"required"` +} + +// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) +func (*VpcClassicV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { + model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool { + return true +} + +// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. +func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct +// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity +type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { + // The unique identifier for this network interface. + ID *string `json:"id" validate:"required"` +} + +// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) +func (*VpcClassicV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { + model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ + ID: core.StringPtr(id), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool { + return true +} + +// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. +func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // FloatingIPPrototypeFloatingIPByTarget : FloatingIPPrototypeFloatingIPByTarget struct // This model "extends" FloatingIPPrototype type FloatingIPPrototypeFloatingIPByTarget struct { @@ -26699,12 +26451,12 @@ type FloatingIPPrototypeFloatingIPByTarget struct { // randomly-selected words. Name *string `json:"name,omitempty"` - // The target this address is to be bound to. - Target NetworkInterfaceIdentityIntf `json:"target" validate:"required"` + // The network interface this floating IP is to be bound to. + Target FloatingIPByTargetTargetIntf `json:"target" validate:"required"` } // NewFloatingIPPrototypeFloatingIPByTarget : Instantiate FloatingIPPrototypeFloatingIPByTarget (Generic Model Constructor) -func (*VpcClassicV1) NewFloatingIPPrototypeFloatingIPByTarget(target NetworkInterfaceIdentityIntf) (model *FloatingIPPrototypeFloatingIPByTarget, err error) { +func (*VpcClassicV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPByTargetTargetIntf) (model *FloatingIPPrototypeFloatingIPByTarget, err error) { model = &FloatingIPPrototypeFloatingIPByTarget{ Target: target, } @@ -26723,7 +26475,7 @@ func UnmarshalFloatingIPPrototypeFloatingIPByTarget(m map[string]json.RawMessage if err != nil { return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalNetworkInterfaceIdentity) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPByTargetTarget) if err != nil { return } @@ -26785,12 +26537,12 @@ type FloatingIPTargetNetworkInterfaceReference struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetNetworkInterfaceReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FloatingIPTargetNetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -26841,12 +26593,12 @@ type FloatingIPTargetPublicGatewayReference struct { // The user-defined name for this public gateway. Name *string `json:"name" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetPublicGatewayReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FloatingIPTargetPublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway" ) @@ -27477,9 +27229,12 @@ func UnmarshalInstanceProfilePortSpeedFixed(m map[string]json.RawMessage, result // InstancePrototypeInstanceByImage : InstancePrototypeInstanceByImage struct // This model "extends" InstancePrototype type InstancePrototypeInstanceByImage struct { - // The public SSH keys to install on the virtual server instance. Up to 10 keys may be provided; if no keys are - // provided the instance will be inaccessible unless the image used provides a means of access. For Windows instances, - // one of the keys will be used to encrypt the administrator password. + // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no + // keys are provided the instance will be inaccessible unless the image used provides another means of access. For + // Windows instances, one of the keys will be used to encrypt the administrator password. + // + // 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. Keys []KeyIdentityIntf `json:"keys,omitempty"` // The user-defined name for this virtual server instance (and default system hostname). If unspecified, the name will @@ -27620,38 +27375,6 @@ func UnmarshalKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) 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 (*VpcClassicV1) 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 { @@ -27714,6 +27437,38 @@ func UnmarshalKeyIdentityByID(m map[string]json.RawMessage, result interface{}) return } +// KeyIdentityKeyIdentityByFingerprint : KeyIdentityKeyIdentityByFingerprint struct +// This model "extends" KeyIdentity +type KeyIdentityKeyIdentityByFingerprint 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"` +} + +// NewKeyIdentityKeyIdentityByFingerprint : Instantiate KeyIdentityKeyIdentityByFingerprint (Generic Model Constructor) +func (*VpcClassicV1) NewKeyIdentityKeyIdentityByFingerprint(fingerprint string) (model *KeyIdentityKeyIdentityByFingerprint, err error) { + model = &KeyIdentityKeyIdentityByFingerprint{ + Fingerprint: core.StringPtr(fingerprint), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*KeyIdentityKeyIdentityByFingerprint) isaKeyIdentity() bool { + return true +} + +// UnmarshalKeyIdentityKeyIdentityByFingerprint unmarshals an instance of KeyIdentityKeyIdentityByFingerprint from the specified map of raw messages. +func UnmarshalKeyIdentityKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(KeyIdentityKeyIdentityByFingerprint) + err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint : KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct // This model "extends" KeyReferenceInstanceInitializationContext type KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct { @@ -28254,122 +28009,61 @@ func UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL(m map[string]json. return } -// NetworkACLRuleItemNetworkACLRuleProtocolAll : NetworkACLRuleItemNetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRuleItem -type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { - // Whether to allow or deny matching traffic. - 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Destination *string `json:"destination" validate:"required"` - - // Whether the traffic to be matched is `inbound` or `outbound`. - Direction *string `json:"direction" validate:"required"` - +// NetworkACLRuleIdentityByHref : NetworkACLRuleIdentityByHref struct +// This model "extends" NetworkACLRuleIdentity +type NetworkACLRuleIdentityByHref struct { // 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If - // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` - - // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` - - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Action property. -// Whether to allow or deny matching traffic. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRuleItemNetworkACLRuleProtocolAllActionDenyConst = "deny" -) - -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Direction property. -// Whether the traffic to be matched is `inbound` or `outbound`. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" -) - -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Protocol property. -// The protocol to enforce. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolUDPConst = "udp" -) +// NewNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleIdentityByHref (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRuleIdentityByHref, err error) { + model = &NetworkACLRuleIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} -func (*NetworkACLRuleItemNetworkACLRuleProtocolAll) isaNetworkACLRuleItem() bool { +func (*NetworkACLRuleIdentityByHref) isaNetworkACLRuleIdentity() 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 - } +// UnmarshalNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRuleIdentityByHref from the specified map of raw messages. +func UnmarshalNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRuleIdentityByHref) 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, "protocol", &obj.Protocol) - if err != nil { - return + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// NetworkACLRuleIdentityByID : NetworkACLRuleIdentityByID struct +// This model "extends" NetworkACLRuleIdentity +type NetworkACLRuleIdentityByID struct { + // The unique identifier for this Network ACL rule. + ID *string `json:"id" validate:"required"` +} + +// NewNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleIdentityByID (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRuleIdentityByID(id string) (model *NetworkACLRuleIdentityByID, err error) { + model = &NetworkACLRuleIdentityByID{ + ID: core.StringPtr(id), } - err = core.UnmarshalPrimitive(m, "source", &obj.Source) + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRuleIdentityByID) isaNetworkACLRuleIdentity() bool { + return true +} + +// UnmarshalNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRuleIdentityByID from the specified map of raw messages. +func UnmarshalNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRuleIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } @@ -28377,13 +28071,14 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll(m map[string]json.RawM return } -// NetworkACLRuleItemNetworkACLRuleProtocolIcmp : NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct +// NetworkACLRuleItemNetworkACLRuleProtocolAll : NetworkACLRuleItemNetworkACLRuleProtocolAll struct // This model "extends" NetworkACLRuleItem -type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { +type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` - // The rule that this rule is immediately before. If absent, this is the last rule. + // 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. @@ -28409,7 +28104,131 @@ type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` + + // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Source *string `json:"source" validate:"required"` +} + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Action property. +// Whether to allow or deny matching traffic. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRuleItemNetworkACLRuleProtocolAllActionDenyConst = "deny" +) + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Direction property. +// Whether the traffic to be matched is `inbound` or `outbound`. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" +) + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.IPVersion property. +// The IP version for this rule. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" + NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" +) + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Protocol property. +// The protocol to enforce. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolUDPConst = "udp" +) + +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, "protocol", &obj.Protocol) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "source", &obj.Source) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// NetworkACLRuleItemNetworkACLRuleProtocolIcmp : NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRuleItem +type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { + // Whether to allow or deny matching traffic. + 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Destination *string `json:"destination" validate:"required"` + + // Whether the traffic to be matched is `inbound` or `outbound`. + 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If + // unspecified, the name will be a hyphenated list of randomly-selected words. + Name *string `json:"name" validate:"required"` + + // The protocol to enforce. + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -28521,7 +28340,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` - // The rule that this rule is immediately before. If absent, this is the last rule. + // 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. @@ -28547,7 +28367,7 @@ type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -28666,104 +28486,30 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp(m map[string]json.R return } -// NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref : NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref struct -// This model "extends" NetworkACLRulePatchBefore -type NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref struct { - // The URL for this Network ACL rule. - Href *string `json:"href" validate:"required"` -} - -// NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref, err error) { - model = &NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref) isaNetworkACLRulePatchBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref from the specified map of raw messages. -func UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID : NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID struct -// This model "extends" NetworkACLRulePatchBefore -type NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id" validate:"required"` -} - -// NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID : Instantiate NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID(id string) (model *NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID, err error) { - model = &NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) isaNetworkACLRulePatchBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID from the specified map of raw messages. -func UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // NetworkACLRulePatchNetworkACLRuleProtocolAll : NetworkACLRulePatchNetworkACLRuleProtocolAll struct // This model "extends" NetworkACLRulePatch type NetworkACLRulePatchNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. - 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"` + Action *string `json:"action,omitempty"` - // The date and time that the rule was created. - CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` + // The rule to move this rule immediately before. Specify `null` to move this rule after + // all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Destination *string `json:"destination" validate:"required"` + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Destination *string `json:"destination,omitempty"` // Whether the traffic to be matched is `inbound` or `outbound`. - 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"` + Direction *string `json:"direction,omitempty"` - // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If - // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. + Name *string `json:"name,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Source *string `json:"source" validate:"required"` + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Source *string `json:"source,omitempty"` } // Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolAll.Action property. @@ -28780,13 +28526,6 @@ const ( NetworkACLRulePatchNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePatchNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRulePatchNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" -) - // Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( @@ -28796,23 +28535,6 @@ const ( NetworkACLRulePatchNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePatchNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePatchNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePatchNetworkACLRuleProtocolAll(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePatchNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePatchNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePatchNetworkACLRuleProtocolAll) isaNetworkACLRulePatch() bool { return true } @@ -28824,11 +28546,7 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolAll(m map[string]json.Raw if err != nil { return } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -28840,18 +28558,6 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolAll(m map[string]json.Raw 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 @@ -28872,38 +28578,26 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolAll(m map[string]json.Raw // This model "extends" NetworkACLRulePatch type NetworkACLRulePatchNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. - 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"` + Action *string `json:"action,omitempty"` - // The date and time that the rule was created. - CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` + // The rule to move this rule immediately before. Specify `null` to move this rule after + // all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Destination *string `json:"destination" validate:"required"` + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Destination *string `json:"destination,omitempty"` // Whether the traffic to be matched is `inbound` or `outbound`. - 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"` + Direction *string `json:"direction,omitempty"` - // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If - // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. + Name *string `json:"name,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Source *string `json:"source" validate:"required"` + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Source *string `json:"source,omitempty"` // The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also // specified. @@ -28927,13 +28621,6 @@ const ( NetworkACLRulePatchNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolIcmp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePatchNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRulePatchNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" -) - // Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( @@ -28943,23 +28630,6 @@ const ( NetworkACLRulePatchNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePatchNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePatchNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePatchNetworkACLRuleProtocolIcmp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePatchNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePatchNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePatchNetworkACLRuleProtocolIcmp) isaNetworkACLRulePatch() bool { return true } @@ -28971,11 +28641,7 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolIcmp(m map[string]json.Ra if err != nil { return } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -28987,18 +28653,6 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolIcmp(m map[string]json.Ra 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 @@ -29027,38 +28681,26 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolIcmp(m map[string]json.Ra // This model "extends" NetworkACLRulePatch type NetworkACLRulePatchNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. - 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"` + Action *string `json:"action,omitempty"` - // The date and time that the rule was created. - CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` + // The rule to move this rule immediately before. Specify `null` to move this rule after + // all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Destination *string `json:"destination" validate:"required"` + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Destination *string `json:"destination,omitempty"` // Whether the traffic to be matched is `inbound` or `outbound`. - 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"` + Direction *string `json:"direction,omitempty"` - // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If - // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. + Name *string `json:"name,omitempty"` // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Source *string `json:"source" validate:"required"` + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Source *string `json:"source,omitempty"` // The inclusive upper bound of TCP/UDP destination port range. PortMax *int64 `json:"port_max,omitempty"` @@ -29087,13 +28729,6 @@ const ( NetworkACLRulePatchNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolTcpudp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePatchNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRulePatchNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" -) - // Constants associated with the NetworkACLRulePatchNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( @@ -29103,23 +28738,6 @@ const ( NetworkACLRulePatchNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePatchNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePatchNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePatchNetworkACLRuleProtocolTcpudp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePatchNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePatchNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePatchNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePatch() bool { return true } @@ -29131,11 +28749,7 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolTcpudp(m map[string]json. if err != nil { return } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -29147,18 +28761,6 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolTcpudp(m map[string]json. 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 @@ -29191,93 +28793,76 @@ func UnmarshalNetworkACLRulePatchNetworkACLRuleProtocolTcpudp(m map[string]json. return } -// NetworkACLRuleProtocolAll : NetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRule -type NetworkACLRuleProtocolAll struct { +// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct +// This model "extends" NetworkACLRulePrototypeNetworkACLContext +type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRuleProtocolAll.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRuleProtocolAllActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRuleProtocolAll.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRuleProtocolAll.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - NetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRuleProtocolAllProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -func (*NetworkACLRuleProtocolAll) isaNetworkACLRule() bool { +// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) { + model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{ + Action: core.StringPtr(action), + Destination: core.StringPtr(destination), + Direction: core.StringPtr(direction), + Protocol: core.StringPtr(protocol), + Source: core.StringPtr(source), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } -// UnmarshalNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRuleProtocolAll from the specified map of raw messages. -func UnmarshalNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleProtocolAll) +// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) 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 @@ -29286,18 +28871,6 @@ func UnmarshalNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result int 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 @@ -29314,41 +28887,26 @@ func UnmarshalNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result int return } -// NetworkACLRuleProtocolIcmp : NetworkACLRuleProtocolIcmp struct -// This model "extends" NetworkACLRule -type NetworkACLRuleProtocolIcmp struct { +// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRulePrototypeNetworkACLContext +type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -29359,92 +28917,78 @@ type NetworkACLRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the NetworkACLRuleProtocolIcmp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRuleProtocolIcmpActionAllowConst = "allow" - NetworkACLRuleProtocolIcmpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRuleProtocolIcmp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" - NetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleProtocolIcmp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRuleProtocolIcmp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - NetworkACLRuleProtocolIcmpProtocolAllConst = "all" - NetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" - NetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" - NetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -func (*NetworkACLRuleProtocolIcmp) isaNetworkACLRule() bool { +// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) { + model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{ + Action: core.StringPtr(action), + Destination: core.StringPtr(destination), + Direction: core.StringPtr(direction), + Protocol: core.StringPtr(protocol), + Source: core.StringPtr(source), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } -// UnmarshalNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleProtocolIcmp) +// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) + err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) if err != nil { return } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) if err != nil { return } - err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) + err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) + err = core.UnmarshalPrimitive(m, "source", &obj.Source) if err != nil { return } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + err = core.UnmarshalPrimitive(m, "code", &obj.Code) 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, "protocol", &obj.Protocol) - 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, "type", &obj.Type) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) if err != nil { return } @@ -29452,41 +28996,26 @@ func UnmarshalNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result in return } -// NetworkACLRuleProtocolTcpudp : NetworkACLRuleProtocolTcpudp struct -// This model "extends" NetworkACLRule -type NetworkACLRuleProtocolTcpudp struct { +// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct +// This model "extends" NetworkACLRulePrototypeNetworkACLContext +type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. @@ -29502,55 +29031,53 @@ type NetworkACLRuleProtocolTcpudp struct { SourcePortMin *int64 `json:"source_port_min,omitempty"` } -// Constants associated with the NetworkACLRuleProtocolTcpudp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRuleProtocolTcpudpActionAllowConst = "allow" - NetworkACLRuleProtocolTcpudpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRuleProtocolTcpudp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" - NetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleProtocolTcpudp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRuleProtocolTcpudp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - NetworkACLRuleProtocolTcpudpProtocolAllConst = "all" - NetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" - NetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" - NetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -func (*NetworkACLRuleProtocolTcpudp) isaNetworkACLRule() bool { +// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) { + model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{ + Action: core.StringPtr(action), + Destination: core.StringPtr(destination), + Direction: core.StringPtr(direction), + Protocol: core.StringPtr(protocol), + Source: core.StringPtr(source), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } -// UnmarshalNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleProtocolTcpudp) +// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) 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 @@ -29559,18 +29086,6 @@ func UnmarshalNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result 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 @@ -29603,169 +29118,81 @@ func UnmarshalNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result return } -// NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref : NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref struct -// This model "extends" NetworkACLRulePrototypeBefore -type NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref struct { - // The URL for this Network ACL rule. - Href *string `json:"href" validate:"required"` -} - -// NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref, err error) { - model = &NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref) isaNetworkACLRulePrototypeBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID : NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID struct -// This model "extends" NetworkACLRulePrototypeBefore -type NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id" validate:"required"` -} - -// NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID : Instantiate NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID(id string) (model *NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID, err error) { - model = &NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID) isaNetworkACLRulePrototypeBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRulePrototypeNetworkACLContext -type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct { +// NetworkACLRulePrototypeNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct +// This model "extends" NetworkACLRulePrototype +type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. 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 rule to insert this rule immediately before. If omitted, this rule will be + // inserted after all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{ +// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) { + model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{ Action: core.StringPtr(action), - CreatedAt: createdAt, Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), + Protocol: core.StringPtr(protocol), Source: core.StringPtr(source), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool { +func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) +// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAll from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAll) 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) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -29777,18 +29204,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll( 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 @@ -29805,41 +29220,30 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll( return } -// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct -// This model "extends" NetworkACLRulePrototypeNetworkACLContext -type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct { +// NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRulePrototype +type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. 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 rule to insert this rule immediately before. If omitted, this rule will be + // inserted after all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -29850,69 +29254,54 @@ type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{ +// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) { + model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{ Action: core.StringPtr(action), - CreatedAt: createdAt, Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), + Protocol: core.StringPtr(protocol), Source: core.StringPtr(source), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool { +func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) +// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) 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) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -29924,18 +29313,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp 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 @@ -29960,41 +29337,30 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp return } -// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct -// This model "extends" NetworkACLRulePrototypeNetworkACLContext -type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct { +// NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct +// This model "extends" NetworkACLRulePrototype +type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. 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 rule to insert this rule immediately before. If omitted, this rule will be + // inserted after all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. @@ -30010,69 +29376,54 @@ type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct SourcePortMin *int64 `json:"source_port_min,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{ +// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor) +func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) { + model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{ Action: core.StringPtr(action), - CreatedAt: createdAt, Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), + Protocol: core.StringPtr(protocol), Source: core.StringPtr(source), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool { +func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) +// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) 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) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -30084,18 +29435,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpu 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 @@ -30128,9 +29467,9 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpu return } -// NetworkACLRulePrototypeNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRulePrototype -type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { +// NetworkACLRuleNetworkACLRuleProtocolAll : NetworkACLRuleNetworkACLRuleProtocolAll struct +// This model "extends" NetworkACLRule +type NetworkACLRuleNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -30160,66 +29499,49 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Action property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionDenyConst = "deny" + NetworkACLRuleNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRuleNetworkACLRuleProtocolAllActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Direction property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" + NetworkACLRuleNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRuleNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.IPVersion property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.IPVersion property. // The IP version for this rule. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" + NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" + NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Protocol property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolUDPConst = "udp" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool { +func (*NetworkACLRuleNetworkACLRuleProtocolAll) isaNetworkACLRule() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAll from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAll) +// 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 @@ -30268,9 +29590,9 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json return } -// NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct -// This model "extends" NetworkACLRulePrototype -type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { +// NetworkACLRuleNetworkACLRuleProtocolIcmp : NetworkACLRuleNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRule +type NetworkACLRuleNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -30300,7 +29622,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -30313,60 +29635,43 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Action property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionDenyConst = "deny" + NetworkACLRuleNetworkACLRuleProtocolIcmpActionAllowConst = "allow" + NetworkACLRuleNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Direction property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" + NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" + NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.IPVersion property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.IPVersion property. // The IP version for this rule. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" + NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" + NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Protocol property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolAllConst = "all" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool { +func (*NetworkACLRuleNetworkACLRuleProtocolIcmp) isaNetworkACLRule() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) +// 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 @@ -30423,9 +29728,9 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]jso return } -// NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct -// This model "extends" NetworkACLRulePrototype -type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { +// NetworkACLRuleNetworkACLRuleProtocolTcpudp : NetworkACLRuleNetworkACLRuleProtocolTcpudp struct +// This model "extends" NetworkACLRule +type NetworkACLRuleNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -30455,7 +29760,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -30473,60 +29778,43 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { SourcePortMin *int64 `json:"source_port_min,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Action property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" + NetworkACLRuleNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" + NetworkACLRuleNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Direction property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" + NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" + NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.IPVersion property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.IPVersion property. // The IP version for this rule. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" + NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" + NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Protocol property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool { +func (*NetworkACLRuleNetworkACLRuleProtocolTcpudp) isaNetworkACLRule() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) +// 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 @@ -30591,29 +29879,29 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]j return } -// NetworkInterfaceIdentityByHref : NetworkInterfaceIdentityByHref struct -// This model "extends" NetworkInterfaceIdentity -type NetworkInterfaceIdentityByHref struct { - // The URL for this network interface. +// OperatingSystemIdentityByHref : OperatingSystemIdentityByHref struct +// This model "extends" OperatingSystemIdentity +type OperatingSystemIdentityByHref struct { + // The URL for this operating system. Href *string `json:"href" validate:"required"` } -// NewNetworkInterfaceIdentityByHref : Instantiate NetworkInterfaceIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkInterfaceIdentityByHref(href string) (model *NetworkInterfaceIdentityByHref, err error) { - model = &NetworkInterfaceIdentityByHref{ +// NewOperatingSystemIdentityByHref : Instantiate OperatingSystemIdentityByHref (Generic Model Constructor) +func (*VpcClassicV1) NewOperatingSystemIdentityByHref(href string) (model *OperatingSystemIdentityByHref, err error) { + model = &OperatingSystemIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkInterfaceIdentityByHref) isaNetworkInterfaceIdentity() bool { +func (*OperatingSystemIdentityByHref) isaOperatingSystemIdentity() bool { return true } -// UnmarshalNetworkInterfaceIdentityByHref unmarshals an instance of NetworkInterfaceIdentityByHref from the specified map of raw messages. -func UnmarshalNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkInterfaceIdentityByHref) +// 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 @@ -30622,79 +29910,17 @@ func UnmarshalNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, resul return } -// NetworkInterfaceIdentityByID : NetworkInterfaceIdentityByID struct -// This model "extends" NetworkInterfaceIdentity -type NetworkInterfaceIdentityByID struct { - // The unique identifier for this network interface. - ID *string `json:"id" validate:"required"` +// OperatingSystemIdentityByName : OperatingSystemIdentityByName struct +// This model "extends" OperatingSystemIdentity +type OperatingSystemIdentityByName struct { + // The unique name of the operating system. + Name *string `json:"name" validate:"required"` } -// NewNetworkInterfaceIdentityByID : Instantiate NetworkInterfaceIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkInterfaceIdentityByID(id string) (model *NetworkInterfaceIdentityByID, err error) { - model = &NetworkInterfaceIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkInterfaceIdentityByID) isaNetworkInterfaceIdentity() bool { - return true -} - -// UnmarshalNetworkInterfaceIdentityByID unmarshals an instance of NetworkInterfaceIdentityByID from the specified map of raw messages. -func UnmarshalNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkInterfaceIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - 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 (*VpcClassicV1) 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 unique name of the operating system. - Name *string `json:"name" validate:"required"` -} - -// NewOperatingSystemIdentityByName : Instantiate OperatingSystemIdentityByName (Generic Model Constructor) -func (*VpcClassicV1) NewOperatingSystemIdentityByName(name string) (model *OperatingSystemIdentityByName, err error) { - model = &OperatingSystemIdentityByName{ - Name: core.StringPtr(name), +// NewOperatingSystemIdentityByName : Instantiate OperatingSystemIdentityByName (Generic Model Constructor) +func (*VpcClassicV1) NewOperatingSystemIdentityByName(name string) (model *OperatingSystemIdentityByName, err error) { + model = &OperatingSystemIdentityByName{ + Name: core.StringPtr(name), } err = core.ValidateStruct(model, "required parameters") return @@ -31184,351 +30410,6 @@ func UnmarshalSecurityGroupRulePatchRemoteSecurityGroupIdentity(m map[string]jso return } -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR : SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR 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"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP : SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP 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"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP(address string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIntf - isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) - 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 -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR : SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR 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"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP : SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP 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"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP(address string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIntf - isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) - 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 -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR : SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR 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"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP : SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP 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"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP(address string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIntf - isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) - 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 -} - // SecurityGroupRulePatchSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or // `code`. // This model "extends" SecurityGroupRulePatch @@ -31548,7 +30429,7 @@ type SecurityGroupRulePatchSecurityGroupRuleProtocolAll struct { // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group. If omitted, then traffic will be allowed from any source (or to any // source, for outbound rules). - Remote SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIntf `json:"remote,omitempty"` + Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` } // Constants associated with the SecurityGroupRulePatchSecurityGroupRuleProtocolAll.Direction property. @@ -31594,7 +30475,7 @@ func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAll(m map[string]js if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchRemote) if err != nil { return } @@ -31623,7 +30504,7 @@ type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp struct { // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group. If omitted, then traffic will be allowed from any source (or to any // source, for outbound rules). - Remote SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIntf `json:"remote,omitempty"` + Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` // The ICMP traffic code to allow. Code *int64 `json:"code,omitempty"` @@ -31675,7 +30556,7 @@ func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmp(m map[string]j if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchRemote) if err != nil { return } @@ -31711,7 +30592,7 @@ type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudp struct { // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group. If omitted, then traffic will be allowed from any source (or to any // source, for outbound rules). - Remote SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIntf `json:"remote,omitempty"` + Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` // The inclusive upper bound of TCP/UDP port range. PortMax *int64 `json:"port_max,omitempty"` @@ -31763,275 +30644,7 @@ func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudp(m map[string if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote) - 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 - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or -// `code`. -// This model "extends" SecurityGroupRule -type SecurityGroupRuleProtocolAll struct { - // The direction of traffic to enforce, either `inbound` or `outbound`. - Direction *string `json:"direction" 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 field, 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,omitempty"` - - // The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be - // specified as an IP address, a CIDR block, or a security group. If omitted, then traffic is allowed from any source - // (or to any source, for outbound rules). - Remote interface{} `json:"remote,omitempty"` -} - -// Constants associated with the SecurityGroupRuleProtocolAll.Direction property. -// The direction of traffic to enforce, either `inbound` or `outbound`. -const ( - SecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" - SecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the SecurityGroupRuleProtocolAll.IPVersion property. -// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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 ( - SecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4" -) - -// Constants associated with the SecurityGroupRuleProtocolAll.Protocol property. -// The protocol to enforce. -const ( - SecurityGroupRuleProtocolAllProtocolAllConst = "all" - SecurityGroupRuleProtocolAllProtocolIcmpConst = "icmp" - SecurityGroupRuleProtocolAllProtocolTCPConst = "tcp" - SecurityGroupRuleProtocolAllProtocolUDPConst = "udp" -) - -func (*SecurityGroupRuleProtocolAll) isaSecurityGroupRule() bool { - return true -} - -// UnmarshalSecurityGroupRuleProtocolAll unmarshals an instance of SecurityGroupRuleProtocolAll from the specified map of raw messages. -func UnmarshalSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRuleProtocolAll) - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) - 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, "protocol", &obj.Protocol) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "remote", &obj.Remote) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code` -// may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types -// and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all -// codes. -// This model "extends" SecurityGroupRule -type SecurityGroupRuleProtocolIcmp struct { - // The direction of traffic to enforce, either `inbound` or `outbound`. - Direction *string `json:"direction" 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 field, 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,omitempty"` - - // The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be - // specified as an IP address, a CIDR block, or a security group. If omitted, then traffic is allowed from any source - // (or to any source, for outbound rules). - Remote interface{} `json:"remote,omitempty"` - - // The ICMP traffic code to allow. - Code *int64 `json:"code,omitempty"` - - // The ICMP traffic type to allow. - Type *int64 `json:"type,omitempty"` -} - -// Constants associated with the SecurityGroupRuleProtocolIcmp.Direction property. -// The direction of traffic to enforce, either `inbound` or `outbound`. -const ( - SecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" - SecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" -) - -// Constants associated with the SecurityGroupRuleProtocolIcmp.IPVersion property. -// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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 ( - SecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4" -) - -// Constants associated with the SecurityGroupRuleProtocolIcmp.Protocol property. -// The protocol to enforce. -const ( - SecurityGroupRuleProtocolIcmpProtocolAllConst = "all" - SecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" - SecurityGroupRuleProtocolIcmpProtocolTCPConst = "tcp" - SecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" -) - -func (*SecurityGroupRuleProtocolIcmp) isaSecurityGroupRule() bool { - return true -} - -// UnmarshalSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRuleProtocolIcmp) - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) - 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, "protocol", &obj.Protocol) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "remote", &obj.Remote) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "code", &obj.Code) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "type", &obj.Type) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and -// `port_max`. Either both should be set, or neither. When neither is set then traffic is allowed on all ports. For a -// single port, set both to the same value. -// This model "extends" SecurityGroupRule -type SecurityGroupRuleProtocolTcpudp struct { - // The direction of traffic to enforce, either `inbound` or `outbound`. - Direction *string `json:"direction" 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 field, 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,omitempty"` - - // The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be - // specified as an IP address, a CIDR block, or a security group. If omitted, then traffic is allowed from any source - // (or to any source, for outbound rules). - Remote interface{} `json:"remote,omitempty"` - - // The inclusive upper bound of TCP/UDP port range. - PortMax *int64 `json:"port_max,omitempty"` - - // The inclusive lower bound of TCP/UDP port range. - PortMin *int64 `json:"port_min,omitempty"` -} - -// Constants associated with the SecurityGroupRuleProtocolTcpudp.Direction property. -// The direction of traffic to enforce, either `inbound` or `outbound`. -const ( - SecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" - SecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" -) - -// Constants associated with the SecurityGroupRuleProtocolTcpudp.IPVersion property. -// The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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 ( - SecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" -) - -// Constants associated with the SecurityGroupRuleProtocolTcpudp.Protocol property. -// The protocol to enforce. -const ( - SecurityGroupRuleProtocolTcpudpProtocolAllConst = "all" - SecurityGroupRuleProtocolTcpudpProtocolIcmpConst = "icmp" - SecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" - SecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" -) - -func (*SecurityGroupRuleProtocolTcpudp) isaSecurityGroupRule() bool { - return true -} - -// UnmarshalSecurityGroupRuleProtocolTcpudp unmarshals an instance of SecurityGroupRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRuleProtocolTcpudp) - err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) - 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, "protocol", &obj.Protocol) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "remote", &obj.Remote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchRemote) if err != nil { return } @@ -32162,351 +30775,6 @@ func UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentity(m map[string return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(address string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIntf - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP(address string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIntf - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP(address string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIntf - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) - 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 -} - // SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or // `code`. // This model "extends" SecurityGroupRulePrototype @@ -32526,7 +30794,7 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct { // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group. If omitted, then traffic will be allowed from any source (or to any // source, for outbound rules). - Remote SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIntf `json:"remote,omitempty"` + Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` } // Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Direction property. @@ -32581,7 +30849,7 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[strin if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeRemote) if err != nil { return } @@ -32610,7 +30878,7 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct { // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group. If omitted, then traffic will be allowed from any source (or to any // source, for outbound rules). - Remote SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIntf `json:"remote,omitempty"` + Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The ICMP traffic code to allow. Code *int64 `json:"code,omitempty"` @@ -32671,7 +30939,7 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[stri if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeRemote) if err != nil { return } @@ -32707,7 +30975,7 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct { // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a // security group. If omitted, then traffic will be allowed from any source (or to any // source, for outbound rules). - Remote SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIntf `json:"remote,omitempty"` + Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The inclusive upper bound of TCP/UDP port range. PortMax *int64 `json:"port_max,omitempty"` @@ -32768,7 +31036,7 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(m map[st if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeRemote) if err != nil { return } @@ -32875,6 +31143,277 @@ func UnmarshalSecurityGroupRuleRemoteSecurityGroupReference(m map[string]json.Ra return } +// SecurityGroupRuleSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or +// `code`. +// This model "extends" SecurityGroupRule +type SecurityGroupRuleSecurityGroupRuleProtocolAll struct { + // The direction of traffic to enforce, either `inbound` or `outbound`. + Direction *string `json:"direction" 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 field, 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,omitempty"` + + // The IP addresses or security groups from which this rule allows traffic (or to + // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a + // security group. If omitted, then traffic is allowed from any source (or to any + // source, for outbound rules). + Remote SecurityGroupRuleRemoteIntf `json:"remote,omitempty"` +} + +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Direction property. +// The direction of traffic to enforce, either `inbound` or `outbound`. +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 field, 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" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolIcmpConst = "icmp" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolTCPConst = "tcp" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolUDPConst = "udp" +) + +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, "id", &obj.ID) + 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, UnmarshalSecurityGroupRuleRemote) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupRuleSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code` +// may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types +// and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all +// codes. +// This model "extends" SecurityGroupRule +type SecurityGroupRuleSecurityGroupRuleProtocolIcmp struct { + // The direction of traffic to enforce, either `inbound` or `outbound`. + Direction *string `json:"direction" 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 field, 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,omitempty"` + + // The IP addresses or security groups from which this rule allows traffic (or to + // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a + // security group. If omitted, then traffic is allowed from any source (or to any + // source, for outbound rules). + Remote SecurityGroupRuleRemoteIntf `json:"remote,omitempty"` + + // The ICMP traffic code to allow. + Code *int64 `json:"code,omitempty"` + + // The ICMP traffic type to allow. + Type *int64 `json:"type,omitempty"` +} + +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Direction property. +// The direction of traffic to enforce, either `inbound` or `outbound`. +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 field, 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 ( + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolAllConst = "all" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolTCPConst = "tcp" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" +) + +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, "id", &obj.ID) + 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, UnmarshalSecurityGroupRuleRemote) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "code", &obj.Code) + 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 : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and +// `port_max`. Either both should be set, or neither. When neither is set then traffic is allowed on all ports. For a +// single port, set both to the same value. +// This model "extends" SecurityGroupRule +type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp struct { + // The direction of traffic to enforce, either `inbound` or `outbound`. + Direction *string `json:"direction" 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 field, 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,omitempty"` + + // The IP addresses or security groups from which this rule allows traffic (or to + // which, for outbound rules). Can be specified as an IP address, a CIDR block, or a + // security group. If omitted, then traffic is allowed from any source (or to any + // source, for outbound rules). + Remote SecurityGroupRuleRemoteIntf `json:"remote,omitempty"` + + // The inclusive upper bound of TCP/UDP port range. + PortMax *int64 `json:"port_max,omitempty"` + + // The inclusive lower bound of TCP/UDP port range. + PortMin *int64 `json:"port_min,omitempty"` +} + +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Direction property. +// The direction of traffic to enforce, either `inbound` or `outbound`. +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 field, 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 ( + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolAllConst = "all" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolIcmpConst = "icmp" + 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, "id", &obj.ID) + 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, 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 + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // SubnetIdentityByCRN : SubnetIdentityByCRN struct // This model "extends" SubnetIdentity type SubnetIdentityByCRN struct { @@ -33207,7 +31746,7 @@ func UnmarshalVPCIdentityByID(m map[string]json.RawMessage, result interface{}) // - VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity // This model "extends" VolumeAttachmentPrototypeInstanceContextVolume type VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext struct { - // A reference to the root key to use to wrap the data encryption key for the volume. + // The identity of the root key to use to wrap the data encryption key for the volume. // // If this property is not provided, the `encryption` type for the volume will be // `provider_managed`. @@ -33425,7 +31964,7 @@ func UnmarshalVolumeProfileIdentityByName(m map[string]json.RawMessage, result i // VolumePrototypeVolumeByCapacity : VolumePrototypeVolumeByCapacity struct // This model "extends" VolumePrototype type VolumePrototypeVolumeByCapacity struct { - // A reference to the root key to use to wrap the data encryption key for the volume. + // The identity of the root key to use to wrap the data encryption key for the volume. // // If this property is not provided, the `encryption` type for the volume will be // `provider_managed`. @@ -33949,321 +32488,6 @@ func UnmarshalSecurityGroupRulePatchRemoteSecurityGroupIdentitySecurityGroupIden return } -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct // This model "extends" SecurityGroupRulePrototypeRemoteSecurityGroupIdentity type SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { @@ -34369,325 +32593,10 @@ func UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroup return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcClassicV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct // This model "extends" VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext type VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct { - // A reference to the root key to use to wrap the data encryption key for the volume. + // The identity of the root key to use to wrap the data encryption key for the volume. // // If this property is not provided, the `encryption` type for the volume will be // `provider_managed`. diff --git a/vpcclassicv1/vpc_classic_v1_integration_test.go b/vpcclassicv1/vpc_classic_v1_integration_test.go index e3ef8ee..634fb6d 100644 --- a/vpcclassicv1/vpc_classic_v1_integration_test.go +++ b/vpcclassicv1/vpc_classic_v1_integration_test.go @@ -211,7 +211,6 @@ func TestVPCResources(t *testing.T) { t.Run("Create Subnet", func(t *testing.T) { name := getName("subnet") - fmt.Println("here", *createdVpcID) res, _, err := CreateSubnet(vpcService, *createdVpcID, name, *defaultZoneName, *skipForMockTesting) ValidateResponse(t, res, err, POST, detailed, increment) createdSubnetID = res.ID @@ -1105,13 +1104,13 @@ func TestVPCVpn(t *testing.T) { ValidateResponse(t, res, err, GET, detailed, increment) }) - t.Run("List VpnGateway Connection Local Cidrs", func(t *testing.T) { - res, _, err := ListVPNGatewayConnectionLocalCidrs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) + t.Run("List VpnGateway Connection Local CIDRs", func(t *testing.T) { + res, _, err := ListVPNGatewayConnectionLocalCIDRs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) ValidateResponse(t, res, err, GET, detailed, increment) }) - t.Run("List VpnGateway Connection Peer Cidrs", func(t *testing.T) { - res, _, err := ListVPNGatewayConnectionPeerCidrs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) + t.Run("List VpnGateway Connection Peer CIDRs", func(t *testing.T) { + res, _, err := ListVPNGatewayConnectionPeerCIDRs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) ValidateResponse(t, res, err, GET, detailed, increment) }) diff --git a/vpcclassicv1/vpc_classic_v1_integration_utils_test.go b/vpcclassicv1/vpc_classic_v1_integration_utils_test.go index 17684b4..4694a05 100644 --- a/vpcclassicv1/vpc_classic_v1_integration_utils_test.go +++ b/vpcclassicv1/vpc_classic_v1_integration_utils_test.go @@ -826,7 +826,7 @@ func GetInstanceInitialization(vpcService *vpcclassicv1.VpcClassicV1, instanceID // ListNetworkInterfaces GET // /instances/{instance_id}/network_interfaces // List all network interfaces on an instance -func ListNetworkInterfaces(vpcService *vpcclassicv1.VpcClassicV1, id string) (netInterfaces *vpcclassicv1.NetworkInterfaceCollection, response *core.DetailedResponse, err error) { +func ListNetworkInterfaces(vpcService *vpcclassicv1.VpcClassicV1, id string) (netInterfaces *vpcclassicv1.NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) { options := &vpcclassicv1.ListInstanceNetworkInterfacesOptions{} options.SetInstanceID(id) netInterfaces, response, err = vpcService.ListInstanceNetworkInterfaces(options) @@ -1920,9 +1920,9 @@ func CreateVPNGatewayConnection(vpcService *vpcclassicv1.VpcClassicV1, gatewayID options.SetPeerAddress("192.168.0.1") options.SetPsk("pre-shared-key") local := []string{"192.132.0.0/28"} - options.SetLocalCidrs(local) + options.SetLocalCIDRs(local) peer := []string{"197.155.0.0/28"} - options.SetPeerCidrs(peer) + options.SetPeerCIDRs(peer) connection, response, err = vpcService.CreateVPNGatewayConnection(options) return } @@ -1962,14 +1962,14 @@ func UpdateVPNGatewayConnection(vpcService *vpcclassicv1.VpcClassicV1, gatewayID return } -// ListVPNGatewayConnectionLocalCidrs GET +// ListVPNGatewayConnectionLocalCIDRs GET // /vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs // List all local CIDRs for a resource -func ListVPNGatewayConnectionLocalCidrs(vpcService *vpcclassicv1.VpcClassicV1, gatewayID, connID string) (cidr *vpcclassicv1.VPNGatewayConnectionLocalCidrs, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.ListVPNGatewayConnectionLocalCidrsOptions{} +func ListVPNGatewayConnectionLocalCIDRs(vpcService *vpcclassicv1.VpcClassicV1, gatewayID, connID string) (cidr *vpcclassicv1.VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) { + options := &vpcclassicv1.ListVPNGatewayConnectionLocalCIDRsOptions{} options.SetVPNGatewayID(gatewayID) options.SetID(connID) - cidr, response, err = vpcService.ListVPNGatewayConnectionLocalCidrs(options) + cidr, response, err = vpcService.ListVPNGatewayConnectionLocalCIDRs(options) return } @@ -2012,14 +2012,14 @@ func SetVPNGatewayConnectionLocalCidr(vpcService *vpcclassicv1.VpcClassicV1, gat return } -// ListVPNGatewayConnectionPeerCidrs GET +// ListVPNGatewayConnectionPeerCIDRs GET // /vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs // List all peer CIDRs for a resource -func ListVPNGatewayConnectionPeerCidrs(vpcService *vpcclassicv1.VpcClassicV1, gatewayID, connID string) (cidr *vpcclassicv1.VPNGatewayConnectionPeerCidrs, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.ListVPNGatewayConnectionPeerCidrsOptions{} +func ListVPNGatewayConnectionPeerCIDRs(vpcService *vpcclassicv1.VpcClassicV1, gatewayID, connID string) (cidr *vpcclassicv1.VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) { + options := &vpcclassicv1.ListVPNGatewayConnectionPeerCIDRsOptions{} options.SetVPNGatewayID(gatewayID) options.SetID(connID) - cidr, response, err = vpcService.ListVPNGatewayConnectionPeerCidrs(options) + cidr, response, err = vpcService.ListVPNGatewayConnectionPeerCIDRs(options) return } diff --git a/vpcclassicv1/vpc_classic_v1_test.go b/vpcclassicv1/vpc_classic_v1_test.go index 17abb2a..31b505a 100644 --- a/vpcclassicv1/vpc_classic_v1_test.go +++ b/vpcclassicv1/vpc_classic_v1_test.go @@ -660,15 +660,15 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcclassicv1.NetworkInterfaceIdentityByID) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the UpdateFloatingIPOptions model updateFloatingIPOptionsModel := new(vpcclassicv1.UpdateFloatingIPOptions) updateFloatingIPOptionsModel.ID = core.StringPtr("testString") updateFloatingIPOptionsModel.Name = core.StringPtr("my-floating-ip") - updateFloatingIPOptionsModel.Target = networkInterfaceIdentityModel + updateFloatingIPOptionsModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.UpdateFloatingIP(updateFloatingIPOptionsModel) @@ -717,15 +717,15 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcclassicv1.NetworkInterfaceIdentityByID) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the UpdateFloatingIPOptions model updateFloatingIPOptionsModel := new(vpcclassicv1.UpdateFloatingIPOptions) updateFloatingIPOptionsModel.ID = core.StringPtr("testString") updateFloatingIPOptionsModel.Name = core.StringPtr("my-floating-ip") - updateFloatingIPOptionsModel.Target = networkInterfaceIdentityModel + updateFloatingIPOptionsModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -743,15 +743,15 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcclassicv1.NetworkInterfaceIdentityByID) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the UpdateFloatingIPOptions model updateFloatingIPOptionsModel := new(vpcclassicv1.UpdateFloatingIPOptions) updateFloatingIPOptionsModel.ID = core.StringPtr("testString") updateFloatingIPOptionsModel.Name = core.StringPtr("my-floating-ip") - updateFloatingIPOptionsModel.Target = networkInterfaceIdentityModel + updateFloatingIPOptionsModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -10033,25 +10033,14 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the NetworkACLPrototypeNetworkACLByRules model networkACLPrototypeModel := new(vpcclassicv1.NetworkACLPrototypeNetworkACLByRules) @@ -10109,25 +10098,14 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the NetworkACLPrototypeNetworkACLByRules model networkACLPrototypeModel := new(vpcclassicv1.NetworkACLPrototypeNetworkACLByRules) @@ -10154,25 +10132,14 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the NetworkACLPrototypeNetworkACLByRules model networkACLPrototypeModel := new(vpcclassicv1.NetworkACLPrototypeNetworkACLByRules) @@ -10700,25 +10667,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the CreateNetworkACLRuleOptions model createNetworkACLRuleOptionsModel := new(vpcclassicv1.CreateNetworkACLRuleOptions) @@ -10754,7 +10715,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "icmp", "source": "192.168.3.0/24", "code": 0, "type": 8}`) + fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "all", "source": "192.168.3.0/24"}`) })) }) It(`Invoke CreateNetworkACLRule successfully`, func() { @@ -10772,25 +10733,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the CreateNetworkACLRuleOptions model createNetworkACLRuleOptionsModel := new(vpcclassicv1.CreateNetworkACLRuleOptions) @@ -10813,25 +10768,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the CreateNetworkACLRuleOptions model createNetworkACLRuleOptionsModel := new(vpcclassicv1.CreateNetworkACLRuleOptions) @@ -10999,7 +10948,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "icmp", "source": "192.168.3.0/24", "code": 0, "type": 8}`) + fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "all", "source": "192.168.3.0/24"}`) })) }) It(`Invoke GetNetworkACLRule successfully`, func() { @@ -11093,25 +11042,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) networkACLRulePatchModel.Action = core.StringPtr("allow") - networkACLRulePatchModel.Before = networkACLRuleReferenceModel - networkACLRulePatchModel.CreatedAt = CreateMockDateTime() - networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Direction = core.StringPtr("inbound") - networkACLRulePatchModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.IPVersion = core.StringPtr("ipv4") networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Protocol = core.StringPtr("icmp") - networkACLRulePatchModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) @@ -11150,7 +11093,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "icmp", "source": "192.168.3.0/24", "code": 0, "type": 8}`) + fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "all", "source": "192.168.3.0/24"}`) })) }) It(`Invoke UpdateNetworkACLRule successfully`, func() { @@ -11168,25 +11111,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) networkACLRulePatchModel.Action = core.StringPtr("allow") - networkACLRulePatchModel.Before = networkACLRuleReferenceModel - networkACLRulePatchModel.CreatedAt = CreateMockDateTime() - networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Direction = core.StringPtr("inbound") - networkACLRulePatchModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.IPVersion = core.StringPtr("ipv4") networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Protocol = core.StringPtr("icmp") - networkACLRulePatchModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) @@ -11212,25 +11149,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) networkACLRulePatchModel.Action = core.StringPtr("allow") - networkACLRulePatchModel.Before = networkACLRuleReferenceModel - networkACLRulePatchModel.CreatedAt = CreateMockDateTime() - networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Direction = core.StringPtr("inbound") - networkACLRulePatchModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.IPVersion = core.StringPtr("ipv4") networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Protocol = core.StringPtr("icmp") - networkACLRulePatchModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) @@ -12912,7 +12843,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"security_groups": [{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}]}`) + fmt.Fprintf(res, `{"security_groups": [{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}]}`) })) }) It(`Invoke ListSecurityGroups successfully`, func() { @@ -13001,9 +12932,9 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcclassicv1.ResourceGroupIdentityByID) @@ -13014,7 +12945,7 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -13058,7 +12989,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke CreateSecurityGroup successfully`, func() { @@ -13076,9 +13007,9 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcclassicv1.ResourceGroupIdentityByID) @@ -13089,7 +13020,7 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -13120,9 +13051,9 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcclassicv1.ResourceGroupIdentityByID) @@ -13133,7 +13064,7 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -13306,7 +13237,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetSecurityGroup successfully`, func() { @@ -13432,7 +13363,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345"}, "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke UpdateSecurityGroup successfully`, func() { @@ -14017,7 +13948,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}]}`) + fmt.Fprintf(res, `{"rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}]}`) })) }) It(`Invoke ListSecurityGroupRules successfully`, func() { @@ -14109,16 +14040,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -14156,7 +14087,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}`) + fmt.Fprintf(res, `{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}`) })) }) It(`Invoke CreateSecurityGroupRule successfully`, func() { @@ -14174,16 +14105,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -14208,16 +14139,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -14387,7 +14318,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}`) + fmt.Fprintf(res, `{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}`) })) }) It(`Invoke GetSecurityGroupRule successfully`, func() { @@ -14481,16 +14412,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePatchRemoteIP model + securityGroupRulePatchRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchRemoteIP) + securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") - securityGroupRulePatchModel.Remote = securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) @@ -14529,7 +14460,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}`) + fmt.Fprintf(res, `{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}`) })) }) It(`Invoke UpdateSecurityGroupRule successfully`, func() { @@ -14547,16 +14478,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePatchRemoteIP model + securityGroupRulePatchRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchRemoteIP) + securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") - securityGroupRulePatchModel.Remote = securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) @@ -14582,16 +14513,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePatchRemoteIP model + securityGroupRulePatchRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchRemoteIP) + securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") - securityGroupRulePatchModel.Remote = securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) @@ -16809,7 +16740,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "rules": [{"direction": "inbound", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetVPCDefaultSecurityGroup successfully`, func() { @@ -17672,9 +17603,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPCRouteOptionsModel := new(vpcclassicv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.CreateVPCRoute(createVPCRouteOptionsModel) @@ -17735,9 +17666,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPCRouteOptionsModel := new(vpcclassicv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -17767,9 +17698,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPCRouteOptionsModel := new(vpcclassicv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -18932,7 +18863,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) + fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) })) }) It(`Invoke ListIkePolicyConnections successfully`, func() { @@ -19678,7 +19609,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) + fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) })) }) It(`Invoke ListIpsecPolicyConnections successfully`, func() { @@ -20427,7 +20358,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) + fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) })) }) It(`Invoke ListVPNGatewayConnections successfully`, func() { @@ -20544,9 +20475,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel createVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel createVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel - createVPNGatewayConnectionOptionsModel.LocalCidrs = []string{"192.168.1.0/24"} + createVPNGatewayConnectionOptionsModel.LocalCIDRs = []string{"192.168.1.0/24"} createVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.PeerCidrs = []string{"10.45.1.0/24"} + createVPNGatewayConnectionOptionsModel.PeerCIDRs = []string{"10.45.1.0/24"} createVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.CreateVPNGatewayConnection(createVPNGatewayConnectionOptionsModel) @@ -20577,7 +20508,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) + fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) })) }) It(`Invoke CreateVPNGatewayConnection successfully`, func() { @@ -20618,9 +20549,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel createVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel createVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel - createVPNGatewayConnectionOptionsModel.LocalCidrs = []string{"192.168.1.0/24"} + createVPNGatewayConnectionOptionsModel.LocalCIDRs = []string{"192.168.1.0/24"} createVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.PeerCidrs = []string{"10.45.1.0/24"} + createVPNGatewayConnectionOptionsModel.PeerCIDRs = []string{"10.45.1.0/24"} createVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -20661,9 +20592,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel createVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel createVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel - createVPNGatewayConnectionOptionsModel.LocalCidrs = []string{"192.168.1.0/24"} + createVPNGatewayConnectionOptionsModel.LocalCIDRs = []string{"192.168.1.0/24"} createVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.PeerCidrs = []string{"10.45.1.0/24"} + createVPNGatewayConnectionOptionsModel.PeerCIDRs = []string{"10.45.1.0/24"} createVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -20826,7 +20757,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) + fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) })) }) It(`Invoke GetVPNGatewayConnection successfully`, func() { @@ -20975,7 +20906,7 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) + fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) })) }) It(`Invoke UpdateVPNGatewayConnection successfully`, func() { @@ -21082,16 +21013,16 @@ var _ = Describe(`VpcClassicV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptions *ListVPNGatewayConnectionLocalCidrsOptions) - Operation response error`, func() { + Describe(`ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) - Operation response error`, func() { version := "testString" - listVPNGatewayConnectionLocalCidrsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" + listVPNGatewayConnectionLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21102,7 +21033,7 @@ var _ = Describe(`VpcClassicV1`, func() { fmt.Fprintf(res, `} this is not valid json {`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCidrs with error: Operation response processing error`, func() { + It(`Invoke ListVPNGatewayConnectionLocalCIDRs with error: Operation response processing error`, func() { testService, testServiceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -21111,13 +21042,13 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model - listVPNGatewayConnectionLocalCidrsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionLocalCidrsOptions) - listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionLocalCIDRsOptions) + listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) @@ -21128,16 +21059,16 @@ var _ = Describe(`VpcClassicV1`, func() { }) }) - Describe(`ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptions *ListVPNGatewayConnectionLocalCidrsOptions)`, func() { + Describe(`ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions)`, func() { version := "testString" - listVPNGatewayConnectionLocalCidrsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" + listVPNGatewayConnectionLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21148,7 +21079,7 @@ var _ = Describe(`VpcClassicV1`, func() { fmt.Fprintf(res, `{"local_cidrs": ["192.168.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCidrs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionLocalCIDRs successfully`, func() { testService, testServiceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -21158,24 +21089,24 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - result, response, operationErr := testService.ListVPNGatewayConnectionLocalCidrs(nil) + result, response, operationErr := testService.ListVPNGatewayConnectionLocalCIDRs(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model - listVPNGatewayConnectionLocalCidrsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionLocalCidrsOptions) - listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionLocalCIDRsOptions) + listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - result, response, operationErr = testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModel) + result, response, operationErr = testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) }) - It(`Invoke ListVPNGatewayConnectionLocalCidrs with error: Operation validation and request error`, func() { + It(`Invoke ListVPNGatewayConnectionLocalCIDRs with error: Operation validation and request error`, func() { testService, testServiceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -21184,23 +21115,23 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model - listVPNGatewayConnectionLocalCidrsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionLocalCidrsOptions) - listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionLocalCIDRsOptions) + listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") Expect(err).To(BeNil()) - result, response, operationErr := testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct a second instance of the ListVPNGatewayConnectionLocalCidrsOptions model with no property values - listVPNGatewayConnectionLocalCidrsOptionsModelNew := new(vpcclassicv1.ListVPNGatewayConnectionLocalCidrsOptions) + // Construct a second instance of the ListVPNGatewayConnectionLocalCIDRsOptions model with no property values + listVPNGatewayConnectionLocalCIDRsOptionsModelNew := new(vpcclassicv1.ListVPNGatewayConnectionLocalCIDRsOptions) // Invoke operation with invalid model (negative test) - result, response, operationErr = testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModelNew) + result, response, operationErr = testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) @@ -21453,16 +21384,16 @@ var _ = Describe(`VpcClassicV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptions *ListVPNGatewayConnectionPeerCidrsOptions) - Operation response error`, func() { + Describe(`ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) - Operation response error`, func() { version := "testString" - listVPNGatewayConnectionPeerCidrsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" + listVPNGatewayConnectionPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21473,7 +21404,7 @@ var _ = Describe(`VpcClassicV1`, func() { fmt.Fprintf(res, `} this is not valid json {`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCidrs with error: Operation response processing error`, func() { + It(`Invoke ListVPNGatewayConnectionPeerCIDRs with error: Operation response processing error`, func() { testService, testServiceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -21482,13 +21413,13 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model - listVPNGatewayConnectionPeerCidrsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionPeerCidrsOptions) - listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model + listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionPeerCIDRsOptions) + listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) @@ -21499,16 +21430,16 @@ var _ = Describe(`VpcClassicV1`, func() { }) }) - Describe(`ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptions *ListVPNGatewayConnectionPeerCidrsOptions)`, func() { + Describe(`ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions)`, func() { version := "testString" - listVPNGatewayConnectionPeerCidrsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" + listVPNGatewayConnectionPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21519,7 +21450,7 @@ var _ = Describe(`VpcClassicV1`, func() { fmt.Fprintf(res, `{"peer_cidrs": ["10.45.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCidrs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionPeerCIDRs successfully`, func() { testService, testServiceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -21529,24 +21460,24 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - result, response, operationErr := testService.ListVPNGatewayConnectionPeerCidrs(nil) + result, response, operationErr := testService.ListVPNGatewayConnectionPeerCIDRs(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model - listVPNGatewayConnectionPeerCidrsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionPeerCidrsOptions) - listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model + listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionPeerCIDRsOptions) + listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - result, response, operationErr = testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModel) + result, response, operationErr = testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) }) - It(`Invoke ListVPNGatewayConnectionPeerCidrs with error: Operation validation and request error`, func() { + It(`Invoke ListVPNGatewayConnectionPeerCIDRs with error: Operation validation and request error`, func() { testService, testServiceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -21555,23 +21486,23 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model - listVPNGatewayConnectionPeerCidrsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionPeerCidrsOptions) - listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model + listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcclassicv1.ListVPNGatewayConnectionPeerCIDRsOptions) + listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") Expect(err).To(BeNil()) - result, response, operationErr := testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct a second instance of the ListVPNGatewayConnectionPeerCidrsOptions model with no property values - listVPNGatewayConnectionPeerCidrsOptionsModelNew := new(vpcclassicv1.ListVPNGatewayConnectionPeerCidrsOptions) + // Construct a second instance of the ListVPNGatewayConnectionPeerCIDRsOptions model with no property values + listVPNGatewayConnectionPeerCIDRsOptionsModelNew := new(vpcclassicv1.ListVPNGatewayConnectionPeerCIDRsOptions) // Invoke operation with invalid model (negative test) - result, response, operationErr = testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModelNew) + result, response, operationErr = testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) @@ -23653,41 +23584,21 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(createLoadBalancerPoolOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateNetworkACLOptions successfully`, func() { - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - Expect(networkACLRuleReferenceModel).ToNot(BeNil()) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - Expect(networkACLRuleReferenceModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.Name).To(Equal(core.StringPtr("my-rule-1"))) - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) Expect(networkACLRulePrototypeNetworkACLContextModel).ToNot(BeNil()) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") Expect(networkACLRulePrototypeNetworkACLContextModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.Before).To(Equal(networkACLRuleReferenceModel)) - Expect(networkACLRulePrototypeNetworkACLContextModel.CreatedAt).To(Equal(CreateMockDateTime())) - Expect(networkACLRulePrototypeNetworkACLContextModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeNetworkACLContextModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(networkACLRulePrototypeNetworkACLContextModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(networkACLRulePrototypeNetworkACLContextModel.Name).To(Equal(core.StringPtr("my-rule-2"))) Expect(networkACLRulePrototypeNetworkACLContextModel.Protocol).To(Equal(core.StringPtr("all"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.Source).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeNetworkACLContextModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) // Construct an instance of the NetworkACLPrototypeNetworkACLByRules model networkACLPrototypeModel := new(vpcclassicv1.NetworkACLPrototypeNetworkACLByRules) @@ -23706,41 +23617,29 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(createNetworkACLOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateNetworkACLRuleOptions successfully`, func() { - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - Expect(networkACLRuleReferenceModel).ToNot(BeNil()) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - Expect(networkACLRuleReferenceModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.Name).To(Equal(core.StringPtr("my-rule-1"))) + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + Expect(networkACLRuleIdentityModel).ToNot(BeNil()) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + Expect(networkACLRuleIdentityModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcclassicv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) Expect(networkACLRulePrototypeModel).ToNot(BeNil()) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") Expect(networkACLRulePrototypeModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(networkACLRulePrototypeModel.Before).To(Equal(networkACLRuleReferenceModel)) - Expect(networkACLRulePrototypeModel.CreatedAt).To(Equal(CreateMockDateTime())) - Expect(networkACLRulePrototypeModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeModel.Before).To(Equal(networkACLRuleIdentityModel)) + Expect(networkACLRulePrototypeModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(networkACLRulePrototypeModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(networkACLRulePrototypeModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(networkACLRulePrototypeModel.Name).To(Equal(core.StringPtr("my-rule-2"))) Expect(networkACLRulePrototypeModel.Protocol).To(Equal(core.StringPtr("all"))) - Expect(networkACLRulePrototypeModel.Source).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) // Construct an instance of the CreateNetworkACLRuleOptions model networkACLID := "testString" @@ -23790,11 +23689,11 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(createPublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateSecurityGroupOptions successfully`, func() { - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel).ToNot(BeNil()) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + Expect(securityGroupRulePrototypeRemoteModel).ToNot(BeNil()) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") + Expect(securityGroupRulePrototypeRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcclassicv1.ResourceGroupIdentityByID) @@ -23808,13 +23707,13 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) Expect(securityGroupRulePrototypeModel.Direction).To(Equal(core.StringPtr("inbound"))) Expect(securityGroupRulePrototypeModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(securityGroupRulePrototypeModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel)) + Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeRemoteModel)) Expect(securityGroupRulePrototypeModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(securityGroupRulePrototypeModel.Type).To(Equal(core.Int64Ptr(int64(8)))) @@ -23840,11 +23739,11 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(createSecurityGroupOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateSecurityGroupRuleOptions successfully`, func() { - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel).ToNot(BeNil()) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcclassicv1.SecurityGroupRulePrototypeRemoteIP) + Expect(securityGroupRulePrototypeRemoteModel).ToNot(BeNil()) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") + Expect(securityGroupRulePrototypeRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcclassicv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) @@ -23852,13 +23751,13 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) Expect(securityGroupRulePrototypeModel.Direction).To(Equal(core.StringPtr("inbound"))) Expect(securityGroupRulePrototypeModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(securityGroupRulePrototypeModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel)) + Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeRemoteModel)) Expect(securityGroupRulePrototypeModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(securityGroupRulePrototypeModel.Type).To(Equal(core.Int64Ptr(int64(8)))) @@ -24039,20 +23938,21 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the CreateVPCRouteOptions model vpcID := "testString" createVPCRouteOptionsDestination := "192.168.3.0/24" + var createVPCRouteOptionsNextHop vpcclassicv1.RouteNextHopPrototypeIntf = nil var createVPCRouteOptionsZone vpcclassicv1.ZoneIdentityIntf = nil - createVPCRouteOptionsModel := testService.NewCreateVPCRouteOptions(vpcID, createVPCRouteOptionsDestination, createVPCRouteOptionsZone) + createVPCRouteOptionsModel := testService.NewCreateVPCRouteOptions(vpcID, createVPCRouteOptionsDestination, createVPCRouteOptionsNextHop, createVPCRouteOptionsZone) createVPCRouteOptionsModel.SetVPCID("testString") createVPCRouteOptionsModel.SetDestination("192.168.3.0/24") + createVPCRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRouteOptionsModel.SetZone(zoneIdentityModel) createVPCRouteOptionsModel.SetName("my-route-2") - createVPCRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRouteOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createVPCRouteOptionsModel).ToNot(BeNil()) Expect(createVPCRouteOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(createVPCRouteOptionsModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(createVPCRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRouteOptionsModel.Zone).To(Equal(zoneIdentityModel)) Expect(createVPCRouteOptionsModel.Name).To(Equal(core.StringPtr("my-route-2"))) - Expect(createVPCRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPNGatewayConnectionOptions successfully`, func() { @@ -24090,9 +23990,9 @@ var _ = Describe(`VpcClassicV1`, func() { createVPNGatewayConnectionOptionsModel.SetDeadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) createVPNGatewayConnectionOptionsModel.SetIkePolicy(ikePolicyIdentityModel) createVPNGatewayConnectionOptionsModel.SetIpsecPolicy(iPsecPolicyIdentityModel) - createVPNGatewayConnectionOptionsModel.SetLocalCidrs([]string{"192.168.1.0/24"}) + createVPNGatewayConnectionOptionsModel.SetLocalCIDRs([]string{"192.168.1.0/24"}) createVPNGatewayConnectionOptionsModel.SetName("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.SetPeerCidrs([]string{"10.45.1.0/24"}) + createVPNGatewayConnectionOptionsModel.SetPeerCIDRs([]string{"10.45.1.0/24"}) createVPNGatewayConnectionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createVPNGatewayConnectionOptionsModel).ToNot(BeNil()) Expect(createVPNGatewayConnectionOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) @@ -24102,9 +24002,9 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(createVPNGatewayConnectionOptionsModel.DeadPeerDetection).To(Equal(vpnGatewayConnectionDpdPrototypeModel)) Expect(createVPNGatewayConnectionOptionsModel.IkePolicy).To(Equal(ikePolicyIdentityModel)) Expect(createVPNGatewayConnectionOptionsModel.IpsecPolicy).To(Equal(iPsecPolicyIdentityModel)) - Expect(createVPNGatewayConnectionOptionsModel.LocalCidrs).To(Equal([]string{"192.168.1.0/24"})) + Expect(createVPNGatewayConnectionOptionsModel.LocalCIDRs).To(Equal([]string{"192.168.1.0/24"})) Expect(createVPNGatewayConnectionOptionsModel.Name).To(Equal(core.StringPtr("my-vpn-connection"))) - Expect(createVPNGatewayConnectionOptionsModel.PeerCidrs).To(Equal([]string{"10.45.1.0/24"})) + Expect(createVPNGatewayConnectionOptionsModel.PeerCIDRs).To(Equal([]string{"10.45.1.0/24"})) Expect(createVPNGatewayConnectionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPNGatewayOptions successfully`, func() { @@ -25260,31 +25160,31 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(listVpcsOptionsModel.ClassicAccess).To(Equal(core.BoolPtr(true))) Expect(listVpcsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewListVPNGatewayConnectionLocalCidrsOptions successfully`, func() { - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model + It(`Invoke NewListVPNGatewayConnectionLocalCIDRsOptions successfully`, func() { + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model vpnGatewayID := "testString" id := "testString" - listVPNGatewayConnectionLocalCidrsOptionsModel := testService.NewListVPNGatewayConnectionLocalCidrsOptions(vpnGatewayID, id) - listVPNGatewayConnectionLocalCidrsOptionsModel.SetVPNGatewayID("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.SetID("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel).ToNot(BeNil()) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewListVPNGatewayConnectionPeerCidrsOptions successfully`, func() { - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := testService.NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID, id) + listVPNGatewayConnectionLocalCIDRsOptionsModel.SetVPNGatewayID("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.SetID("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel).ToNot(BeNil()) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) + It(`Invoke NewListVPNGatewayConnectionPeerCIDRsOptions successfully`, func() { + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model vpnGatewayID := "testString" id := "testString" - listVPNGatewayConnectionPeerCidrsOptionsModel := testService.NewListVPNGatewayConnectionPeerCidrsOptions(vpnGatewayID, id) - listVPNGatewayConnectionPeerCidrsOptionsModel.SetVPNGatewayID("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.SetID("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel).ToNot(BeNil()) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + listVPNGatewayConnectionPeerCIDRsOptionsModel := testService.NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID, id) + listVPNGatewayConnectionPeerCIDRsOptionsModel.SetVPNGatewayID("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.SetID("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel).ToNot(BeNil()) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListVPNGatewayConnectionsOptions successfully`, func() { // Construct an instance of the ListVPNGatewayConnectionsOptions model @@ -25382,14 +25282,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLRuleReference successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - name := "my-rule-1" - model, err := testService.NewNetworkACLRuleReference(href, id, name) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewNetworkInterfacePrototype successfully`, func() { var subnet vpcclassicv1.SubnetIdentityIntf = nil _, err := testService.NewNetworkInterfacePrototype(subnet) @@ -25543,23 +25435,23 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(unsetSubnetPublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateFloatingIPOptions successfully`, func() { - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcclassicv1.NetworkInterfaceIdentityByID) - Expect(networkInterfaceIdentityModel).ToNot(BeNil()) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") - Expect(networkInterfaceIdentityModel.ID).To(Equal(core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e"))) + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel).ToNot(BeNil()) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel.ID).To(Equal(core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e"))) // Construct an instance of the UpdateFloatingIPOptions model id := "testString" updateFloatingIPOptionsModel := testService.NewUpdateFloatingIPOptions(id) updateFloatingIPOptionsModel.SetID("testString") updateFloatingIPOptionsModel.SetName("my-floating-ip") - updateFloatingIPOptionsModel.SetTarget(networkInterfaceIdentityModel) + updateFloatingIPOptionsModel.SetTarget(floatingIPPatchTargetNetworkInterfaceIdentityModel) updateFloatingIPOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateFloatingIPOptionsModel).ToNot(BeNil()) Expect(updateFloatingIPOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(updateFloatingIPOptionsModel.Name).To(Equal(core.StringPtr("my-floating-ip"))) - Expect(updateFloatingIPOptionsModel.Target).To(Equal(networkInterfaceIdentityModel)) + Expect(updateFloatingIPOptionsModel.Target).To(Equal(floatingIPPatchTargetNetworkInterfaceIdentityModel)) Expect(updateFloatingIPOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateIkePolicyOptions successfully`, func() { @@ -25845,43 +25737,31 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(updateNetworkACLOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateNetworkACLRuleOptions successfully`, func() { - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcclassicv1.NetworkACLRuleReference) - Expect(networkACLRuleReferenceModel).ToNot(BeNil()) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - Expect(networkACLRuleReferenceModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.Name).To(Equal(core.StringPtr("my-rule-1"))) + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcclassicv1.NetworkACLRuleIdentityByID) + Expect(networkACLRuleIdentityModel).ToNot(BeNil()) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + Expect(networkACLRuleIdentityModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) Expect(networkACLRulePatchModel).ToNot(BeNil()) networkACLRulePatchModel.Action = core.StringPtr("allow") - networkACLRulePatchModel.Before = networkACLRuleReferenceModel - networkACLRulePatchModel.CreatedAt = CreateMockDateTime() - networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Direction = core.StringPtr("inbound") - networkACLRulePatchModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePatchModel.IPVersion = core.StringPtr("ipv4") networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Protocol = core.StringPtr("icmp") - networkACLRulePatchModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) Expect(networkACLRulePatchModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(networkACLRulePatchModel.Before).To(Equal(networkACLRuleReferenceModel)) - Expect(networkACLRulePatchModel.CreatedAt).To(Equal(CreateMockDateTime())) - Expect(networkACLRulePatchModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePatchModel.Before).To(Equal(networkACLRuleIdentityModel)) + Expect(networkACLRulePatchModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(networkACLRulePatchModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(networkACLRulePatchModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePatchModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePatchModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(networkACLRulePatchModel.Name).To(Equal(core.StringPtr("my-rule-2"))) Expect(networkACLRulePatchModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(networkACLRulePatchModel.Source).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePatchModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(networkACLRulePatchModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(networkACLRulePatchModel.Type).To(Equal(core.Int64Ptr(int64(8)))) @@ -25925,11 +25805,11 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(updateSecurityGroupOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSecurityGroupRuleOptions successfully`, func() { - // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP) - Expect(securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel).ToNot(BeNil()) - securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") - Expect(securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the SecurityGroupRulePatchRemoteIP model + securityGroupRulePatchRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchRemoteIP) + Expect(securityGroupRulePatchRemoteModel).ToNot(BeNil()) + securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") + Expect(securityGroupRulePatchRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) @@ -25937,13 +25817,13 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") - securityGroupRulePatchModel.Remote = securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) Expect(securityGroupRulePatchModel.Direction).To(Equal(core.StringPtr("inbound"))) Expect(securityGroupRulePatchModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(securityGroupRulePatchModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(securityGroupRulePatchModel.Remote).To(Equal(securityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteModel)) + Expect(securityGroupRulePatchModel.Remote).To(Equal(securityGroupRulePatchRemoteModel)) Expect(securityGroupRulePatchModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(securityGroupRulePatchModel.Type).To(Equal(core.Int64Ptr(int64(8)))) @@ -26134,8 +26014,32 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref successfully`, func() { + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref(href) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID successfully`, func() { + id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID(id) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { + id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewFloatingIPPrototypeFloatingIPByTarget successfully`, func() { - var target vpcclassicv1.NetworkInterfaceIdentityIntf = nil + var target vpcclassicv1.FloatingIPByTargetTargetIntf = nil _, err := testService.NewFloatingIPPrototypeFloatingIPByTarget(target) Expect(err).ToNot(BeNil()) }) @@ -26223,12 +26127,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewKeyIdentityByFingerprint successfully`, func() { - fingerprint := "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY" - model, err := testService.NewKeyIdentityByFingerprint(fingerprint) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewKeyIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803" model, err := testService.NewKeyIdentityByHref(href) @@ -26241,6 +26139,12 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewKeyIdentityKeyIdentityByFingerprint successfully`, func() { + fingerprint := "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY" + model, err := testService.NewKeyIdentityKeyIdentityByFingerprint(fingerprint) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewLoadBalancerListenerPolicyPrototypeTargetLoadBalancerListenerPolicyRedirectURLPrototype successfully`, func() { httpStatusCode := int64(301) url := "https://www.redirect.com" @@ -26283,165 +26187,75 @@ var _ = Describe(`VpcClassicV1`, func() { _, err := testService.NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(sourceNetworkACL) Expect(err).ToNot(BeNil()) }) - It(`Invoke NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID successfully`, func() { - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePatchNetworkACLRuleProtocolAll successfully`, func() { - action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" - direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePatchNetworkACLRuleProtocolAll(action, createdAt, destination, direction, href, id, ipVersion, name, source) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePatchNetworkACLRuleProtocolIcmp successfully`, func() { - action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" - direction := "inbound" + It(`Invoke NewNetworkACLRuleIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePatchNetworkACLRuleProtocolIcmp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + model, err := testService.NewNetworkACLRuleIdentityByHref(href) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLRulePatchNetworkACLRuleProtocolTcpudp successfully`, func() { - action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" - direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" + It(`Invoke NewNetworkACLRuleIdentityByID successfully`, func() { id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePatchNetworkACLRuleProtocolTcpudp(action, createdAt, destination, direction, href, id, ipVersion, name, source) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID successfully`, func() { - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID(id) + model, err := testService.NewNetworkACLRuleIdentityByID(id) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "all" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "icmp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "udp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "all" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "icmp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action, createdAt, destination, direction, href, id, ipVersion, name, source) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkInterfaceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" - model, err := testService.NewNetworkInterfaceIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkInterfaceIdentityByID successfully`, func() { - id := "10c02d81-0ecb-4dc5-897d-28392913b81e" - model, err := testService.NewNetworkInterfaceIdentityByID(id) + protocol := "udp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) @@ -26517,42 +26331,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewSecurityGroupRulePrototypeRemoteCIDR successfully`, func() { cidrBlock := "192.168.3.0/24" model, err := testService.NewSecurityGroupRulePrototypeRemoteCIDR(cidrBlock) @@ -26565,42 +26343,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll successfully`, func() { direction := "inbound" model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction) @@ -26783,60 +26525,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePatchSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewSecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" model, err := testService.NewSecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) @@ -26855,60 +26543,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewVolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity successfully`, func() { var profile vpcclassicv1.VolumeProfileIdentityIntf = nil capacity := int64(100) diff --git a/vpcv1/vpc_v1.go b/vpcv1/vpc_v1.go index 3085af8..6d98469 100644 --- a/vpcv1/vpc_v1.go +++ b/vpcv1/vpc_v1.go @@ -30,7 +30,7 @@ import ( // VpcV1 : The IBM Cloud Virtual Private Cloud (VPC) API can be used to programmatically provision and manage // infrastructure resources, including virtual server instances, subnets, volumes, and load balancers. // -// Version: 2020-06-02 +// Version: 2020-07-28 type VpcV1 struct { Service *core.BaseService @@ -107,7 +107,7 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { } if options.Version == nil { - options.Version = core.StringPtr("2020-06-02") + options.Version = core.StringPtr("2020-07-28") } if options.URL != "" { @@ -1576,7 +1576,8 @@ func (vpc *VpcV1) CreateInstance(createInstanceOptions *CreateInstanceOptions) ( // DeleteInstance : Delete specified instance // This request deletes an instance. This operation cannot be reversed. Any floating IPs associated with the instance's -// network interfaces are implicitly disassociated. +// network interfaces are implicitly disassociated. All flow log collectors with `auto_delete` set to `true` targeting +// the instance and/or the instance's network interfaces are automatically deleted. func (vpc *VpcV1) DeleteInstance(deleteInstanceOptions *DeleteInstanceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceOptions, "deleteInstanceOptions cannot be nil") if err != nil { @@ -1861,7 +1862,7 @@ func (vpc *VpcV1) CreateInstanceAction(createInstanceActionOptions *CreateInstan // network interface card and connects an instance to a subnet. While each network interface can attach to only one // subnet, multiple network interfaces can be created to attach to multiple subnets. Multiple interfaces may also attach // to the same subnet. -func (vpc *VpcV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceCollection, response *core.DetailedResponse, err error) { +func (vpc *VpcV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOptions *ListInstanceNetworkInterfacesOptions) (result *NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listInstanceNetworkInterfacesOptions, "listInstanceNetworkInterfacesOptions cannot be nil") if err != nil { return @@ -1903,7 +1904,7 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOpt if err != nil { return } - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceCollection) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalNetworkInterfaceUnpaginatedCollection) if err != nil { return } @@ -1989,7 +1990,8 @@ func (vpc *VpcV1) CreateInstanceNetworkInterface(createInstanceNetworkInterfaceO // DeleteInstanceNetworkInterface : Delete specified network interface // This request deletes a network interface. This operation cannot be reversed. Any floating IPs associated with the -// network interface are implicitly disassociated. The primary network interface is not allowed to be deleted. +// network interface are implicitly disassociated. All flow log collectors with `auto_delete` set to `true` targeting +// the network interface are automatically deleted. The primary network interface is not allowed to be deleted. func (vpc *VpcV1) DeleteInstanceNetworkInterface(deleteInstanceNetworkInterfaceOptions *DeleteInstanceNetworkInterfaceOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteInstanceNetworkInterfaceOptions, "deleteInstanceNetworkInterfaceOptions cannot be nil") if err != nil { @@ -5178,10 +5180,12 @@ func (vpc *VpcV1) ListPublicGateways(listPublicGatewaysOptions *ListPublicGatewa } // CreatePublicGateway : Create a public gateway -// This request creates a new public gateway from a public gateway prototype object. If a floating IP is provided, it -// must be unbound. If a floating IP is not provided, one will be created and bound to the public gateway. Once a public -// gateway has been created, its floating IP cannot be unbound. A public gateway must be explicitly attached to each -// subnet it will provide connectivity for. +// This request creates a new public gateway from a public gateway prototype object. For this to succeed, the VPC must +// not already have a public gateway in the specified zone. +// +// If a floating IP is provided, it must be unbound. If a floating IP is not provided, one will be created and bound to +// the public gateway. Once a public gateway has been created, its floating IP cannot be unbound. A public gateway must +// be explicitly attached to each subnet it will provide connectivity for. func (vpc *VpcV1) CreatePublicGateway(createPublicGatewayOptions *CreatePublicGatewayOptions) (result *PublicGateway, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createPublicGatewayOptions, "createPublicGatewayOptions cannot be nil") if err != nil { @@ -6045,6 +6049,12 @@ func (vpc *VpcV1) ListSecurityGroupNetworkInterfaces(listSecurityGroupNetworkInt builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) + if listSecurityGroupNetworkInterfacesOptions.Start != nil { + builder.AddQuery("start", fmt.Sprint(*listSecurityGroupNetworkInterfacesOptions.Start)) + } + if listSecurityGroupNetworkInterfacesOptions.Limit != nil { + builder.AddQuery("limit", fmt.Sprint(*listSecurityGroupNetworkInterfacesOptions.Limit)) + } request, err := builder.Build() if err != nil { @@ -6642,7 +6652,9 @@ func (vpc *VpcV1) CreateSubnet(createSubnetOptions *CreateSubnetOptions) (result // DeleteSubnet : Delete specified subnet // This request deletes a subnet. This operation cannot be reversed. For this request to succeed, the subnet must not be // referenced by any network interfaces, VPN gateways, or load balancers. A delete operation automatically detaches the -// subnet from any network ACLs and public gateways. +// subnet from any network ACLs, public gateways, or endpoint gateways. All flow log collectors with `auto_delete` set +// to +// `true` targeting the subnet or any resource in the subnet are automatically deleted. func (vpc *VpcV1) DeleteSubnet(deleteSubnetOptions *DeleteSubnetOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteSubnetOptions, "deleteSubnetOptions cannot be nil") if err != nil { @@ -7211,7 +7223,8 @@ func (vpc *VpcV1) CreateVPC(createVPCOptions *CreateVPCOptions) (result *VPC, re // DeleteVPC : Delete specified VPC // This request deletes a VPC. This operation cannot be reversed. For this request to succeed, the VPC must not contain // any instances, subnets, or public gateways. All security groups and network ACLs associated with the VPC are -// automatically deleted. +// automatically deleted. All flow log collectors with `auto_delete` set to `true` targeting the VPC or any resource in +// the VPC are automatically deleted. func (vpc *VpcV1) DeleteVPC(deleteVPCOptions *DeleteVPCOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPCOptions, "deleteVPCOptions cannot be nil") if err != nil { @@ -7867,15 +7880,15 @@ func (vpc *VpcV1) CreateVPCRoute(createVPCRouteOptions *CreateVPCRouteOptions) ( if createVPCRouteOptions.Destination != nil { body["destination"] = createVPCRouteOptions.Destination } + if createVPCRouteOptions.NextHop != nil { + body["next_hop"] = createVPCRouteOptions.NextHop + } if createVPCRouteOptions.Zone != nil { body["zone"] = createVPCRouteOptions.Zone } if createVPCRouteOptions.Name != nil { body["name"] = createVPCRouteOptions.Name } - if createVPCRouteOptions.NextHop != nil { - body["next_hop"] = createVPCRouteOptions.NextHop - } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -8909,7 +8922,7 @@ func (vpc *VpcV1) CreateVPNGateway(createVPNGatewayOptions *CreateVPNGatewayOpti // DeleteVPNGateway : Delete a VPN gateway // This request deletes a VPN gateway. A VPN gateway with a `status` of `pending` cannot be deleted. This operation -// deletes all VPN connections associated with this VPN gateway. This operation cannot be reversed. +// deletes all VPN gateway connections associated with this VPN gateway. This operation cannot be reversed. func (vpc *VpcV1) DeleteVPNGateway(deleteVPNGatewayOptions *DeleteVPNGatewayOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNGatewayOptions, "deleteVPNGatewayOptions cannot be nil") if err != nil { @@ -9123,8 +9136,8 @@ func (vpc *VpcV1) ListVPNGatewayConnections(listVPNGatewayConnectionsOptions *Li return } -// CreateVPNGatewayConnection : Create a VPN connection -// This request creates a new VPN connection. +// CreateVPNGatewayConnection : Create a VPN gateway connection +// This request creates a new VPN gateway connection. func (vpc *VpcV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions *CreateVPNGatewayConnectionOptions) (result *VPNGatewayConnection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(createVPNGatewayConnectionOptions, "createVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -9177,14 +9190,14 @@ func (vpc *VpcV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions * if createVPNGatewayConnectionOptions.IpsecPolicy != nil { body["ipsec_policy"] = createVPNGatewayConnectionOptions.IpsecPolicy } - if createVPNGatewayConnectionOptions.LocalCidrs != nil { - body["local_cidrs"] = createVPNGatewayConnectionOptions.LocalCidrs + if createVPNGatewayConnectionOptions.LocalCIDRs != nil { + body["local_cidrs"] = createVPNGatewayConnectionOptions.LocalCIDRs } if createVPNGatewayConnectionOptions.Name != nil { body["name"] = createVPNGatewayConnectionOptions.Name } - if createVPNGatewayConnectionOptions.PeerCidrs != nil { - body["peer_cidrs"] = createVPNGatewayConnectionOptions.PeerCidrs + if createVPNGatewayConnectionOptions.PeerCIDRs != nil { + body["peer_cidrs"] = createVPNGatewayConnectionOptions.PeerCIDRs } _, err = builder.SetBodyContentJSON(body) if err != nil { @@ -9210,8 +9223,8 @@ func (vpc *VpcV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions * return } -// DeleteVPNGatewayConnection : Delete a VPN connection -// This request deletes a VPN connection. This operation cannot be reversed. +// DeleteVPNGatewayConnection : Delete a VPN gateway connection +// This request deletes a VPN gateway connection. This operation cannot be reversed. func (vpc *VpcV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions *DeleteVPNGatewayConnectionOptions) (response *core.DetailedResponse, err error) { err = core.ValidateNotNil(deleteVPNGatewayConnectionOptions, "deleteVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -9253,8 +9266,8 @@ func (vpc *VpcV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions * return } -// GetVPNGatewayConnection : Retrieve the specified VPN connection -// This request retrieves a single VPN connection specified by the identifier in the URL. +// GetVPNGatewayConnection : Retrieve the specified VPN gateway connection +// This request retrieves a single VPN gateway connection specified by the identifier in the URL. func (vpc *VpcV1) GetVPNGatewayConnection(getVPNGatewayConnectionOptions *GetVPNGatewayConnectionOptions) (result *VPNGatewayConnection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(getVPNGatewayConnectionOptions, "getVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -9306,8 +9319,8 @@ func (vpc *VpcV1) GetVPNGatewayConnection(getVPNGatewayConnectionOptions *GetVPN return } -// UpdateVPNGatewayConnection : Update a VPN connection -// This request updates the properties of an existing VPN connection. +// UpdateVPNGatewayConnection : Update a VPN gateway connection +// This request updates the properties of an existing VPN gateway connection. func (vpc *VpcV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions *UpdateVPNGatewayConnectionOptions) (result *VPNGatewayConnection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(updateVPNGatewayConnectionOptions, "updateVPNGatewayConnectionOptions cannot be nil") if err != nil { @@ -9387,20 +9400,20 @@ func (vpc *VpcV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions * return } -// ListVPNGatewayConnectionLocalCidrs : List all local CIDRs for a VPN gateway connection +// ListVPNGatewayConnectionLocalCIDRs : List all local CIDRs for a VPN gateway connection // This request lists all local CIDRs for a VPN gateway connection specified by the identifier in the URL. -func (vpc *VpcV1) ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptions *ListVPNGatewayConnectionLocalCidrsOptions) (result *VPNGatewayConnectionLocalCidrs, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(listVPNGatewayConnectionLocalCidrsOptions, "listVPNGatewayConnectionLocalCidrsOptions cannot be nil") +func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) (result *VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(listVPNGatewayConnectionLocalCidrsOptions, "listVPNGatewayConnectionLocalCidrsOptions") + err = core.ValidateStruct(listVPNGatewayConnectionLocalCIDRsOptions, "listVPNGatewayConnectionLocalCIDRsOptions") if err != nil { return } pathSegments := []string{"vpn_gateways", "connections", "local_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionLocalCidrsOptions.VPNGatewayID, *listVPNGatewayConnectionLocalCidrsOptions.ID} + pathParameters := []string{*listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionLocalCIDRsOptions.ID} builder := core.NewRequestBuilder(core.GET) _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) @@ -9408,11 +9421,11 @@ func (vpc *VpcV1) ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLoc return } - for headerName, headerValue := range listVPNGatewayConnectionLocalCidrsOptions.Headers { + for headerName, headerValue := range listVPNGatewayConnectionLocalCIDRsOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionLocalCidrs") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionLocalCIDRs") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -9431,7 +9444,7 @@ func (vpc *VpcV1) ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLoc if err != nil { return } - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCidrs) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionLocalCidRs) if err != nil { return } @@ -9570,20 +9583,20 @@ func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalC return } -// ListVPNGatewayConnectionPeerCidrs : List all peer CIDRs for a VPN gateway connection +// ListVPNGatewayConnectionPeerCIDRs : List all peer CIDRs for a VPN gateway connection // This request lists all peer CIDRs for a VPN gateway connection specified by the identifier in the URL. -func (vpc *VpcV1) ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptions *ListVPNGatewayConnectionPeerCidrsOptions) (result *VPNGatewayConnectionPeerCidrs, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(listVPNGatewayConnectionPeerCidrsOptions, "listVPNGatewayConnectionPeerCidrsOptions cannot be nil") +func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) (result *VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(listVPNGatewayConnectionPeerCidrsOptions, "listVPNGatewayConnectionPeerCidrsOptions") + err = core.ValidateStruct(listVPNGatewayConnectionPeerCIDRsOptions, "listVPNGatewayConnectionPeerCIDRsOptions") if err != nil { return } pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionPeerCidrsOptions.VPNGatewayID, *listVPNGatewayConnectionPeerCidrsOptions.ID} + pathParameters := []string{*listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionPeerCIDRsOptions.ID} builder := core.NewRequestBuilder(core.GET) _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) @@ -9591,11 +9604,11 @@ func (vpc *VpcV1) ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeer return } - for headerName, headerValue := range listVPNGatewayConnectionPeerCidrsOptions.Headers { + for headerName, headerValue := range listVPNGatewayConnectionPeerCIDRsOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionPeerCidrs") + sdkHeaders := common.GetSdkHeaders("vpc", "V1", "ListVPNGatewayConnectionPeerCIDRs") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } @@ -9614,7 +9627,7 @@ func (vpc *VpcV1) ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeer if err != nil { return } - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCidrs) + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalVPNGatewayConnectionPeerCidRs) if err != nil { return } @@ -10236,7 +10249,7 @@ type AddVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -10294,7 +10307,7 @@ type AddVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -10481,7 +10494,7 @@ type CheckVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -10539,7 +10552,7 @@ type CheckVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -10933,7 +10946,8 @@ type CreateInstanceNetworkInterfaceOptions struct { // randomly-selected words. Name *string `json:"name,omitempty"` - // The primary IPv4 address. + // The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If + // unspecified, an available address on the subnet will be automatically selected. PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"` // Collection of security groups. @@ -11547,7 +11561,8 @@ type CreateLoadBalancerOptions struct { // The pools of this load balancer. Pools []LoadBalancerPoolPrototype `json:"pools,omitempty"` - // The resource group for this load balancer. + // 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"` // Allows users to set headers on API requests @@ -12210,6 +12225,9 @@ type CreateVPCRouteOptions struct { // The destination of the route. Must not overlap with destinations for existing user-defined routes within the VPC. Destination *string `json:"destination" validate:"required"` + // The next hop that packets will be delivered to. + NextHop RouteNextHopPrototypeIntf `json:"next_hop" validate:"required"` + // The zone to apply the route to. (Traffic from subnets in this zone will be // subject to this route.). Zone ZoneIdentityIntf `json:"zone" validate:"required"` @@ -12218,18 +12236,16 @@ type CreateVPCRouteOptions struct { // Names must be unique within the VPC routing table the route resides in. Name *string `json:"name,omitempty"` - // The next hop that packets will be delivered to. - NextHop RouteNextHopPrototypeIntf `json:"next_hop,omitempty"` - // Allows users to set headers on API requests Headers map[string]string } // NewCreateVPCRouteOptions : Instantiate CreateVPCRouteOptions -func (*VpcV1) NewCreateVPCRouteOptions(vpcID string, destination string, zone ZoneIdentityIntf) *CreateVPCRouteOptions { +func (*VpcV1) NewCreateVPCRouteOptions(vpcID string, destination string, nextHop RouteNextHopPrototypeIntf, zone ZoneIdentityIntf) *CreateVPCRouteOptions { return &CreateVPCRouteOptions{ VPCID: core.StringPtr(vpcID), Destination: core.StringPtr(destination), + NextHop: nextHop, Zone: zone, } } @@ -12246,6 +12262,12 @@ func (options *CreateVPCRouteOptions) SetDestination(destination string) *Create return options } +// SetNextHop : Allow user to set NextHop +func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions { + options.NextHop = nextHop + return options +} + // SetZone : Allow user to set Zone func (options *CreateVPCRouteOptions) SetZone(zone ZoneIdentityIntf) *CreateVPCRouteOptions { options.Zone = zone @@ -12258,12 +12280,6 @@ func (options *CreateVPCRouteOptions) SetName(name string) *CreateVPCRouteOption return options } -// SetNextHop : Allow user to set NextHop -func (options *CreateVPCRouteOptions) SetNextHop(nextHop RouteNextHopPrototypeIntf) *CreateVPCRouteOptions { - options.NextHop = nextHop - return options -} - // SetHeaders : Allow user to set Headers func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *CreateVPCRouteOptions { options.Headers = param @@ -12295,13 +12311,13 @@ type CreateVPNGatewayConnectionOptions struct { IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` // A collection of local CIDRs for this resource. - LocalCidrs []string `json:"local_cidrs,omitempty"` + LocalCIDRs []string `json:"local_cidrs,omitempty"` - // The user-defined name for this VPN connection. + // The user-defined name for this VPN gateway connection. Name *string `json:"name,omitempty"` // A collection of peer CIDRs for this resource. - PeerCidrs []string `json:"peer_cidrs,omitempty"` + PeerCIDRs []string `json:"peer_cidrs,omitempty"` // Allows users to set headers on API requests Headers map[string]string @@ -12358,9 +12374,9 @@ func (options *CreateVPNGatewayConnectionOptions) SetIpsecPolicy(ipsecPolicy IPs return options } -// SetLocalCidrs : Allow user to set LocalCidrs -func (options *CreateVPNGatewayConnectionOptions) SetLocalCidrs(localCidrs []string) *CreateVPNGatewayConnectionOptions { - options.LocalCidrs = localCidrs +// SetLocalCIDRs : Allow user to set LocalCIDRs +func (options *CreateVPNGatewayConnectionOptions) SetLocalCIDRs(localCIDRs []string) *CreateVPNGatewayConnectionOptions { + options.LocalCIDRs = localCIDRs return options } @@ -12370,9 +12386,9 @@ func (options *CreateVPNGatewayConnectionOptions) SetName(name string) *CreateVP return options } -// SetPeerCidrs : Allow user to set PeerCidrs -func (options *CreateVPNGatewayConnectionOptions) SetPeerCidrs(peerCidrs []string) *CreateVPNGatewayConnectionOptions { - options.PeerCidrs = peerCidrs +// SetPeerCIDRs : Allow user to set PeerCIDRs +func (options *CreateVPNGatewayConnectionOptions) SetPeerCIDRs(peerCIDRs []string) *CreateVPNGatewayConnectionOptions { + options.PeerCIDRs = peerCIDRs return options } @@ -13429,7 +13445,7 @@ type DeleteVPNGatewayConnectionOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests @@ -13490,6 +13506,54 @@ func (options *DeleteVPNGatewayOptions) SetHeaders(param map[string]string) *Del return options } +// EncryptionKeyIdentity : Identifies an encryption key by a unique property. +// Models which "extend" this model: +// - EncryptionKeyIdentityByCRN +type EncryptionKeyIdentity 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 + // Service Root Key](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started) for this resource. + CRN *string `json:"crn,omitempty"` +} + +func (*EncryptionKeyIdentity) isaEncryptionKeyIdentity() bool { + return true +} + +type EncryptionKeyIdentityIntf interface { + isaEncryptionKeyIdentity() bool +} + +// UnmarshalEncryptionKeyIdentity unmarshals an instance of EncryptionKeyIdentity from the specified map of raw messages. +func UnmarshalEncryptionKeyIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EncryptionKeyIdentity) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// EncryptionKeyReference : EncryptionKeyReference struct +type EncryptionKeyReference 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 + // Service Root Key](https://cloud.ibm.com/docs/hs-crypto?topic=hs-crypto-get-started) for this resource. + CRN *string `json:"crn" validate:"required"` +} + +// UnmarshalEncryptionKeyReference unmarshals an instance of EncryptionKeyReference from the specified map of raw messages. +func UnmarshalEncryptionKeyReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(EncryptionKeyReference) + err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // FloatingIP : FloatingIP struct type FloatingIP struct { // The globally unique IP address. @@ -13579,6 +13643,41 @@ func UnmarshalFloatingIP(m map[string]json.RawMessage, result interface{}) (err return } +// FloatingIPByTargetTarget : The network interface this floating IP is to be bound to. +// Models which "extend" this model: +// - FloatingIPByTargetTargetNetworkInterfaceIdentityByID +// - FloatingIPByTargetTargetNetworkInterfaceIdentityByHref +type FloatingIPByTargetTarget struct { + // The unique identifier for this network interface. + ID *string `json:"id,omitempty"` + + // The URL for this network interface. + Href *string `json:"href,omitempty"` +} + +func (*FloatingIPByTargetTarget) isaFloatingIPByTargetTarget() bool { + return true +} + +type FloatingIPByTargetTargetIntf interface { + isaFloatingIPByTargetTarget() bool +} + +// UnmarshalFloatingIPByTargetTarget unmarshals an instance of FloatingIPByTargetTarget from the specified map of raw messages. +func UnmarshalFloatingIPByTargetTarget(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPByTargetTarget) + 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 +} + // FloatingIPCollection : FloatingIPCollection struct type FloatingIPCollection struct { // A reference to the first page of resources. @@ -13659,6 +13758,42 @@ func UnmarshalFloatingIPCollectionNext(m map[string]json.RawMessage, result inte return } +// FloatingIPPatchTargetNetworkInterfaceIdentity : A new network interface to bind this floating IP to, replacing any existing binding. For this request to succeed, the +// existing floating IP must not be required by another resource, such as a public gateway. +// Models which "extend" this model: +// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID +// - FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref +type FloatingIPPatchTargetNetworkInterfaceIdentity struct { + // The unique identifier for this network interface. + ID *string `json:"id,omitempty"` + + // The URL for this network interface. + Href *string `json:"href,omitempty"` +} + +func (*FloatingIPPatchTargetNetworkInterfaceIdentity) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool { + return true +} + +type FloatingIPPatchTargetNetworkInterfaceIdentityIntf interface { + isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool +} + +// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentity from the specified map of raw messages. +func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatchTargetNetworkInterfaceIdentity) + 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 +} + // FloatingIPPrototype : FloatingIPPrototype struct // Models which "extend" this model: // - FloatingIPPrototypeFloatingIPByZone @@ -13675,8 +13810,8 @@ type FloatingIPPrototype struct { // The identity of the zone to provision a floating IP in. Zone ZoneIdentityIntf `json:"zone,omitempty"` - // The target this address is to be bound to. - Target NetworkInterfaceIdentityIntf `json:"target,omitempty"` + // The network interface this floating IP is to be bound to. + Target FloatingIPByTargetTargetIntf `json:"target,omitempty"` } func (*FloatingIPPrototype) isaFloatingIPPrototype() bool { @@ -13702,7 +13837,7 @@ func UnmarshalFloatingIPPrototype(m map[string]json.RawMessage, result interface if err != nil { return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalNetworkInterfaceIdentity) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPByTargetTarget) if err != nil { return } @@ -13772,7 +13907,7 @@ type FloatingIPTarget struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type,omitempty"` // The CRN for this public gateway. @@ -13780,7 +13915,7 @@ type FloatingIPTarget struct { } // Constants associated with the FloatingIPTarget.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FloatingIPTargetResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -13846,6 +13981,9 @@ type FlowLogCollector struct { // Indicates whether this collector is active. Active *bool `json:"active" validate:"required"` + // If set to `true`, this flow log collector will be automatically deleted when the target is deleted. + AutoDelete *bool `json:"auto_delete" validate:"required"` + // The date and time that the flow log collector was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` @@ -13882,13 +14020,14 @@ type FlowLogCollector struct { // Constants associated with the FlowLogCollector.LifecycleState property. // The lifecycle state of the flow log collector. const ( - FlowLogCollectorLifecycleStateDeletedConst = "deleted" - FlowLogCollectorLifecycleStateDeletingConst = "deleting" - FlowLogCollectorLifecycleStateFailedConst = "failed" - FlowLogCollectorLifecycleStatePendingConst = "pending" - FlowLogCollectorLifecycleStateStableConst = "stable" - FlowLogCollectorLifecycleStateUpdatingConst = "updating" - FlowLogCollectorLifecycleStateWaitingConst = "waiting" + FlowLogCollectorLifecycleStateDeletedConst = "deleted" + FlowLogCollectorLifecycleStateDeletingConst = "deleting" + FlowLogCollectorLifecycleStateFailedConst = "failed" + FlowLogCollectorLifecycleStatePendingConst = "pending" + FlowLogCollectorLifecycleStateStableConst = "stable" + FlowLogCollectorLifecycleStateSuspendedConst = "suspended" + FlowLogCollectorLifecycleStateUpdatingConst = "updating" + FlowLogCollectorLifecycleStateWaitingConst = "waiting" ) // UnmarshalFlowLogCollector unmarshals an instance of FlowLogCollector from the specified map of raw messages. @@ -13898,6 +14037,10 @@ func UnmarshalFlowLogCollector(m map[string]json.RawMessage, result interface{}) if err != nil { return } + err = core.UnmarshalPrimitive(m, "auto_delete", &obj.AutoDelete) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return @@ -14086,7 +14229,7 @@ type FlowLogCollectorTarget struct { // The user-defined name for this network interface. Name *string `json:"name,omitempty"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type,omitempty"` // The CRN for this virtual server instance. @@ -14094,7 +14237,7 @@ type FlowLogCollectorTarget struct { } // Constants associated with the FlowLogCollectorTarget.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FlowLogCollectorTargetResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -15393,7 +15536,7 @@ type GetVPNGatewayConnectionOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests @@ -15459,7 +15602,7 @@ type IkePolicy struct { // The authentication algorithm. AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"` - // Collection of references to VPN connections that use this IKE policy. + // Collection of references to VPN gateway connections that use this IKE policy. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this IKE policy was created. @@ -15651,6 +15794,37 @@ func UnmarshalIkePolicyIdentity(m map[string]json.RawMessage, result interface{} return } +// IkePolicyReference : IkePolicyReference struct +type IkePolicyReference struct { + // The IKE policy's canonical URL. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this IKE policy. + ID *string `json:"id" validate:"required"` + + // The user-defined name for this IKE policy. + Name *string `json:"name" validate:"required"` +} + +// UnmarshalIkePolicyReference unmarshals an instance of IkePolicyReference from the specified map of raw messages. +func UnmarshalIkePolicyReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IkePolicyReference) + 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 +} + // IP : IP struct type IP struct { // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this @@ -15675,7 +15849,7 @@ type IPsecPolicy struct { // The authentication algorithm. AuthenticationAlgorithm *string `json:"authentication_algorithm" validate:"required"` - // Collection of references to VPN connections that use this IPsec policy. + // Collection of references to VPN gateway connections that use this IPsec policy. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this IPsec policy was created. @@ -15916,6 +16090,37 @@ func UnmarshalIPsecPolicyIdentity(m map[string]json.RawMessage, result interface return } +// IPsecPolicyReference : IPsecPolicyReference struct +type IPsecPolicyReference struct { + // The IPsec policy's canonical URL. + Href *string `json:"href" validate:"required"` + + // The unique identifier for this IPsec policy. + ID *string `json:"id" validate:"required"` + + // The user-defined name for this IPsec policy. + Name *string `json:"name" validate:"required"` +} + +// UnmarshalIPsecPolicyReference unmarshals an instance of IPsecPolicyReference from the specified map of raw messages. +func UnmarshalIPsecPolicyReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IPsecPolicyReference) + 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 +} + // IkePolicyCollectionFirst : A reference to the first page of resources. type IkePolicyCollectionFirst struct { // The URL for the first page of resources. @@ -17210,9 +17415,12 @@ func UnmarshalInstanceProfileVcpuArchitecture(m map[string]json.RawMessage, resu // Models which "extend" this model: // - InstancePrototypeInstanceByImage type InstancePrototype struct { - // The public SSH keys to install on the virtual server instance. Up to 10 keys may be provided; if no keys are - // provided the instance will be inaccessible unless the image used provides a means of access. For Windows instances, - // one of the keys will be used to encrypt the administrator password. + // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no + // keys are provided the instance will be inaccessible unless the image used provides another means of access. For + // Windows instances, one of the keys will be used to encrypt the administrator password. + // + // 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. Keys []KeyIdentityIntf `json:"keys,omitempty"` // The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the @@ -17487,7 +17695,7 @@ func UnmarshalKeyCollection(m map[string]json.RawMessage, result interface{}) (e // - KeyIdentityByID // - KeyIdentityByCRN // - KeyIdentityByHref -// - KeyIdentityByFingerprint +// - KeyIdentityKeyIdentityByFingerprint type KeyIdentity struct { // The unique identifier for this key. ID *string `json:"id,omitempty"` @@ -18596,6 +18804,12 @@ type ListSecurityGroupNetworkInterfacesOptions struct { // The security group identifier. SecurityGroupID *string `json:"security_group_id" validate:"required"` + // A server-supplied token determining what resource to start the page on. + Start *string `json:"start,omitempty"` + + // The number of resources to return on a page. + Limit *int64 `json:"limit,omitempty"` + // Allows users to set headers on API requests Headers map[string]string } @@ -18613,6 +18827,18 @@ func (options *ListSecurityGroupNetworkInterfacesOptions) SetSecurityGroupID(sec return options } +// SetStart : Allow user to set Start +func (options *ListSecurityGroupNetworkInterfacesOptions) SetStart(start string) *ListSecurityGroupNetworkInterfacesOptions { + options.Start = core.StringPtr(start) + return options +} + +// SetLimit : Allow user to set Limit +func (options *ListSecurityGroupNetworkInterfacesOptions) SetLimit(limit int64) *ListSecurityGroupNetworkInterfacesOptions { + options.Limit = core.Int64Ptr(limit) + return options +} + // SetHeaders : Allow user to set Headers func (options *ListSecurityGroupNetworkInterfacesOptions) SetHeaders(param map[string]string) *ListSecurityGroupNetworkInterfacesOptions { options.Headers = param @@ -18973,78 +19199,78 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt return options } -// ListVPNGatewayConnectionLocalCidrsOptions : The ListVPNGatewayConnectionLocalCidrs options. -type ListVPNGatewayConnectionLocalCidrsOptions struct { +// ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options. +type ListVPNGatewayConnectionLocalCIDRsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// NewListVPNGatewayConnectionLocalCidrsOptions : Instantiate ListVPNGatewayConnectionLocalCidrsOptions -func (*VpcV1) NewListVPNGatewayConnectionLocalCidrsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionLocalCidrsOptions { - return &ListVPNGatewayConnectionLocalCidrsOptions{ +// NewListVPNGatewayConnectionLocalCIDRsOptions : Instantiate ListVPNGatewayConnectionLocalCIDRsOptions +func (*VpcV1) NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionLocalCIDRsOptions { + return &ListVPNGatewayConnectionLocalCIDRsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (options *ListVPNGatewayConnectionLocalCidrsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCidrsOptions { +func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionLocalCIDRsOptions { options.VPNGatewayID = core.StringPtr(vpnGatewayID) return options } // SetID : Allow user to set ID -func (options *ListVPNGatewayConnectionLocalCidrsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCidrsOptions { +func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionLocalCIDRsOptions { options.ID = core.StringPtr(id) return options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionLocalCidrsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionLocalCidrsOptions { +func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionLocalCIDRsOptions { options.Headers = param return options } -// ListVPNGatewayConnectionPeerCidrsOptions : The ListVPNGatewayConnectionPeerCidrs options. -type ListVPNGatewayConnectionPeerCidrsOptions struct { +// ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options. +type ListVPNGatewayConnectionPeerCIDRsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// NewListVPNGatewayConnectionPeerCidrsOptions : Instantiate ListVPNGatewayConnectionPeerCidrsOptions -func (*VpcV1) NewListVPNGatewayConnectionPeerCidrsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionPeerCidrsOptions { - return &ListVPNGatewayConnectionPeerCidrsOptions{ +// NewListVPNGatewayConnectionPeerCIDRsOptions : Instantiate ListVPNGatewayConnectionPeerCIDRsOptions +func (*VpcV1) NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID string, id string) *ListVPNGatewayConnectionPeerCIDRsOptions { + return &ListVPNGatewayConnectionPeerCIDRsOptions{ VPNGatewayID: core.StringPtr(vpnGatewayID), ID: core.StringPtr(id), } } // SetVPNGatewayID : Allow user to set VPNGatewayID -func (options *ListVPNGatewayConnectionPeerCidrsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCidrsOptions { +func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetVPNGatewayID(vpnGatewayID string) *ListVPNGatewayConnectionPeerCIDRsOptions { options.VPNGatewayID = core.StringPtr(vpnGatewayID) return options } // SetID : Allow user to set ID -func (options *ListVPNGatewayConnectionPeerCidrsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCidrsOptions { +func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetID(id string) *ListVPNGatewayConnectionPeerCIDRsOptions { options.ID = core.StringPtr(id) return options } // SetHeaders : Allow user to set Headers -func (options *ListVPNGatewayConnectionPeerCidrsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionPeerCidrsOptions { +func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[string]string) *ListVPNGatewayConnectionPeerCIDRsOptions { options.Headers = param return options } @@ -19054,7 +19280,7 @@ type ListVPNGatewayConnectionsOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // Filters the collection to VPN connections with the specified status. + // Filters the collection to VPN gateway connections with the specified status. Status *string `json:"status,omitempty"` // Allows users to set headers on API requests @@ -20253,10 +20479,6 @@ type LoadBalancerPoolHealthMonitorPatch struct { Timeout *int64 `json:"timeout" validate:"required"` // The protocol type of this load balancer pool health monitor. - // - // 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 health monitor on which - // the unexpected property value was encountered. Type *string `json:"type" validate:"required"` // The health check URL. This is applicable only to `http` type of health monitor. @@ -20265,10 +20487,6 @@ type LoadBalancerPoolHealthMonitorPatch struct { // Constants associated with the LoadBalancerPoolHealthMonitorPatch.Type property. // The protocol type of this load balancer pool health monitor. -// -// 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 health monitor on which -// the unexpected property value was encountered. const ( LoadBalancerPoolHealthMonitorPatchTypeHTTPConst = "http" LoadBalancerPoolHealthMonitorPatchTypeHTTPSConst = "https" @@ -20333,10 +20551,6 @@ type LoadBalancerPoolHealthMonitorPrototype struct { Timeout *int64 `json:"timeout" validate:"required"` // The protocol type of this load balancer pool health monitor. - // - // 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 health monitor on which - // the unexpected property value was encountered. Type *string `json:"type" validate:"required"` // The health check URL. This is applicable only to `http` type of health monitor. @@ -20345,10 +20559,6 @@ type LoadBalancerPoolHealthMonitorPrototype struct { // Constants associated with the LoadBalancerPoolHealthMonitorPrototype.Type property. // The protocol type of this load balancer pool health monitor. -// -// 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 health monitor on which -// the unexpected property value was encountered. const ( LoadBalancerPoolHealthMonitorPrototypeTypeHTTPConst = "http" LoadBalancerPoolHealthMonitorPrototypeTypeHTTPSConst = "https" @@ -20948,7 +21158,7 @@ type NetworkACL struct { // The user-defined name for this network ACL. Name *string `json:"name" validate:"required"` - // The resource group for this Network ACL. + // The resource group for this network ACL. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` // The ordered rules for this network ACL. If no rules exist, all traffic will be denied. @@ -21226,9 +21436,9 @@ func UnmarshalNetworkACLReference(m map[string]json.RawMessage, result interface // NetworkACLRule : NetworkACLRule struct // Models which "extend" this model: -// - NetworkACLRuleProtocolTcpudp -// - NetworkACLRuleProtocolIcmp -// - NetworkACLRuleProtocolAll +// - NetworkACLRuleNetworkACLRuleProtocolTcpudp +// - NetworkACLRuleNetworkACLRuleProtocolIcmp +// - NetworkACLRuleNetworkACLRuleProtocolAll type NetworkACLRule struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -21259,7 +21469,7 @@ type NetworkACLRule struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -21336,13 +21546,13 @@ func UnmarshalNetworkACLRule(m map[string]json.RawMessage, result interface{}) ( return } if discValue == "all" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolAll) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolAll) } else if discValue == "icmp" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolIcmp) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolIcmp) } else if discValue == "tcp" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) } else if discValue == "udp" { - err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalNetworkACLRuleNetworkACLRuleProtocolTcpudp) } else { err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) } @@ -21429,6 +21639,41 @@ func UnmarshalNetworkACLRuleCollectionNext(m map[string]json.RawMessage, result return } +// NetworkACLRuleIdentity : Identifies a network ACL rule by a unique property. +// Models which "extend" this model: +// - NetworkACLRuleIdentityByID +// - NetworkACLRuleIdentityByHref +type NetworkACLRuleIdentity struct { + // The unique identifier for this Network ACL rule. + ID *string `json:"id,omitempty"` + + // The URL for this Network ACL rule. + Href *string `json:"href,omitempty"` +} + +func (*NetworkACLRuleIdentity) isaNetworkACLRuleIdentity() bool { + return true +} + +type NetworkACLRuleIdentityIntf interface { + isaNetworkACLRuleIdentity() bool +} + +// UnmarshalNetworkACLRuleIdentity unmarshals an instance of NetworkACLRuleIdentity from the specified map of raw messages. +func UnmarshalNetworkACLRuleIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRuleIdentity) + 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 +} + // NetworkACLRuleItem : NetworkACLRuleItem struct // Models which "extend" this model: // - NetworkACLRuleItemNetworkACLRuleProtocolTcpudp @@ -21465,7 +21710,7 @@ type NetworkACLRuleItem struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -21555,41 +21800,6 @@ func UnmarshalNetworkACLRuleItem(m map[string]json.RawMessage, result interface{ return } -// NetworkACLRulePatchBefore : The rule to move this rule immediately before. Specify `null` to move this rule after all existing rules. -// Models which "extend" this model: -// - NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID -// - NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref -type NetworkACLRulePatchBefore struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` -} - -func (*NetworkACLRulePatchBefore) isaNetworkACLRulePatchBefore() bool { - return true -} - -type NetworkACLRulePatchBeforeIntf interface { - isaNetworkACLRulePatchBefore() bool -} - -// UnmarshalNetworkACLRulePatchBefore unmarshals an instance of NetworkACLRulePatchBefore from the specified map of raw messages. -func UnmarshalNetworkACLRulePatchBefore(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePatchBefore) - 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 -} - // NetworkACLRulePrototype : NetworkACLRulePrototype struct // Models which "extend" this model: // - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp @@ -21601,7 +21811,7 @@ type NetworkACLRulePrototype struct { // The rule to insert this rule immediately before. If omitted, this rule will be // inserted after all existing rules. - Before NetworkACLRulePrototypeBeforeIntf `json:"before,omitempty"` + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` @@ -21614,23 +21824,11 @@ type NetworkACLRulePrototype struct { Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` - // The date and time that the rule was created. - CreatedAt *strfmt.DateTime `json:"created_at,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` - - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The IP version for this rule. - IPVersion *string `json:"ip_version,omitempty"` - // The inclusive upper bound of TCP/UDP destination port range. DestinationPortMax *int64 `json:"destination_port_max,omitempty"` @@ -21674,13 +21872,6 @@ const ( NetworkACLRulePrototypeProtocolUDPConst = "udp" ) -// Constants associated with the NetworkACLRulePrototype.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeIPVersionIpv6Const = "ipv6" -) - func (*NetworkACLRulePrototype) isaNetworkACLRulePrototype() bool { return true } @@ -21716,41 +21907,6 @@ func UnmarshalNetworkACLRulePrototype(m map[string]json.RawMessage, result inter return } -// NetworkACLRulePrototypeBefore : The rule to insert this rule immediately before. If omitted, this rule will be inserted after all existing rules. -// Models which "extend" this model: -// - NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID -// - NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref -type NetworkACLRulePrototypeBefore struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` -} - -func (*NetworkACLRulePrototypeBefore) isaNetworkACLRulePrototypeBefore() bool { - return true -} - -type NetworkACLRulePrototypeBeforeIntf interface { - isaNetworkACLRulePrototypeBefore() bool -} - -// UnmarshalNetworkACLRulePrototypeBefore unmarshals an instance of NetworkACLRulePrototypeBefore from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeBefore(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeBefore) - 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 -} - // NetworkACLRulePrototypeNetworkACLContext : NetworkACLRulePrototypeNetworkACLContext struct // Models which "extend" this model: // - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp @@ -21771,26 +21927,11 @@ type NetworkACLRulePrototypeNetworkACLContext struct { Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" 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,omitempty"` - - // The URL for this Network ACL rule. - Href *string `json:"href,omitempty"` - - // The unique identifier for this Network ACL rule. - ID *string `json:"id,omitempty"` - - // The IP version for this rule. - IPVersion *string `json:"ip_version,omitempty"` - // The inclusive upper bound of TCP/UDP destination port range. DestinationPortMax *int64 `json:"destination_port_max,omitempty"` @@ -21834,13 +21975,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextProtocolUDPConst = "udp" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContext.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextIPVersionIpv6Const = "ipv6" -) - func (*NetworkACLRulePrototypeNetworkACLContext) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -21888,17 +22022,6 @@ type NetworkACLRuleReference struct { Name *string `json:"name" validate:"required"` } -// NewNetworkACLRuleReference : Instantiate NetworkACLRuleReference (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRuleReference(href string, id string, name string) (model *NetworkACLRuleReference, err error) { - model = &NetworkACLRuleReference{ - Href: core.StringPtr(href), - ID: core.StringPtr(id), - Name: core.StringPtr(name), - } - err = core.ValidateStruct(model, "required parameters") - return -} - // UnmarshalNetworkACLRuleReference unmarshals an instance of NetworkACLRuleReference from the specified map of raw messages. func UnmarshalNetworkACLRuleReference(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkACLRuleReference) @@ -21941,7 +22064,7 @@ type NetworkInterface struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // Collection of security groups. @@ -21958,7 +22081,7 @@ type NetworkInterface struct { } // Constants associated with the NetworkInterface.ResourceType property. -// The type of resource referenced. +// The resource type. const ( NetworkInterfaceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -22035,48 +22158,76 @@ func UnmarshalNetworkInterface(m map[string]json.RawMessage, result interface{}) // NetworkInterfaceCollection : NetworkInterfaceCollection struct type NetworkInterfaceCollection struct { + // A reference to the first page of resources. + First *NetworkInterfaceCollectionFirst `json:"first" validate:"required"` + + // The maximum number of resources that can be returned by the request. + Limit *int64 `json:"limit" validate:"required"` + // Collection of network interfaces. NetworkInterfaces []NetworkInterface `json:"network_interfaces" validate:"required"` + + // A reference to the next page of resources; this reference is included for all pages + // except the last page. + Next *NetworkInterfaceCollectionNext `json:"next,omitempty"` + + // The total number of resources across all pages. + TotalCount *int64 `json:"total_count" validate:"required"` } // UnmarshalNetworkInterfaceCollection unmarshals an instance of NetworkInterfaceCollection from the specified map of raw messages. func UnmarshalNetworkInterfaceCollection(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(NetworkInterfaceCollection) + err = core.UnmarshalModel(m, "first", &obj.First, UnmarshalNetworkInterfaceCollectionFirst) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "limit", &obj.Limit) + if err != nil { + return + } err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface) if err != nil { return } + err = core.UnmarshalModel(m, "next", &obj.Next, UnmarshalNetworkInterfaceCollectionNext) + 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 } -// NetworkInterfaceIdentity : Identifies a network interface by a unique property. -// Models which "extend" this model: -// - NetworkInterfaceIdentityByID -// - NetworkInterfaceIdentityByHref -type NetworkInterfaceIdentity struct { - // The unique identifier for this network interface. - ID *string `json:"id,omitempty"` - - // The URL for this network interface. - Href *string `json:"href,omitempty"` +// NetworkInterfaceCollectionFirst : A reference to the first page of resources. +type NetworkInterfaceCollectionFirst struct { + // The URL for the first page of resources. + Href *string `json:"href" validate:"required"` } -func (*NetworkInterfaceIdentity) isaNetworkInterfaceIdentity() bool { - return true +// UnmarshalNetworkInterfaceCollectionFirst unmarshals an instance of NetworkInterfaceCollectionFirst from the specified map of raw messages. +func UnmarshalNetworkInterfaceCollectionFirst(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkInterfaceCollectionFirst) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return } -type NetworkInterfaceIdentityIntf interface { - isaNetworkInterfaceIdentity() bool +// NetworkInterfaceCollectionNext : A reference to the next page of resources; this reference is included for all pages except the last page. +type NetworkInterfaceCollectionNext struct { + // The URL for the next page of resources. + Href *string `json:"href" validate:"required"` } -// UnmarshalNetworkInterfaceIdentity unmarshals an instance of NetworkInterfaceIdentity from the specified map of raw messages. -func UnmarshalNetworkInterfaceIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkInterfaceIdentity) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } +// UnmarshalNetworkInterfaceCollectionNext unmarshals an instance of NetworkInterfaceCollectionNext from the specified map of raw messages. +func UnmarshalNetworkInterfaceCollectionNext(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkInterfaceCollectionNext) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return @@ -22099,7 +22250,7 @@ type NetworkInterfaceInstanceContextReference struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The associated subnet. @@ -22107,7 +22258,7 @@ type NetworkInterfaceInstanceContextReference struct { } // Constants associated with the NetworkInterfaceInstanceContextReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( NetworkInterfaceInstanceContextReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -22149,7 +22300,8 @@ type NetworkInterfacePrototype struct { // randomly-selected words. Name *string `json:"name,omitempty"` - // The primary IPv4 address. + // The primary IPv4 address. If specified, it must be an available address on the network interface's subnet. If + // unspecified, an available address on the subnet will be automatically selected. PrimaryIpv4Address *string `json:"primary_ipv4_address,omitempty"` // Collection of security groups. @@ -22205,12 +22357,12 @@ type NetworkInterfaceReference struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the NetworkInterfaceReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( NetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -22242,6 +22394,23 @@ func UnmarshalNetworkInterfaceReference(m map[string]json.RawMessage, result int return } +// NetworkInterfaceUnpaginatedCollection : NetworkInterfaceUnpaginatedCollection struct +type NetworkInterfaceUnpaginatedCollection struct { + // Collection of network interfaces. + NetworkInterfaces []NetworkInterface `json:"network_interfaces" validate:"required"` +} + +// UnmarshalNetworkInterfaceUnpaginatedCollection unmarshals an instance of NetworkInterfaceUnpaginatedCollection from the specified map of raw messages. +func UnmarshalNetworkInterfaceUnpaginatedCollection(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkInterfaceUnpaginatedCollection) + err = core.UnmarshalModel(m, "network_interfaces", &obj.NetworkInterfaces, UnmarshalNetworkInterface) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // OperatingSystem : OperatingSystem struct type OperatingSystem struct { // The operating system architecture. @@ -22432,7 +22601,7 @@ type PublicGateway struct { // The resource group for this public gateway. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` // The status of the volume. @@ -22446,7 +22615,7 @@ type PublicGateway struct { } // Constants associated with the PublicGateway.ResourceType property. -// The type of resource referenced. +// The resource type. const ( PublicGatewayResourceTypePublicGatewayConst = "public_gateway" ) @@ -22758,12 +22927,12 @@ type PublicGatewayReference struct { // The user-defined name for this public gateway. Name *string `json:"name" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the PublicGatewayReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( PublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway" ) @@ -22972,7 +23141,7 @@ type RemoveVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -23030,7 +23199,7 @@ type RemoveVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // The address prefix part of the CIDR. @@ -23259,13 +23428,14 @@ type Route struct { // Constants associated with the Route.LifecycleState property. // The lifecycle state of the route. const ( - RouteLifecycleStateDeletedConst = "deleted" - RouteLifecycleStateDeletingConst = "deleting" - RouteLifecycleStateFailedConst = "failed" - RouteLifecycleStatePendingConst = "pending" - RouteLifecycleStateStableConst = "stable" - RouteLifecycleStateUpdatingConst = "updating" - RouteLifecycleStateWaitingConst = "waiting" + RouteLifecycleStateDeletedConst = "deleted" + RouteLifecycleStateDeletingConst = "deleting" + RouteLifecycleStateFailedConst = "failed" + RouteLifecycleStatePendingConst = "pending" + RouteLifecycleStateStableConst = "stable" + RouteLifecycleStateSuspendedConst = "suspended" + RouteLifecycleStateUpdatingConst = "updating" + RouteLifecycleStateWaitingConst = "waiting" ) // UnmarshalRoute unmarshals an instance of Route from the specified map of raw messages. @@ -23353,7 +23523,7 @@ func UnmarshalRouteNextHop(m map[string]json.RawMessage, result interface{}) (er return } -// RouteNextHopPrototype : RouteNextHopPrototype struct +// RouteNextHopPrototype : The next hop packets will be routed to. // Models which "extend" this model: // - RouteNextHopPrototypeRouteNextHopIP type RouteNextHopPrototype struct { @@ -23618,9 +23788,9 @@ func UnmarshalSecurityGroupReference(m map[string]json.RawMessage, result interf // SecurityGroupRule : SecurityGroupRule struct // Models which "extend" this model: -// - SecurityGroupRuleProtocolAll -// - SecurityGroupRuleProtocolIcmp -// - SecurityGroupRuleProtocolTcpudp +// - SecurityGroupRuleSecurityGroupRuleProtocolAll +// - SecurityGroupRuleSecurityGroupRuleProtocolIcmp +// - SecurityGroupRuleSecurityGroupRuleProtocolTcpudp type SecurityGroupRule struct { // The direction of traffic to enforce, either `inbound` or `outbound`. Direction *string `json:"direction" validate:"required"` @@ -23704,13 +23874,13 @@ func UnmarshalSecurityGroupRule(m map[string]json.RawMessage, result interface{} return } if discValue == "all" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolAll) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolAll) } else if discValue == "icmp" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolIcmp) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolIcmp) } else if discValue == "tcp" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) } else if discValue == "udp" { - err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleProtocolTcpudp) + err = core.UnmarshalModel(m, "", result, UnmarshalSecurityGroupRuleSecurityGroupRuleProtocolTcpudp) } else { err = fmt.Errorf("unrecognized value for discriminator property 'protocol': %s", discValue) } @@ -23955,195 +24125,6 @@ func UnmarshalSecurityGroupRulePrototypeRemote(m map[string]json.RawMessage, res return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote : The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used -// to allow traffic from any source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIntf interface { - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote : The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used -// to allow traffic from any source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIntf interface { - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote : The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used -// to allow traffic from any source (or to any source, for outbound rules). -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote 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,omitempty"` - - // 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,omitempty"` - - // 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIntf interface { - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - 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 -} - // SecurityGroupRuleRemote : The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be // specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` allows traffic from any // source (or to any source, for outbound rules). @@ -24274,7 +24255,7 @@ type Subnet struct { IPVersion *string `json:"ip_version" validate:"required"` // The IPv4 range of the subnet, expressed in CIDR format. - Ipv4CIDRBlock *string `json:"ipv4_cidr_block,omitempty"` + Ipv4CIDRBlock *string `json:"ipv4_cidr_block" validate:"required"` // The user-defined name for this subnet. Name *string `json:"name" validate:"required"` @@ -24683,10 +24664,10 @@ type UpdateFloatingIPOptions struct { // The unique user-defined name for this floating IP. Name *string `json:"name,omitempty"` - // A new target to bind this floating IP with, replacing any existing binding. + // A new network interface to bind this floating IP to, replacing any existing binding. // For this request to succeed, the existing floating IP must not be required by another // resource, such as a public gateway. - Target NetworkInterfaceIdentityIntf `json:"target,omitempty"` + Target FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"` // Allows users to set headers on API requests Headers map[string]string @@ -24712,7 +24693,7 @@ func (options *UpdateFloatingIPOptions) SetName(name string) *UpdateFloatingIPOp } // SetTarget : Allow user to set Target -func (options *UpdateFloatingIPOptions) SetTarget(target NetworkInterfaceIdentityIntf) *UpdateFloatingIPOptions { +func (options *UpdateFloatingIPOptions) SetTarget(target FloatingIPPatchTargetNetworkInterfaceIdentityIntf) *UpdateFloatingIPOptions { options.Target = target return options } @@ -25730,7 +25711,7 @@ type UpdateNetworkACLRuleOptions struct { // The rule to move this rule immediately before. Specify `null` to move this rule after // all existing rules. - Before NetworkACLRulePatchBeforeIntf `json:"before,omitempty"` + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` // The ICMP traffic code to allow. Code *int64 `json:"code,omitempty"` @@ -25807,7 +25788,7 @@ func (options *UpdateNetworkACLRuleOptions) SetAction(action string) *UpdateNetw } // SetBefore : Allow user to set Before -func (options *UpdateNetworkACLRuleOptions) SetBefore(before NetworkACLRulePatchBeforeIntf) *UpdateNetworkACLRuleOptions { +func (options *UpdateNetworkACLRuleOptions) SetBefore(before NetworkACLRuleIdentityIntf) *UpdateNetworkACLRuleOptions { options.Before = before return options } @@ -26312,7 +26293,7 @@ type UpdateVPNGatewayConnectionOptions struct { // The VPN gateway identifier. VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` - // The VPN connection identifier. + // The VPN gateway connection identifier. ID *string `json:"id" validate:"required"` // If set to false, the VPN connection is shut down. @@ -26328,7 +26309,7 @@ type UpdateVPNGatewayConnectionOptions struct { // autonegotiation. IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` - // The user-defined name for this VPN connection. + // The user-defined name for this VPN gateway connection. Name *string `json:"name,omitempty"` // The IP address of the peer VPN gateway. @@ -26732,7 +26713,7 @@ func UnmarshalVPCReference(m map[string]json.RawMessage, result interface{}) (er // VPNGateway : VPNGateway struct type VPNGateway struct { - // Collection of references to VPN connections. + // Collection of references to VPN gateway connections. Connections []VPNGatewayConnectionReference `json:"connections" validate:"required"` // The date and time that this VPN gateway was created. @@ -26906,7 +26887,7 @@ type VPNGatewayConnection struct { // The authentication mode. Only `psk` is currently supported. AuthenticationMode *string `json:"authentication_mode" validate:"required"` - // The date and time that this VPN connection was created. + // The date and time that this VPN gateway connection was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` // The Dead Peer Detection settings. @@ -26919,23 +26900,23 @@ type VPNGatewayConnection struct { ID *string `json:"id" validate:"required"` // Optional IKE policy configuration. The absence of a policy indicates autonegotiation. - IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"` + IkePolicy *IkePolicyReference `json:"ike_policy,omitempty"` // Optional IPsec policy configuration. The absence of a policy indicates // autonegotiation. - IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` + IpsecPolicy *IPsecPolicyReference `json:"ipsec_policy,omitempty"` // A collection of local CIDRs for this resource. - LocalCidrs []string `json:"local_cidrs" validate:"required"` + LocalCIDRs []string `json:"local_cidrs" validate:"required"` - // The user-defined name for this VPN connection. + // The user-defined name for this VPN gateway connection. Name *string `json:"name" validate:"required"` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` // A collection of peer CIDRs for this resource. - PeerCidrs []string `json:"peer_cidrs" validate:"required"` + PeerCIDRs []string `json:"peer_cidrs" validate:"required"` // The preshared key. Psk *string `json:"psk" validate:"required"` @@ -26993,15 +26974,15 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac if err != nil { return } - err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity) + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyReference) if err != nil { return } - err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity) + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyReference) if err != nil { return } - err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCidrs) + err = core.UnmarshalPrimitive(m, "local_cidrs", &obj.LocalCIDRs) if err != nil { return } @@ -27013,7 +26994,7 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac if err != nil { return } - err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCidrs) + err = core.UnmarshalPrimitive(m, "peer_cidrs", &obj.PeerCIDRs) if err != nil { return } @@ -27033,9 +27014,9 @@ func UnmarshalVPNGatewayConnection(m map[string]json.RawMessage, result interfac return } -// VPNGatewayConnectionCollection : Collection of VPN connections in a VPN gateway. +// VPNGatewayConnectionCollection : Collection of VPN gateway connections in a VPN gateway. type VPNGatewayConnectionCollection struct { - // Array of VPN connections. + // Array of VPN gateway connections. Connections []VPNGatewayConnection `json:"connections" validate:"required"` } @@ -27130,16 +27111,16 @@ func UnmarshalVPNGatewayConnectionDpdPrototype(m map[string]json.RawMessage, res return } -// VPNGatewayConnectionLocalCidrs : VPNGatewayConnectionLocalCidrs struct -type VPNGatewayConnectionLocalCidrs struct { +// VPNGatewayConnectionLocalCIDRs : VPNGatewayConnectionLocalCIDRs struct +type VPNGatewayConnectionLocalCIDRs struct { // A collection of local CIDRs for this resource. - LocalCidrs []string `json:"local_cidrs,omitempty"` + 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) +// 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 } @@ -27147,16 +27128,16 @@ func UnmarshalVPNGatewayConnectionLocalCidrs(m map[string]json.RawMessage, resul return } -// VPNGatewayConnectionPeerCidrs : VPNGatewayConnectionPeerCidrs struct -type VPNGatewayConnectionPeerCidrs struct { +// VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct +type VPNGatewayConnectionPeerCIDRs struct { // A collection of peer CIDRs for this resource. - PeerCidrs []string `json:"peer_cidrs,omitempty"` + 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) +// 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 } @@ -27229,6 +27210,12 @@ type Volume struct { // The type of encryption used on the volume. Encryption *string `json:"encryption" validate:"required"` + // A reference to 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 URL for this volume. Href *string `json:"href" validate:"required"` @@ -27292,6 +27279,10 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro if err != nil { return } + err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return @@ -27552,6 +27543,12 @@ type VolumeAttachmentPrototypeInstanceContextVolume struct { // The URL for this volume. Href *string `json:"href,omitempty"` + // The identity of the root key to use to wrap the data encryption key for the volume. + // + // If this property is not provided, the `encryption` type for the volume will be + // `provider_managed`. + EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` + // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` @@ -27589,6 +27586,10 @@ func UnmarshalVolumeAttachmentPrototypeInstanceContextVolume(m map[string]json.R 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 @@ -28014,6 +28015,12 @@ func UnmarshalVolumeProfileReference(m map[string]json.RawMessage, result interf // Models which "extend" this model: // - VolumePrototypeVolumeByCapacity type VolumePrototype struct { + // The identity of the root key to use to wrap the data encryption key for the volume. + // + // If this property is not provided, the `encryption` type for the volume will be + // `provider_managed`. + EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` + // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` @@ -28046,6 +28053,10 @@ type VolumePrototypeIntf interface { // 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.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return @@ -28080,6 +28091,12 @@ type VolumePrototypeInstanceByImageContext struct { // updating volumes may expand in the future. Capacity *int64 `json:"capacity,omitempty"` + // The identity of the root key to use to wrap the data encryption key for the volume. + // + // If this property is not provided, the `encryption` type for the volume will be + // `provider_managed`. + EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` + // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` @@ -28106,6 +28123,10 @@ func UnmarshalVolumePrototypeInstanceByImageContext(m map[string]json.RawMessage 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 @@ -28344,6 +28365,163 @@ func UnmarshalCloudObjectStorageBucketIdentityByName(m map[string]json.RawMessag 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 + // Service 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 (*VpcV1) 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 +} + +// FloatingIPByTargetTargetNetworkInterfaceIdentityByHref : FloatingIPByTargetTargetNetworkInterfaceIdentityByHref struct +// This model "extends" FloatingIPByTargetTarget +type FloatingIPByTargetTargetNetworkInterfaceIdentityByHref struct { + // The URL for this network interface. + Href *string `json:"href" validate:"required"` +} + +// NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref : Instantiate FloatingIPByTargetTargetNetworkInterfaceIdentityByHref (Generic Model Constructor) +func (*VpcV1) NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref(href string) (model *FloatingIPByTargetTargetNetworkInterfaceIdentityByHref, err error) { + model = &FloatingIPByTargetTargetNetworkInterfaceIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPByTargetTargetNetworkInterfaceIdentityByHref) isaFloatingIPByTargetTarget() bool { + return true +} + +// UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPByTargetTargetNetworkInterfaceIdentityByHref from the specified map of raw messages. +func UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPByTargetTargetNetworkInterfaceIdentityByHref) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// FloatingIPByTargetTargetNetworkInterfaceIdentityByID : FloatingIPByTargetTargetNetworkInterfaceIdentityByID struct +// This model "extends" FloatingIPByTargetTarget +type FloatingIPByTargetTargetNetworkInterfaceIdentityByID struct { + // The unique identifier for this network interface. + ID *string `json:"id" validate:"required"` +} + +// NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID : Instantiate FloatingIPByTargetTargetNetworkInterfaceIdentityByID (Generic Model Constructor) +func (*VpcV1) NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID(id string) (model *FloatingIPByTargetTargetNetworkInterfaceIdentityByID, err error) { + model = &FloatingIPByTargetTargetNetworkInterfaceIdentityByID{ + ID: core.StringPtr(id), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPByTargetTargetNetworkInterfaceIdentityByID) isaFloatingIPByTargetTarget() bool { + return true +} + +// UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPByTargetTargetNetworkInterfaceIdentityByID from the specified map of raw messages. +func UnmarshalFloatingIPByTargetTargetNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPByTargetTargetNetworkInterfaceIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct +// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity +type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { + // The URL for this network interface. + Href *string `json:"href" validate:"required"` +} + +// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) +func (*VpcV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { + model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool { + return true +} + +// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. +func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) + err = core.UnmarshalPrimitive(m, "href", &obj.Href) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct +// This model "extends" FloatingIPPatchTargetNetworkInterfaceIdentity +type FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { + // The unique identifier for this network interface. + ID *string `json:"id" validate:"required"` +} + +// NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) +func (*VpcV1) NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { + model = &FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ + ID: core.StringPtr(id), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFloatingIPPatchTargetNetworkInterfaceIdentity() bool { + return true +} + +// UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. +func UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // FloatingIPPrototypeFloatingIPByTarget : FloatingIPPrototypeFloatingIPByTarget struct // This model "extends" FloatingIPPrototype type FloatingIPPrototypeFloatingIPByTarget struct { @@ -28355,12 +28533,12 @@ type FloatingIPPrototypeFloatingIPByTarget struct { // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` - // The target this address is to be bound to. - Target NetworkInterfaceIdentityIntf `json:"target" validate:"required"` + // The network interface this floating IP is to be bound to. + Target FloatingIPByTargetTargetIntf `json:"target" validate:"required"` } // NewFloatingIPPrototypeFloatingIPByTarget : Instantiate FloatingIPPrototypeFloatingIPByTarget (Generic Model Constructor) -func (*VpcV1) NewFloatingIPPrototypeFloatingIPByTarget(target NetworkInterfaceIdentityIntf) (model *FloatingIPPrototypeFloatingIPByTarget, err error) { +func (*VpcV1) NewFloatingIPPrototypeFloatingIPByTarget(target FloatingIPByTargetTargetIntf) (model *FloatingIPPrototypeFloatingIPByTarget, err error) { model = &FloatingIPPrototypeFloatingIPByTarget{ Target: target, } @@ -28383,7 +28561,7 @@ func UnmarshalFloatingIPPrototypeFloatingIPByTarget(m map[string]json.RawMessage if err != nil { return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalNetworkInterfaceIdentity) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPByTargetTarget) if err != nil { return } @@ -28453,12 +28631,12 @@ type FloatingIPTargetNetworkInterfaceReference struct { // The primary IPv4 address. PrimaryIpv4Address *string `json:"primary_ipv4_address" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetNetworkInterfaceReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FloatingIPTargetNetworkInterfaceReferenceResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -28509,12 +28687,12 @@ type FloatingIPTargetPublicGatewayReference struct { // The user-defined name for this public gateway. Name *string `json:"name" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FloatingIPTargetPublicGatewayReference.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FloatingIPTargetPublicGatewayReferenceResourceTypePublicGatewayConst = "public_gateway" ) @@ -28601,8 +28779,8 @@ func UnmarshalFlowLogCollectorPrototypeTargetInstanceIdentity(m map[string]json. // FlowLogCollectorPrototypeTargetNetworkInterfaceIdentity : Identifies a network interface by a unique property. // Models which "extend" this model: -// - FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID -// - FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref +// - FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID +// - FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref // This model "extends" FlowLogCollectorPrototypeTarget type FlowLogCollectorPrototypeTargetNetworkInterfaceIdentity struct { // The unique identifier for this network interface. @@ -28793,12 +28971,12 @@ type FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext struct { // The user-defined name for this network interface. Name *string `json:"name" validate:"required"` - // The type of resource referenced. + // The resource type. ResourceType *string `json:"resource_type" validate:"required"` } // Constants associated with the FlowLogCollectorTargetNetworkInterfaceReferenceTargetContext.ResourceType property. -// The type of resource referenced. +// The resource type. const ( FlowLogCollectorTargetNetworkInterfaceReferenceTargetContextResourceTypeNetworkInterfaceConst = "network_interface" ) @@ -29802,9 +29980,12 @@ func UnmarshalInstanceProfileVcpuRange(m map[string]json.RawMessage, result inte // InstancePrototypeInstanceByImage : InstancePrototypeInstanceByImage struct // This model "extends" InstancePrototype type InstancePrototypeInstanceByImage struct { - // The public SSH keys to install on the virtual server instance. Up to 10 keys may be provided; if no keys are - // provided the instance will be inaccessible unless the image used provides a means of access. For Windows instances, - // one of the keys will be used to encrypt the administrator password. + // The public SSH keys for the administrative user of the virtual server instance. Up to 10 keys may be provided; if no + // keys are provided the instance will be inaccessible unless the image used provides another means of access. For + // Windows instances, one of the keys will be used to encrypt the administrator password. + // + // 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. Keys []KeyIdentityIntf `json:"keys,omitempty"` // The unique user-defined name for this virtual server instance (and default system hostname). If unspecified, the @@ -29945,38 +30126,6 @@ func UnmarshalKeyIdentityByCRN(m map[string]json.RawMessage, result interface{}) 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 (*VpcV1) 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 { @@ -30039,6 +30188,38 @@ func UnmarshalKeyIdentityByID(m map[string]json.RawMessage, result interface{}) return } +// KeyIdentityKeyIdentityByFingerprint : KeyIdentityKeyIdentityByFingerprint struct +// This model "extends" KeyIdentity +type KeyIdentityKeyIdentityByFingerprint 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"` +} + +// NewKeyIdentityKeyIdentityByFingerprint : Instantiate KeyIdentityKeyIdentityByFingerprint (Generic Model Constructor) +func (*VpcV1) NewKeyIdentityKeyIdentityByFingerprint(fingerprint string) (model *KeyIdentityKeyIdentityByFingerprint, err error) { + model = &KeyIdentityKeyIdentityByFingerprint{ + Fingerprint: core.StringPtr(fingerprint), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*KeyIdentityKeyIdentityByFingerprint) isaKeyIdentity() bool { + return true +} + +// UnmarshalKeyIdentityKeyIdentityByFingerprint unmarshals an instance of KeyIdentityKeyIdentityByFingerprint from the specified map of raw messages. +func UnmarshalKeyIdentityKeyIdentityByFingerprint(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(KeyIdentityKeyIdentityByFingerprint) + err = core.UnmarshalPrimitive(m, "fingerprint", &obj.Fingerprint) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint : KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct // This model "extends" KeyReferenceInstanceInitializationContext type KeyReferenceInstanceInitializationContextKeyIdentityByFingerprint struct { @@ -30650,122 +30831,61 @@ func UnmarshalNetworkACLPrototypeNetworkACLBySourceNetworkACL(m map[string]json. return } -// NetworkACLRuleItemNetworkACLRuleProtocolAll : NetworkACLRuleItemNetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRuleItem -type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { - // Whether to allow or deny matching traffic. - 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Destination *string `json:"destination" validate:"required"` - - // Whether the traffic to be matched is `inbound` or `outbound`. - Direction *string `json:"direction" validate:"required"` - +// NetworkACLRuleIdentityByHref : NetworkACLRuleIdentityByHref struct +// This model "extends" NetworkACLRuleIdentity +type NetworkACLRuleIdentityByHref struct { // 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If - // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` - - // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` - - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. - Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Action property. -// Whether to allow or deny matching traffic. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRuleItemNetworkACLRuleProtocolAllActionDenyConst = "deny" -) - -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Direction property. -// Whether the traffic to be matched is `inbound` or `outbound`. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" -) - -// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Protocol property. -// The protocol to enforce. -const ( - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolUDPConst = "udp" -) +// NewNetworkACLRuleIdentityByHref : Instantiate NetworkACLRuleIdentityByHref (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRuleIdentityByHref, err error) { + model = &NetworkACLRuleIdentityByHref{ + Href: core.StringPtr(href), + } + err = core.ValidateStruct(model, "required parameters") + return +} -func (*NetworkACLRuleItemNetworkACLRuleProtocolAll) isaNetworkACLRuleItem() bool { +func (*NetworkACLRuleIdentityByHref) isaNetworkACLRuleIdentity() 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 - } +// UnmarshalNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRuleIdentityByHref from the specified map of raw messages. +func UnmarshalNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRuleIdentityByHref) 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, "protocol", &obj.Protocol) - if err != nil { - return + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// NetworkACLRuleIdentityByID : NetworkACLRuleIdentityByID struct +// This model "extends" NetworkACLRuleIdentity +type NetworkACLRuleIdentityByID struct { + // The unique identifier for this Network ACL rule. + ID *string `json:"id" validate:"required"` +} + +// NewNetworkACLRuleIdentityByID : Instantiate NetworkACLRuleIdentityByID (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRuleIdentityByID(id string) (model *NetworkACLRuleIdentityByID, err error) { + model = &NetworkACLRuleIdentityByID{ + ID: core.StringPtr(id), } - err = core.UnmarshalPrimitive(m, "source", &obj.Source) + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRuleIdentityByID) isaNetworkACLRuleIdentity() bool { + return true +} + +// UnmarshalNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRuleIdentityByID from the specified map of raw messages. +func UnmarshalNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRuleIdentityByID) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return } @@ -30773,13 +30893,14 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolAll(m map[string]json.RawM return } -// NetworkACLRuleItemNetworkACLRuleProtocolIcmp : NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct +// NetworkACLRuleItemNetworkACLRuleProtocolAll : NetworkACLRuleItemNetworkACLRuleProtocolAll struct // This model "extends" NetworkACLRuleItem -type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { +type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` - // The rule that this rule is immediately before. If absent, this is the last rule. + // 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. @@ -30805,7 +30926,131 @@ type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` + + // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Source *string `json:"source" validate:"required"` +} + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Action property. +// Whether to allow or deny matching traffic. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRuleItemNetworkACLRuleProtocolAllActionDenyConst = "deny" +) + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Direction property. +// Whether the traffic to be matched is `inbound` or `outbound`. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRuleItemNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" +) + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.IPVersion property. +// The IP version for this rule. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" + NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" +) + +// Constants associated with the NetworkACLRuleItemNetworkACLRuleProtocolAll.Protocol property. +// The protocol to enforce. +const ( + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRuleItemNetworkACLRuleProtocolAllProtocolUDPConst = "udp" +) + +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, "protocol", &obj.Protocol) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "source", &obj.Source) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// NetworkACLRuleItemNetworkACLRuleProtocolIcmp : NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRuleItem +type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { + // Whether to allow or deny matching traffic. + 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + Destination *string `json:"destination" validate:"required"` + + // Whether the traffic to be matched is `inbound` or `outbound`. + 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If + // unspecified, the name will be a hyphenated list of randomly-selected words. + Name *string `json:"name" validate:"required"` + + // The protocol to enforce. + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -30917,7 +31162,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` - // The rule that this rule is immediately before. If absent, this is the last rule. + // 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. @@ -30943,7 +31189,7 @@ type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -31062,155 +31308,76 @@ func UnmarshalNetworkACLRuleItemNetworkACLRuleProtocolTcpudp(m map[string]json.R return } -// NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref : NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref struct -// This model "extends" NetworkACLRulePatchBefore -type NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref struct { - // The URL for this Network ACL rule. - Href *string `json:"href" validate:"required"` -} - -// NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref, err error) { - model = &NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref) isaNetworkACLRulePatchBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref from the specified map of raw messages. -func UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID : NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID struct -// This model "extends" NetworkACLRulePatchBefore -type NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id" validate:"required"` -} - -// NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID : Instantiate NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID(id string) (model *NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID, err error) { - model = &NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) isaNetworkACLRulePatchBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID from the specified map of raw messages. -func UnmarshalNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRuleProtocolAll : NetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRule -type NetworkACLRuleProtocolAll struct { +// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct +// This model "extends" NetworkACLRulePrototypeNetworkACLContext +type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRuleProtocolAll.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRuleProtocolAllActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRuleProtocolAll.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRuleProtocolAll.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - NetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRuleProtocolAllProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -func (*NetworkACLRuleProtocolAll) isaNetworkACLRule() bool { +// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) { + model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{ + Action: core.StringPtr(action), + Destination: core.StringPtr(destination), + Direction: core.StringPtr(direction), + Protocol: core.StringPtr(protocol), + Source: core.StringPtr(source), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } -// UnmarshalNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRuleProtocolAll from the specified map of raw messages. -func UnmarshalNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleProtocolAll) +// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) 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 @@ -31219,18 +31386,6 @@ func UnmarshalNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result int 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 @@ -31247,41 +31402,26 @@ func UnmarshalNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result int return } -// NetworkACLRuleProtocolIcmp : NetworkACLRuleProtocolIcmp struct -// This model "extends" NetworkACLRule -type NetworkACLRuleProtocolIcmp struct { +// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRulePrototypeNetworkACLContext +type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -31292,55 +31432,53 @@ type NetworkACLRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the NetworkACLRuleProtocolIcmp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRuleProtocolIcmpActionAllowConst = "allow" - NetworkACLRuleProtocolIcmpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRuleProtocolIcmp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" - NetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleProtocolIcmp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRuleProtocolIcmp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - NetworkACLRuleProtocolIcmpProtocolAllConst = "all" - NetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" - NetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" - NetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -func (*NetworkACLRuleProtocolIcmp) isaNetworkACLRule() bool { +// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) { + model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{ + Action: core.StringPtr(action), + Destination: core.StringPtr(destination), + Direction: core.StringPtr(direction), + Protocol: core.StringPtr(protocol), + Source: core.StringPtr(source), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } -// UnmarshalNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleProtocolIcmp) +// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) 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 @@ -31349,18 +31487,6 @@ func UnmarshalNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result in 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 @@ -31385,41 +31511,26 @@ func UnmarshalNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result in return } -// NetworkACLRuleProtocolTcpudp : NetworkACLRuleProtocolTcpudp struct -// This model "extends" NetworkACLRule -type NetworkACLRuleProtocolTcpudp struct { +// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct +// This model "extends" NetworkACLRulePrototypeNetworkACLContext +type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. 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 CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. @@ -31435,55 +31546,53 @@ type NetworkACLRuleProtocolTcpudp struct { SourcePortMin *int64 `json:"source_port_min,omitempty"` } -// Constants associated with the NetworkACLRuleProtocolTcpudp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRuleProtocolTcpudpActionAllowConst = "allow" - NetworkACLRuleProtocolTcpudpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRuleProtocolTcpudp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" - NetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRuleProtocolTcpudp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRuleProtocolTcpudp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - NetworkACLRuleProtocolTcpudpProtocolAllConst = "all" - NetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" - NetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" - NetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -func (*NetworkACLRuleProtocolTcpudp) isaNetworkACLRule() bool { +// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) { + model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{ + Action: core.StringPtr(action), + Destination: core.StringPtr(destination), + Direction: core.StringPtr(direction), + Protocol: core.StringPtr(protocol), + Source: core.StringPtr(source), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } -// UnmarshalNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRuleProtocolTcpudp) +// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) 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 @@ -31492,18 +31601,6 @@ func UnmarshalNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result 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 @@ -31536,169 +31633,81 @@ func UnmarshalNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result return } -// NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref : NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref struct -// This model "extends" NetworkACLRulePrototypeBefore -type NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref struct { - // The URL for this Network ACL rule. - Href *string `json:"href" validate:"required"` -} - -// NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref : Instantiate NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref(href string) (model *NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref, err error) { - model = &NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref) isaNetworkACLRulePrototypeBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref unmarshals an instance of NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID : NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID struct -// This model "extends" NetworkACLRulePrototypeBefore -type NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID struct { - // The unique identifier for this Network ACL rule. - ID *string `json:"id" validate:"required"` -} - -// NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID : Instantiate NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID(id string) (model *NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID, err error) { - model = &NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID) isaNetworkACLRulePrototypeBefore() bool { - return true -} - -// UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID unmarshals an instance of NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRulePrototypeNetworkACLContext -type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll struct { +// NetworkACLRulePrototypeNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct +// This model "extends" NetworkACLRulePrototype +type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. 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 rule to insert this rule immediately before. If omitted, this rule will be + // inserted after all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{ +// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) { + model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{ Action: core.StringPtr(action), - CreatedAt: createdAt, Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), + Protocol: core.StringPtr(protocol), Source: core.StringPtr(source), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool { +func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) - err = core.UnmarshalPrimitive(m, "action", &obj.Action) - if err != nil { - return - } - err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleReference) +// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAll from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAll) + err = core.UnmarshalPrimitive(m, "action", &obj.Action) if err != nil { return } - err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -31710,18 +31719,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll( 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 @@ -31738,41 +31735,30 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll( return } -// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct -// This model "extends" NetworkACLRulePrototypeNetworkACLContext -type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct { +// NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRulePrototype +type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. 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 rule to insert this rule immediately before. If omitted, this rule will be + // inserted after all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -31783,69 +31769,54 @@ type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{ +// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) { + model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{ Action: core.StringPtr(action), - CreatedAt: createdAt, Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), + Protocol: core.StringPtr(protocol), Source: core.StringPtr(source), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool { +func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) +// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) 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) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -31857,18 +31828,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp 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 @@ -31893,41 +31852,30 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp return } -// NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct -// This model "extends" NetworkACLRulePrototypeNetworkACLContext -type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct { +// NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct +// This model "extends" NetworkACLRulePrototype +type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. 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 rule to insert this rule immediately before. If omitted, this rule will be + // inserted after all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` - // The destination CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The destination IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Destination *string `json:"destination" validate:"required"` // Whether the traffic to be matched is `inbound` or `outbound`. 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 user-defined name for this rule. Names must be unique within the network ACL the rule resides in. If // unspecified, the name will be a hyphenated list of randomly-selected words. - Name *string `json:"name" validate:"required"` + Name *string `json:"name,omitempty"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` - // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. + // The source IP address or CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` // The inclusive upper bound of TCP/UDP destination port range. @@ -31943,69 +31891,54 @@ type NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp struct SourcePortMin *int64 `json:"source_port_min,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Action property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Direction property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" -) - -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.IPVersion property. -// The IP version for this rule. -const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp.Protocol property. +// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" + NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{ +// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor) +func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, protocol string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) { + model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{ Action: core.StringPtr(action), - CreatedAt: createdAt, Destination: core.StringPtr(destination), Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), + Protocol: core.StringPtr(protocol), Source: core.StringPtr(source), } err = core.ValidateStruct(model, "required parameters") return } -func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool { +func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) +// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp from the specified map of raw messages. +func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) 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) + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) if err != nil { return } @@ -32017,18 +31950,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpu 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 @@ -32061,9 +31982,9 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpu return } -// NetworkACLRulePrototypeNetworkACLRuleProtocolAll : NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct -// This model "extends" NetworkACLRulePrototype -type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { +// NetworkACLRuleNetworkACLRuleProtocolAll : NetworkACLRuleNetworkACLRuleProtocolAll struct +// This model "extends" NetworkACLRule +type NetworkACLRuleNetworkACLRuleProtocolAll struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -32093,66 +32014,49 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Action property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllActionDenyConst = "deny" + NetworkACLRuleNetworkACLRuleProtocolAllActionAllowConst = "allow" + NetworkACLRuleNetworkACLRuleProtocolAllActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Direction property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" + NetworkACLRuleNetworkACLRuleProtocolAllDirectionInboundConst = "inbound" + NetworkACLRuleNetworkACLRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.IPVersion property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.IPVersion property. // The IP version for this rule. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" + NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv4Const = "ipv4" + NetworkACLRuleNetworkACLRuleProtocolAllIPVersionIpv6Const = "ipv6" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolAll.Protocol property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolUDPConst = "udp" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolAllConst = "all" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolIcmpConst = "icmp" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolTCPConst = "tcp" + NetworkACLRuleNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool { +func (*NetworkACLRuleNetworkACLRuleProtocolAll) isaNetworkACLRule() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolAll from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolAll) +// 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 @@ -32201,9 +32105,9 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolAll(m map[string]json return } -// NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct -// This model "extends" NetworkACLRulePrototype -type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { +// NetworkACLRuleNetworkACLRuleProtocolIcmp : NetworkACLRuleNetworkACLRuleProtocolIcmp struct +// This model "extends" NetworkACLRule +type NetworkACLRuleNetworkACLRuleProtocolIcmp struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -32233,7 +32137,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -32246,60 +32150,43 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Action property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpActionDenyConst = "deny" + NetworkACLRuleNetworkACLRuleProtocolIcmpActionAllowConst = "allow" + NetworkACLRuleNetworkACLRuleProtocolIcmpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Direction property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" + NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionInboundConst = "inbound" + NetworkACLRuleNetworkACLRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.IPVersion property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.IPVersion property. // The IP version for this rule. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" + NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv4Const = "ipv4" + NetworkACLRuleNetworkACLRuleProtocolIcmpIPVersionIpv6Const = "ipv6" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp.Protocol property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolAllConst = "all" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolIcmpConst = "icmp" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolTCPConst = "tcp" + NetworkACLRuleNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool { +func (*NetworkACLRuleNetworkACLRuleProtocolIcmp) isaNetworkACLRule() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) +// 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 @@ -32356,9 +32243,9 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(m map[string]jso return } -// NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct -// This model "extends" NetworkACLRulePrototype -type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { +// NetworkACLRuleNetworkACLRuleProtocolTcpudp : NetworkACLRuleNetworkACLRuleProtocolTcpudp struct +// This model "extends" NetworkACLRule +type NetworkACLRuleNetworkACLRuleProtocolTcpudp struct { // Whether to allow or deny matching traffic. Action *string `json:"action" validate:"required"` @@ -32388,7 +32275,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { Name *string `json:"name" validate:"required"` // The protocol to enforce. - Protocol *string `json:"protocol,omitempty"` + Protocol *string `json:"protocol" validate:"required"` // The source CIDR block. The CIDR block `0.0.0.0/0` applies to all addresses. Source *string `json:"source" validate:"required"` @@ -32406,60 +32293,43 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { SourcePortMin *int64 `json:"source_port_min,omitempty"` } -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Action property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Action property. // Whether to allow or deny matching traffic. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" + NetworkACLRuleNetworkACLRuleProtocolTcpudpActionAllowConst = "allow" + NetworkACLRuleNetworkACLRuleProtocolTcpudpActionDenyConst = "deny" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Direction property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Direction property. // Whether the traffic to be matched is `inbound` or `outbound`. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" + NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionInboundConst = "inbound" + NetworkACLRuleNetworkACLRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.IPVersion property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.IPVersion property. // The IP version for this rule. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" + NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" + NetworkACLRuleNetworkACLRuleProtocolTcpudpIPVersionIpv6Const = "ipv6" ) -// Constants associated with the NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp.Protocol property. +// Constants associated with the NetworkACLRuleNetworkACLRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolAllConst = "all" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolIcmpConst = "icmp" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolTCPConst = "tcp" + NetworkACLRuleNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, createdAt *strfmt.DateTime, destination string, direction string, href string, id string, ipVersion string, name string, source string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - CreatedAt: createdAt, - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Href: core.StringPtr(href), - ID: core.StringPtr(id), - IPVersion: core.StringPtr(ipVersion), - Name: core.StringPtr(name), - Source: core.StringPtr(source), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool { +func (*NetworkACLRuleNetworkACLRuleProtocolTcpudp) isaNetworkACLRule() bool { return true } -// UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp unmarshals an instance of NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) +// 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 @@ -32524,68 +32394,6 @@ func UnmarshalNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(m map[string]j return } -// NetworkInterfaceIdentityByHref : NetworkInterfaceIdentityByHref struct -// This model "extends" NetworkInterfaceIdentity -type NetworkInterfaceIdentityByHref struct { - // The URL for this network interface. - Href *string `json:"href" validate:"required"` -} - -// NewNetworkInterfaceIdentityByHref : Instantiate NetworkInterfaceIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewNetworkInterfaceIdentityByHref(href string) (model *NetworkInterfaceIdentityByHref, err error) { - model = &NetworkInterfaceIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkInterfaceIdentityByHref) isaNetworkInterfaceIdentity() bool { - return true -} - -// UnmarshalNetworkInterfaceIdentityByHref unmarshals an instance of NetworkInterfaceIdentityByHref from the specified map of raw messages. -func UnmarshalNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkInterfaceIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// NetworkInterfaceIdentityByID : NetworkInterfaceIdentityByID struct -// This model "extends" NetworkInterfaceIdentity -type NetworkInterfaceIdentityByID struct { - // The unique identifier for this network interface. - ID *string `json:"id" validate:"required"` -} - -// NewNetworkInterfaceIdentityByID : Instantiate NetworkInterfaceIdentityByID (Generic Model Constructor) -func (*VpcV1) NewNetworkInterfaceIdentityByID(id string) (model *NetworkInterfaceIdentityByID, err error) { - model = &NetworkInterfaceIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*NetworkInterfaceIdentityByID) isaNetworkInterfaceIdentity() bool { - return true -} - -// UnmarshalNetworkInterfaceIdentityByID unmarshals an instance of NetworkInterfaceIdentityByID from the specified map of raw messages. -func UnmarshalNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(NetworkInterfaceIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // OperatingSystemIdentityByHref : OperatingSystemIdentityByHref struct // This model "extends" OperatingSystemIdentity type OperatingSystemIdentityByHref struct { @@ -33126,19 +32934,128 @@ func UnmarshalSecurityGroupRulePatchRemoteSecurityGroupIdentity(m map[string]jso return } -// SecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or +// SecurityGroupRulePrototypeRemoteCIDR : SecurityGroupRulePrototypeRemoteCIDR struct +// This model "extends" SecurityGroupRulePrototypeRemote +type SecurityGroupRulePrototypeRemoteCIDR 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"` +} + +// NewSecurityGroupRulePrototypeRemoteCIDR : Instantiate SecurityGroupRulePrototypeRemoteCIDR (Generic Model Constructor) +func (*VpcV1) NewSecurityGroupRulePrototypeRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeRemoteCIDR, err error) { + model = &SecurityGroupRulePrototypeRemoteCIDR{ + CIDRBlock: core.StringPtr(cidrBlock), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*SecurityGroupRulePrototypeRemoteCIDR) isaSecurityGroupRulePrototypeRemote() bool { + return true +} + +// UnmarshalSecurityGroupRulePrototypeRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeRemoteCIDR from the specified map of raw messages. +func UnmarshalSecurityGroupRulePrototypeRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupRulePrototypeRemoteCIDR) + err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupRulePrototypeRemoteIP : SecurityGroupRulePrototypeRemoteIP struct +// This model "extends" SecurityGroupRulePrototypeRemote +type SecurityGroupRulePrototypeRemoteIP 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"` +} + +// NewSecurityGroupRulePrototypeRemoteIP : Instantiate SecurityGroupRulePrototypeRemoteIP (Generic Model Constructor) +func (*VpcV1) NewSecurityGroupRulePrototypeRemoteIP(address string) (model *SecurityGroupRulePrototypeRemoteIP, err error) { + model = &SecurityGroupRulePrototypeRemoteIP{ + Address: core.StringPtr(address), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*SecurityGroupRulePrototypeRemoteIP) isaSecurityGroupRulePrototypeRemote() bool { + return true +} + +// UnmarshalSecurityGroupRulePrototypeRemoteIP unmarshals an instance of SecurityGroupRulePrototypeRemoteIP from the specified map of raw messages. +func UnmarshalSecurityGroupRulePrototypeRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupRulePrototypeRemoteIP) + err = core.UnmarshalPrimitive(m, "address", &obj.Address) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// SecurityGroupRulePrototypeRemoteSecurityGroupIdentity : Identifies a security group by a unique property. +// Models which "extend" this model: +// - SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByID +// - SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN +// - SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByHref +// This model "extends" SecurityGroupRulePrototypeRemote +type SecurityGroupRulePrototypeRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeRemoteSecurityGroupIdentity() bool { + return true +} + +type SecurityGroupRulePrototypeRemoteSecurityGroupIdentityIntf interface { + SecurityGroupRulePrototypeRemoteIntf + isaSecurityGroupRulePrototypeRemoteSecurityGroupIdentity() bool +} + +func (*SecurityGroupRulePrototypeRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeRemote() bool { + return true +} + +// UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeRemoteSecurityGroupIdentity from the specified map of raw messages. +func UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupRulePrototypeRemoteSecurityGroupIdentity) + 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 +} + +// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or // `code`. -// This model "extends" SecurityGroupRule -type SecurityGroupRuleProtocolAll struct { +// This model "extends" SecurityGroupRulePrototype +type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct { // The direction of traffic to enforce, either `inbound` or `outbound`. 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 field, 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. @@ -33147,55 +33064,57 @@ type SecurityGroupRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be - // specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` allows traffic from any - // source (or to any source, for outbound rules). - Remote interface{} `json:"remote" validate:"required"` + // The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic + // from any source (or to any source, for outbound rules). + Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` } -// Constants associated with the SecurityGroupRuleProtocolAll.Direction property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Direction property. // The direction of traffic to enforce, either `inbound` or `outbound`. const ( - SecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" - SecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the SecurityGroupRuleProtocolAll.IPVersion property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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 ( - SecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4" ) -// Constants associated with the SecurityGroupRuleProtocolAll.Protocol property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - SecurityGroupRuleProtocolAllProtocolAllConst = "all" - SecurityGroupRuleProtocolAllProtocolIcmpConst = "icmp" - SecurityGroupRuleProtocolAllProtocolTCPConst = "tcp" - SecurityGroupRuleProtocolAllProtocolUDPConst = "udp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolAllConst = "all" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolIcmpConst = "icmp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolTCPConst = "tcp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolUDPConst = "udp" ) -func (*SecurityGroupRuleProtocolAll) isaSecurityGroupRule() bool { +// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll (Generic Model Constructor) +func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll, err error) { + model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll{ + Direction: core.StringPtr(direction), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) isaSecurityGroupRulePrototype() bool { return true } -// UnmarshalSecurityGroupRuleProtocolAll unmarshals an instance of SecurityGroupRuleProtocolAll from the specified map of raw messages. -func UnmarshalSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRuleProtocolAll) +// 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, "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 @@ -33204,7 +33123,7 @@ func UnmarshalSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result if err != nil { return } - err = core.UnmarshalPrimitive(m, "remote", &obj.Remote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeRemote) if err != nil { return } @@ -33212,21 +33131,15 @@ func UnmarshalSecurityGroupRuleProtocolAll(m map[string]json.RawMessage, result return } -// SecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code` +// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code` // may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types // and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all // codes. -// This model "extends" SecurityGroupRule -type SecurityGroupRuleProtocolIcmp struct { +// This model "extends" SecurityGroupRulePrototype +type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct { // The direction of traffic to enforce, either `inbound` or `outbound`. 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 field, 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. @@ -33235,10 +33148,11 @@ type SecurityGroupRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be - // specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` allows traffic from any - // source (or to any source, for outbound rules). - Remote interface{} `json:"remote" validate:"required"` + // The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic + // from any source (or to any source, for outbound rules). + Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The ICMP traffic code to allow. Code *int64 `json:"code,omitempty"` @@ -33247,49 +33161,50 @@ type SecurityGroupRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the SecurityGroupRuleProtocolIcmp.Direction property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Direction property. // The direction of traffic to enforce, either `inbound` or `outbound`. const ( - SecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" - SecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the SecurityGroupRuleProtocolIcmp.IPVersion property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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 ( - SecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4" ) -// Constants associated with the SecurityGroupRuleProtocolIcmp.Protocol property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - SecurityGroupRuleProtocolIcmpProtocolAllConst = "all" - SecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" - SecurityGroupRuleProtocolIcmpProtocolTCPConst = "tcp" - SecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolAllConst = "all" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolTCPConst = "tcp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" ) -func (*SecurityGroupRuleProtocolIcmp) isaSecurityGroupRule() bool { +// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp (Generic Model Constructor) +func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp, err error) { + model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp{ + Direction: core.StringPtr(direction), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) isaSecurityGroupRulePrototype() bool { return true } -// UnmarshalSecurityGroupRuleProtocolIcmp unmarshals an instance of SecurityGroupRuleProtocolIcmp from the specified map of raw messages. -func UnmarshalSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRuleProtocolIcmp) +// 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, "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 @@ -33298,7 +33213,7 @@ func UnmarshalSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result if err != nil { return } - err = core.UnmarshalPrimitive(m, "remote", &obj.Remote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeRemote) if err != nil { return } @@ -33314,20 +33229,14 @@ func UnmarshalSecurityGroupRuleProtocolIcmp(m map[string]json.RawMessage, result return } -// SecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and +// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and // `port_max`. Either both should be set, or neither. When neither is set then traffic is allowed on all ports. For a // single port, set both to the same value. -// This model "extends" SecurityGroupRule -type SecurityGroupRuleProtocolTcpudp struct { +// This model "extends" SecurityGroupRulePrototype +type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct { // The direction of traffic to enforce, either `inbound` or `outbound`. 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 field, 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. @@ -33336,10 +33245,11 @@ type SecurityGroupRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The IP addresses or security groups from which this rule allows traffic (or to which, for outbound rules). Can be - // specified as an IP address, a CIDR block, or a security group. A CIDR block of `0.0.0.0/0` allows traffic from any - // source (or to any source, for outbound rules). - Remote interface{} `json:"remote" validate:"required"` + // The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic + // from any source (or to any source, for outbound rules). + Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The inclusive upper bound of TCP/UDP port range. PortMax *int64 `json:"port_max,omitempty"` @@ -33348,49 +33258,50 @@ type SecurityGroupRuleProtocolTcpudp struct { PortMin *int64 `json:"port_min,omitempty"` } -// Constants associated with the SecurityGroupRuleProtocolTcpudp.Direction property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Direction property. // The direction of traffic to enforce, either `inbound` or `outbound`. const ( - SecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" - SecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the SecurityGroupRuleProtocolTcpudp.IPVersion property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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 ( - SecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" ) -// Constants associated with the SecurityGroupRuleProtocolTcpudp.Protocol property. +// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - SecurityGroupRuleProtocolTcpudpProtocolAllConst = "all" - SecurityGroupRuleProtocolTcpudpProtocolIcmpConst = "icmp" - SecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" - SecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolAllConst = "all" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolIcmpConst = "icmp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" + SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" ) -func (*SecurityGroupRuleProtocolTcpudp) isaSecurityGroupRule() bool { +// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp (Generic Model Constructor) +func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp, err error) { + model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp{ + Direction: core.StringPtr(direction), + } + err = core.ValidateStruct(model, "required parameters") + return +} + +func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRulePrototype() bool { return true } -// UnmarshalSecurityGroupRuleProtocolTcpudp unmarshals an instance of SecurityGroupRuleProtocolTcpudp from the specified map of raw messages. -func UnmarshalSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRuleProtocolTcpudp) +// 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, "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 @@ -33399,7 +33310,7 @@ func UnmarshalSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, resu if err != nil { return } - err = core.UnmarshalPrimitive(m, "remote", &obj.Remote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeRemote) if err != nil { return } @@ -33415,146 +33326,22 @@ func UnmarshalSecurityGroupRuleProtocolTcpudp(m map[string]json.RawMessage, resu return } -// SecurityGroupRulePrototypeRemoteCIDR : SecurityGroupRulePrototypeRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeRemote -type SecurityGroupRulePrototypeRemoteCIDR 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"` -} - -// NewSecurityGroupRulePrototypeRemoteCIDR : Instantiate SecurityGroupRulePrototypeRemoteCIDR (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeRemoteCIDR) isaSecurityGroupRulePrototypeRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeRemoteIP : SecurityGroupRulePrototypeRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeRemote -type SecurityGroupRulePrototypeRemoteIP 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"` -} - -// NewSecurityGroupRulePrototypeRemoteIP : Instantiate SecurityGroupRulePrototypeRemoteIP (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeRemoteIP(address string) (model *SecurityGroupRulePrototypeRemoteIP, err error) { - model = &SecurityGroupRulePrototypeRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeRemoteIP) isaSecurityGroupRulePrototypeRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeRemoteIP unmarshals an instance of SecurityGroupRulePrototypeRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeRemote -type SecurityGroupRulePrototypeRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePrototypeRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeRemoteIntf - isaSecurityGroupRulePrototypeRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePrototypeRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeRemoteSecurityGroupIdentity) - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR struct { +// 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"` } -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { +func (*SecurityGroupRuleRemoteCIDR) isaSecurityGroupRuleRemote() bool { return true } -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR) +// 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 @@ -33563,31 +33350,22 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(m return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP struct { +// 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"` } -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(address string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { +func (*SecurityGroupRuleRemoteIP) isaSecurityGroupRuleRemote() bool { return true } -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP) +// 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 @@ -33596,158 +33374,29 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(m m return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity struct { - // The unique identifier for this security group. - ID *string `json:"id,omitempty"` - +// SecurityGroupRuleRemoteSecurityGroupReference : SecurityGroupRuleRemoteSecurityGroupReference struct +// This model "extends" SecurityGroupRuleRemote +type SecurityGroupRuleRemoteSecurityGroupReference struct { // The security group's CRN. - CRN *string `json:"crn,omitempty"` + CRN *string `json:"crn" validate:"required"` // The security group's canonical URL. - Href *string `json:"href,omitempty"` -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIntf - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity) - 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 -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP(address string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} + Href *string `json:"href" validate:"required"` -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} + ID *string `json:"id" validate:"required"` -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIntf - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool + // The user-defined name for this security group. Names must be unique within the VPC the security group resides in. + Name *string `json:"name" validate:"required"` } -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { +func (*SecurityGroupRuleRemoteSecurityGroupReference) isaSecurityGroupRuleRemote() bool { return true } -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } +// 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 @@ -33756,118 +33405,11 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecur if err != nil { return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR(cidrBlock string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR{ - CIDRBlock: core.StringPtr(cidrBlock), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR) - err = core.UnmarshalPrimitive(m, "cidr_block", &obj.CIDRBlock) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP 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"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP(address string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP{ - Address: core.StringPtr(address), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP) - err = core.UnmarshalPrimitive(m, "address", &obj.Address) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity : Identifies a security group by a unique property. -// Models which "extend" this model: -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN -// - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity 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 (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentityIntf interface { - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIntf - isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity) 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) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -33875,13 +33417,19 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSec return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or +// SecurityGroupRuleSecurityGroupRuleProtocolAll : When `protocol` is `all`, then it's invalid to specify `port_min`, `port_max`, `type` or // `code`. -// This model "extends" SecurityGroupRulePrototype -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct { +// This model "extends" SecurityGroupRule +type SecurityGroupRuleSecurityGroupRuleProtocolAll struct { // The direction of traffic to enforce, either `inbound` or `outbound`. 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 field, 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. @@ -33890,57 +33438,56 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic - // from any source (or to any source, for outbound rules). - Remote SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIntf `json:"remote,omitempty"` + // The IP addresses or security groups from which this rule allows traffic (or to which, + // for outbound rules). Can be specified as an IP address, a CIDR block, or a security + // group. A CIDR block of `0.0.0.0/0` allows traffic from any source (or to any source, + // for outbound rules). + Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` } -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Direction property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Direction property. // The direction of traffic to enforce, either `inbound` or `outbound`. const ( - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" + SecurityGroupRuleSecurityGroupRuleProtocolAllDirectionInboundConst = "inbound" + SecurityGroupRuleSecurityGroupRuleProtocolAllDirectionOutboundConst = "outbound" ) -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.IPVersion property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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" + SecurityGroupRuleSecurityGroupRuleProtocolAllIPVersionIpv4Const = "ipv4" ) -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll.Protocol property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolAll.Protocol property. // The protocol to enforce. const ( - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolAllConst = "all" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolIcmpConst = "icmp" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolTCPConst = "tcp" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolUDPConst = "udp" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolAllConst = "all" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolIcmpConst = "icmp" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolTCPConst = "tcp" + SecurityGroupRuleSecurityGroupRuleProtocolAllProtocolUDPConst = "udp" ) -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll{ - Direction: core.StringPtr(direction), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll) isaSecurityGroupRulePrototype() bool { +func (*SecurityGroupRuleSecurityGroupRuleProtocolAll) isaSecurityGroupRule() 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) +// 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 @@ -33949,7 +33496,7 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[strin if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { return } @@ -33957,15 +33504,21 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(m map[strin return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code` +// SecurityGroupRuleSecurityGroupRuleProtocolIcmp : When `protocol` is `icmp`, then the rule may also contain fields to specify an ICMP `type` and `code`. Field `code` // may only be specified if `type` is also specified. If type is not specified, then traffic is allowed for all types // and codes. If type is specified and code is not specified, then traffic is allowed with the specified type for all // codes. -// This model "extends" SecurityGroupRulePrototype -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct { +// This model "extends" SecurityGroupRule +type SecurityGroupRuleSecurityGroupRuleProtocolIcmp struct { // The direction of traffic to enforce, either `inbound` or `outbound`. 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 field, 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. @@ -33974,11 +33527,11 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic - // from any source (or to any source, for outbound rules). - Remote SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIntf `json:"remote,omitempty"` + // The IP addresses or security groups from which this rule allows traffic (or to which, + // for outbound rules). Can be specified as an IP address, a CIDR block, or a security + // group. A CIDR block of `0.0.0.0/0` allows traffic from any source (or to any source, + // for outbound rules). + Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The ICMP traffic code to allow. Code *int64 `json:"code,omitempty"` @@ -33987,50 +33540,49 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp struct { Type *int64 `json:"type,omitempty"` } -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Direction property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Direction property. // The direction of traffic to enforce, either `inbound` or `outbound`. const ( - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpDirectionInboundConst = "inbound" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpDirectionOutboundConst = "outbound" ) -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.IPVersion property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpIPVersionIpv4Const = "ipv4" ) -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp.Protocol property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolIcmp.Protocol property. // The protocol to enforce. const ( - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolAllConst = "all" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolTCPConst = "tcp" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolAllConst = "all" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolIcmpConst = "icmp" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolTCPConst = "tcp" + SecurityGroupRuleSecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp{ - Direction: core.StringPtr(direction), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) isaSecurityGroupRulePrototype() bool { +func (*SecurityGroupRuleSecurityGroupRuleProtocolIcmp) isaSecurityGroupRule() 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) +// 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 @@ -34039,7 +33591,7 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[stri if err != nil { return } - err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { return } @@ -34055,14 +33607,20 @@ func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(m map[stri return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and +// SecurityGroupRuleSecurityGroupRuleProtocolTcpudp : If `protocol` is either `tcp` or `udp`, then the rule may also contain `port_min` and // `port_max`. Either both should be set, or neither. When neither is set then traffic is allowed on all ports. For a // single port, set both to the same value. -// This model "extends" SecurityGroupRulePrototype -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct { +// This model "extends" SecurityGroupRule +type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp struct { // The direction of traffic to enforce, either `inbound` or `outbound`. 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 field, 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. @@ -34071,11 +33629,11 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The 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. If omitted, a CIDR block of `0.0.0.0/0` will be used to allow traffic - // from any source (or to any source, for outbound rules). - Remote SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIntf `json:"remote,omitempty"` + // The IP addresses or security groups from which this rule allows traffic (or to which, + // for outbound rules). Can be specified as an IP address, a CIDR block, or a security + // group. A CIDR block of `0.0.0.0/0` allows traffic from any source (or to any source, + // for outbound rules). + Remote SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The inclusive upper bound of TCP/UDP port range. PortMax *int64 `json:"port_max,omitempty"` @@ -34084,158 +33642,66 @@ type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp struct { PortMin *int64 `json:"port_min,omitempty"` } -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Direction property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Direction property. // The direction of traffic to enforce, either `inbound` or `outbound`. const ( - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpDirectionInboundConst = "inbound" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpDirectionOutboundConst = "outbound" ) -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.IPVersion property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.IPVersion property. // The IP version to enforce. The format of `remote.address` or `remote.cidr_block` must match this field, 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" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpIPVersionIpv4Const = "ipv4" ) -// Constants associated with the SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp.Protocol property. +// Constants associated with the SecurityGroupRuleSecurityGroupRuleProtocolTcpudp.Protocol property. // The protocol to enforce. const ( - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolAllConst = "all" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolIcmpConst = "icmp" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" - SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolAllConst = "all" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolIcmpConst = "icmp" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolTCPConst = "tcp" + SecurityGroupRuleSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp{ - Direction: core.StringPtr(direction), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRulePrototype() bool { +func (*SecurityGroupRuleSecurityGroupRuleProtocolTcpudp) isaSecurityGroupRule() 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) +// 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, "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, UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) + 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) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) 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) + err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) 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"` - - // 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 user-defined name for this security group. Names must be unique within the VPC the security group resides in. - 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) + err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) if err != nil { return } - err = core.UnmarshalPrimitive(m, "href", &obj.Href) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRuleRemote) if err != nil { return } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) + err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) if err != nil { return } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) if err != nil { return } @@ -34670,6 +34136,12 @@ func UnmarshalVolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentity(m map // - VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity // This model "extends" VolumeAttachmentPrototypeInstanceContextVolume type VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext struct { + // The identity of the root key to use to wrap the data encryption key for the volume. + // + // If this property is not provided, the `encryption` type for the volume will be + // `provider_managed`. + EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` + // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` @@ -34700,6 +34172,10 @@ func (*VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceCont // UnmarshalVolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext unmarshals an instance of VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext) + err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return @@ -34878,6 +34354,12 @@ func UnmarshalVolumeProfileIdentityByName(m map[string]json.RawMessage, result i // VolumePrototypeVolumeByCapacity : VolumePrototypeVolumeByCapacity struct // This model "extends" VolumePrototype type VolumePrototypeVolumeByCapacity struct { + // The identity of the root key to use to wrap the data encryption key for the volume. + // + // If this property is not provided, the `encryption` type for the volume will be + // `provider_managed`. + EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` + // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` @@ -34917,6 +34399,10 @@ func (*VolumePrototypeVolumeByCapacity) isaVolumePrototype() bool { // 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.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return @@ -35112,33 +34598,33 @@ func UnmarshalFlowLogCollectorPrototypeTargetInstanceIdentityInstanceIdentityByI return } -// FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct +// FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct // This model "extends" FlowLogCollectorPrototypeTargetNetworkInterfaceIdentity -type FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { +type FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref struct { // The URL for this network interface. Href *string `json:"href" validate:"required"` } -// NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { - model = &FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ +// NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref : Instantiate FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref (Generic Model Constructor) +func (*VpcV1) NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href string) (model *FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref, err error) { + model = &FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref{ Href: core.StringPtr(href), } err = core.ValidateStruct(model, "required parameters") return } -func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorPrototypeTargetNetworkInterfaceIdentity() bool { +func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorPrototypeTargetNetworkInterfaceIdentity() bool { return true } -func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorPrototypeTarget() bool { +func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) isaFlowLogCollectorPrototypeTarget() bool { return true } -// UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. -func UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) +// UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref unmarshals an instance of FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref from the specified map of raw messages. +func UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref) err = core.UnmarshalPrimitive(m, "href", &obj.Href) if err != nil { return @@ -35147,33 +34633,33 @@ func UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInte return } -// FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct +// FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID : FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct // This model "extends" FlowLogCollectorPrototypeTargetNetworkInterfaceIdentity -type FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { +type FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID struct { // The unique identifier for this network interface. ID *string `json:"id" validate:"required"` } -// NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) -func (*VpcV1) NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { - model = &FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ +// NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID : Instantiate FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID (Generic Model Constructor) +func (*VpcV1) NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id string) (model *FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID, err error) { + model = &FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID{ ID: core.StringPtr(id), } err = core.ValidateStruct(model, "required parameters") return } -func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorPrototypeTargetNetworkInterfaceIdentity() bool { +func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorPrototypeTargetNetworkInterfaceIdentity() bool { return true } -func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorPrototypeTarget() bool { +func (*FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) isaFlowLogCollectorPrototypeTarget() bool { return true } -// UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. -func UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) +// UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID unmarshals an instance of FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID from the specified map of raw messages. +func UnmarshalFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return @@ -35882,321 +35368,6 @@ func UnmarshalSecurityGroupRulePrototypeRemoteSecurityGroupIdentitySecurityGroup return } -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN struct { - // The security group's CRN. - CRN *string `json:"crn" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN{ - CRN: core.StringPtr(crn), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN) - err = core.UnmarshalPrimitive(m, "crn", &obj.CRN) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref struct { - // The security group's canonical URL. - Href *string `json:"href" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref{ - Href: core.StringPtr(href), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref) - err = core.UnmarshalPrimitive(m, "href", &obj.Href) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - -// SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct -// This model "extends" SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity -type SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID struct { - // The unique identifier for this security group. - ID *string `json:"id" validate:"required"` -} - -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID (Generic Model Constructor) -func (*VpcV1) NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id string) (model *SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID, err error) { - model = &SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID{ - ID: core.StringPtr(id), - } - err = core.ValidateStruct(model, "required parameters") - return -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentity() bool { - return true -} - -func (*SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) isaSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemote() bool { - return true -} - -// UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID unmarshals an instance of SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID from the specified map of raw messages. -func UnmarshalSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID) - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByCRN : VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByCRN struct // This model "extends" VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentity type VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByCRN struct { @@ -36305,6 +35476,12 @@ func UnmarshalVolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolume // VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity : VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct // This model "extends" VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContext type VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity struct { + // The identity of the root key to use to wrap the data encryption key for the volume. + // + // If this property is not provided, the `encryption` type for the volume will be + // `provider_managed`. + EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` + // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` @@ -36340,6 +35517,10 @@ func (*VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceCont // UnmarshalVolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity unmarshals an instance of VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceContextVolumeVolumePrototypeInstanceContextVolumePrototypeInstanceContextVolumeByCapacity) + err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyIdentity) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "iops", &obj.Iops) if err != nil { return diff --git a/vpcv1/vpc_v1_integration_test.go b/vpcv1/vpc_v1_integration_test.go index f708db8..e948563 100644 --- a/vpcv1/vpc_v1_integration_test.go +++ b/vpcv1/vpc_v1_integration_test.go @@ -1162,13 +1162,13 @@ func TestVPCVPN(t *testing.T) { ValidateResponse(t, res, err, GET, detailed, increment) }) - t.Run("List VpnGateway Connection Local Cidrs", func(t *testing.T) { - res, _, err := ListVPNGatewayConnectionLocalCidrs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) + t.Run("List VpnGateway Connection Local CIDRs", func(t *testing.T) { + res, _, err := ListVPNGatewayConnectionLocalCIDRs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) ValidateResponse(t, res, err, GET, detailed, increment) }) - t.Run("List VpnGateway Connection Peer Cidrs", func(t *testing.T) { - res, _, err := ListVPNGatewayConnectionPeerCidrs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) + t.Run("List VpnGateway Connection Peer CIDRs", func(t *testing.T) { + res, _, err := ListVPNGatewayConnectionPeerCIDRs(vpcService, *createdVpnGatewayID, *createdVpnGatewayConnID) ValidateResponse(t, res, err, GET, detailed, increment) }) diff --git a/vpcv1/vpc_v1_integration_utils_test.go b/vpcv1/vpc_v1_integration_utils_test.go index 761e714..76f720c 100644 --- a/vpcv1/vpc_v1_integration_utils_test.go +++ b/vpcv1/vpc_v1_integration_utils_test.go @@ -840,7 +840,7 @@ func GetInstanceInitialization(vpcService *vpcv1.VpcV1, instanceID string) (init // ListNetworkInterfaces GET // /instances/{instance_id}/network_interfaces // List all network interfaces on an instance -func ListNetworkInterfaces(vpcService *vpcv1.VpcV1, id string) (networkInterfaces *vpcv1.NetworkInterfaceCollection, response *core.DetailedResponse, err error) { +func ListNetworkInterfaces(vpcService *vpcv1.VpcV1, id string) (networkInterfaces *vpcv1.NetworkInterfaceUnpaginatedCollection, response *core.DetailedResponse, err error) { options := &vpcv1.ListInstanceNetworkInterfacesOptions{} options.SetInstanceID(id) networkInterfaces, response, err = vpcService.ListInstanceNetworkInterfaces(options) @@ -1962,9 +1962,9 @@ func CreateVPNGatewayConnection(vpcService *vpcv1.VpcV1, gatewayID, name string) options.SetPeerAddress("192.168.0.1") options.SetPsk("pre-shared-key") local := []string{"192.132.0.0/28"} - options.SetLocalCidrs(local) + options.SetLocalCIDRs(local) peer := []string{"197.155.0.0/28"} - options.SetPeerCidrs(peer) + options.SetPeerCIDRs(peer) connections, response, err = vpcService.CreateVPNGatewayConnection(options) return } @@ -2004,14 +2004,14 @@ func UpdateVPNGatewayConnection(vpcService *vpcv1.VpcV1, gatewayID, connID, name return } -// ListVPNGatewayConnectionLocalCidrs GET +// ListVPNGatewayConnectionLocalCIDRs GET // /VPN_gateways/{VPN_gateway_id}/connections/{id}/local_cidrs // List all local CIDRs for a resource -func ListVPNGatewayConnectionLocalCidrs(vpcService *vpcv1.VpcV1, gatewayID, connID string) (localCidrs *vpcv1.VPNGatewayConnectionLocalCidrs, response *core.DetailedResponse, err error) { - options := &vpcv1.ListVPNGatewayConnectionLocalCidrsOptions{} +func ListVPNGatewayConnectionLocalCIDRs(vpcService *vpcv1.VpcV1, gatewayID, connID string) (localCIDRs *vpcv1.VPNGatewayConnectionLocalCIDRs, response *core.DetailedResponse, err error) { + options := &vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions{} options.SetVPNGatewayID(gatewayID) options.SetID(connID) - localCidrs, response, err = vpcService.ListVPNGatewayConnectionLocalCidrs(options) + localCIDRs, response, err = vpcService.ListVPNGatewayConnectionLocalCIDRs(options) return } @@ -2054,14 +2054,14 @@ func SetVPNGatewayConnectionLocalCidr(vpcService *vpcv1.VpcV1, gatewayID, connID return response, err } -// ListVPNGatewayConnectionPeerCidrs GET +// ListVPNGatewayConnectionPeerCIDRs GET // /VPN_gateways/{VPN_gateway_id}/connections/{id}/peer_cidrs // List all peer CIDRs for a resource -func ListVPNGatewayConnectionPeerCidrs(vpcService *vpcv1.VpcV1, gatewayID, connID string) (peerCidrs *vpcv1.VPNGatewayConnectionPeerCidrs, response *core.DetailedResponse, err error) { - options := &vpcv1.ListVPNGatewayConnectionPeerCidrsOptions{} +func ListVPNGatewayConnectionPeerCIDRs(vpcService *vpcv1.VpcV1, gatewayID, connID string) (peerCIDRs *vpcv1.VPNGatewayConnectionPeerCIDRs, response *core.DetailedResponse, err error) { + options := &vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions{} options.SetVPNGatewayID(gatewayID) options.SetID(connID) - peerCidrs, response, err = vpcService.ListVPNGatewayConnectionPeerCidrs(options) + peerCIDRs, response, err = vpcService.ListVPNGatewayConnectionPeerCIDRs(options) return } diff --git a/vpcv1/vpc_v1_test.go b/vpcv1/vpc_v1_test.go index c7a003e..79a2d72 100644 --- a/vpcv1/vpc_v1_test.go +++ b/vpcv1/vpc_v1_test.go @@ -682,15 +682,15 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcv1.NetworkInterfaceIdentityByID) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the UpdateFloatingIPOptions model updateFloatingIPOptionsModel := new(vpcv1.UpdateFloatingIPOptions) updateFloatingIPOptionsModel.ID = core.StringPtr("testString") updateFloatingIPOptionsModel.Name = core.StringPtr("my-floating-ip") - updateFloatingIPOptionsModel.Target = networkInterfaceIdentityModel + updateFloatingIPOptionsModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.UpdateFloatingIP(updateFloatingIPOptionsModel) @@ -739,15 +739,15 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcv1.NetworkInterfaceIdentityByID) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the UpdateFloatingIPOptions model updateFloatingIPOptionsModel := new(vpcv1.UpdateFloatingIPOptions) updateFloatingIPOptionsModel.ID = core.StringPtr("testString") updateFloatingIPOptionsModel.Name = core.StringPtr("my-floating-ip") - updateFloatingIPOptionsModel.Target = networkInterfaceIdentityModel + updateFloatingIPOptionsModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -765,15 +765,15 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcv1.NetworkInterfaceIdentityByID) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the UpdateFloatingIPOptions model updateFloatingIPOptionsModel := new(vpcv1.UpdateFloatingIPOptions) updateFloatingIPOptionsModel.ID = core.StringPtr("testString") updateFloatingIPOptionsModel.Name = core.StringPtr("my-floating-ip") - updateFloatingIPOptionsModel.Target = networkInterfaceIdentityModel + updateFloatingIPOptionsModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -1017,7 +1017,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "flow_log_collectors": [{"active": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) + fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?limit=20"}, "flow_log_collectors": [{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListFlowLogCollectors successfully`, func() { @@ -1122,8 +1122,8 @@ var _ = Describe(`VpcV1`, func() { cloudObjectStorageBucketIdentityModel := new(vpcv1.CloudObjectStorageBucketIdentityByName) cloudObjectStorageBucketIdentityModel.Name = core.StringPtr("bucket-27200-lwx4cfvcue") - // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model - flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) flowLogCollectorPrototypeTargetModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model @@ -1167,7 +1167,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"active": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke CreateFlowLogCollector successfully`, func() { @@ -1189,8 +1189,8 @@ var _ = Describe(`VpcV1`, func() { cloudObjectStorageBucketIdentityModel := new(vpcv1.CloudObjectStorageBucketIdentityByName) cloudObjectStorageBucketIdentityModel.Name = core.StringPtr("bucket-27200-lwx4cfvcue") - // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model - flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) flowLogCollectorPrototypeTargetModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model @@ -1225,8 +1225,8 @@ var _ = Describe(`VpcV1`, func() { cloudObjectStorageBucketIdentityModel := new(vpcv1.CloudObjectStorageBucketIdentityByName) cloudObjectStorageBucketIdentityModel.Name = core.StringPtr("bucket-27200-lwx4cfvcue") - // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model - flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) flowLogCollectorPrototypeTargetModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") // Construct an instance of the ResourceGroupIdentityByID model @@ -1399,7 +1399,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"active": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetFlowLogCollector successfully`, func() { @@ -1526,7 +1526,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"active": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"active": true, "auto_delete": true, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::flow-log-collector:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/flow_log_collectors/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "lifecycle_state": "stable", "name": "my-flow-log-collector", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "storage_bucket": {"name": "bucket-27200-lwx4cfvcue"}, "target": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "resource_type": "network_interface"}, "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke UpdateFlowLogCollector successfully`, func() { @@ -3778,6 +3778,10 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) volumeProfileIdentityModel.Name = core.StringPtr("general-purpose") @@ -3797,6 +3801,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeInstanceByImageContext model volumePrototypeInstanceByImageContextModel := new(vpcv1.VolumePrototypeInstanceByImageContext) volumePrototypeInstanceByImageContextModel.Capacity = core.Int64Ptr(int64(100)) + volumePrototypeInstanceByImageContextModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeInstanceByImageContextModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume") volumePrototypeInstanceByImageContextModel.Profile = volumeProfileIdentityModel @@ -3910,6 +3915,10 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) volumeProfileIdentityModel.Name = core.StringPtr("general-purpose") @@ -3929,6 +3938,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeInstanceByImageContext model volumePrototypeInstanceByImageContextModel := new(vpcv1.VolumePrototypeInstanceByImageContext) volumePrototypeInstanceByImageContextModel.Capacity = core.Int64Ptr(int64(100)) + volumePrototypeInstanceByImageContextModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeInstanceByImageContextModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume") volumePrototypeInstanceByImageContextModel.Profile = volumeProfileIdentityModel @@ -4011,6 +4021,10 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) volumeProfileIdentityModel.Name = core.StringPtr("general-purpose") @@ -4030,6 +4044,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeInstanceByImageContext model volumePrototypeInstanceByImageContextModel := new(vpcv1.VolumePrototypeInstanceByImageContext) volumePrototypeInstanceByImageContextModel.Capacity = core.Int64Ptr(int64(100)) + volumePrototypeInstanceByImageContextModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeInstanceByImageContextModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume") volumePrototypeInstanceByImageContextModel.Profile = volumeProfileIdentityModel @@ -11204,25 +11219,14 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -11290,25 +11294,14 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -11345,25 +11338,14 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -11901,25 +11883,19 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the CreateNetworkACLRuleOptions model createNetworkACLRuleOptionsModel := new(vpcv1.CreateNetworkACLRuleOptions) @@ -11955,7 +11931,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "icmp", "source": "192.168.3.0/24", "code": 0, "type": 8}`) + fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "all", "source": "192.168.3.0/24"}`) })) }) It(`Invoke CreateNetworkACLRule successfully`, func() { @@ -11973,25 +11949,19 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the CreateNetworkACLRuleOptions model createNetworkACLRuleOptionsModel := new(vpcv1.CreateNetworkACLRuleOptions) @@ -12014,25 +11984,19 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") // Construct an instance of the CreateNetworkACLRuleOptions model createNetworkACLRuleOptionsModel := new(vpcv1.CreateNetworkACLRuleOptions) @@ -12200,7 +12164,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "icmp", "source": "192.168.3.0/24", "code": 0, "type": 8}`) + fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "all", "source": "192.168.3.0/24"}`) })) }) It(`Invoke GetNetworkACLRule successfully`, func() { @@ -12294,16 +12258,16 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID model - networkACLRulePatchBeforeModel := new(vpcv1.NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) - networkACLRulePatchBeforeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.Action = core.StringPtr("allow") - updateNetworkACLRuleOptionsModel.Before = networkACLRulePatchBeforeModel + updateNetworkACLRuleOptionsModel.Before = networkACLRuleIdentityModel updateNetworkACLRuleOptionsModel.Code = core.Int64Ptr(int64(0)) updateNetworkACLRuleOptionsModel.Destination = core.StringPtr("192.168.3.2/32") updateNetworkACLRuleOptionsModel.DestinationPortMax = core.Int64Ptr(int64(22)) @@ -12344,7 +12308,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "icmp", "source": "192.168.3.0/24", "code": 0, "type": 8}`) + fmt.Fprintf(res, `{"action": "allow", "before": {"href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "name": "my-rule-1"}, "created_at": "2019-01-01T12:00:00", "destination": "192.168.3.0/24", "direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9", "id": "8daca77a-4980-4d33-8f3e-7038797be8f9", "ip_version": "ipv4", "name": "my-rule-2", "protocol": "all", "source": "192.168.3.0/24"}`) })) }) It(`Invoke UpdateNetworkACLRule successfully`, func() { @@ -12362,16 +12326,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID model - networkACLRulePatchBeforeModel := new(vpcv1.NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) - networkACLRulePatchBeforeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.Action = core.StringPtr("allow") - updateNetworkACLRuleOptionsModel.Before = networkACLRulePatchBeforeModel + updateNetworkACLRuleOptionsModel.Before = networkACLRuleIdentityModel updateNetworkACLRuleOptionsModel.Code = core.Int64Ptr(int64(0)) updateNetworkACLRuleOptionsModel.Destination = core.StringPtr("192.168.3.2/32") updateNetworkACLRuleOptionsModel.DestinationPortMax = core.Int64Ptr(int64(22)) @@ -12399,16 +12363,16 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID model - networkACLRulePatchBeforeModel := new(vpcv1.NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) - networkACLRulePatchBeforeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.Action = core.StringPtr("allow") - updateNetworkACLRuleOptionsModel.Before = networkACLRulePatchBeforeModel + updateNetworkACLRuleOptionsModel.Before = networkACLRuleIdentityModel updateNetworkACLRuleOptionsModel.Code = core.Int64Ptr(int64(0)) updateNetworkACLRuleOptionsModel.Destination = core.StringPtr("192.168.3.2/32") updateNetworkACLRuleOptionsModel.DestinationPortMax = core.Int64Ptr(int64(22)) @@ -14122,7 +14086,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "total_count": 132}`) + fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "security_groups": [{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}], "total_count": 132}`) })) }) It(`Invoke ListSecurityGroups successfully`, func() { @@ -14217,9 +14181,9 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -14230,7 +14194,7 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -14274,7 +14238,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke CreateSecurityGroup successfully`, func() { @@ -14292,9 +14256,9 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -14305,7 +14269,7 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -14336,9 +14300,9 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -14349,7 +14313,7 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -14522,7 +14486,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetSecurityGroup successfully`, func() { @@ -14648,7 +14612,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group", "network_interfaces": [{"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface"}], "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke UpdateSecurityGroup successfully`, func() { @@ -14728,6 +14692,10 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) + + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) + res.Header().Set("Content-type", "application/json") res.WriteHeader(200) fmt.Fprintf(res, `} this is not valid json {`) @@ -14745,6 +14713,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ListSecurityGroupNetworkInterfacesOptions model listSecurityGroupNetworkInterfacesOptionsModel := new(vpcv1.ListSecurityGroupNetworkInterfacesOptions) listSecurityGroupNetworkInterfacesOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupNetworkInterfacesOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupNetworkInterfacesOptionsModel.Limit = core.Int64Ptr(int64(1)) listSecurityGroupNetworkInterfacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.ListSecurityGroupNetworkInterfaces(listSecurityGroupNetworkInterfacesOptionsModel) @@ -14773,9 +14743,13 @@ var _ = Describe(`VpcV1`, func() { Expect(req.URL.Query()["generation"]).To(Equal([]string{fmt.Sprint(int64(2))})) + Expect(req.URL.Query()["start"]).To(Equal([]string{"testString"})) + + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) + res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"network_interfaces": [{"created_at": "2019-01-01T12:00:00", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "type": "primary"}]}`) + fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?limit=20"}, "limit": 20, "network_interfaces": [{"created_at": "2019-01-01T12:00:00", "floating_ips": [{"address": "203.0.113.1", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::floating-ip:39300233-9995-4806-89a5-3c1b6eb88689", "href": "https://us-south.iaas.cloud.ibm.com/v1/floating_ips/39300233-9995-4806-89a5-3c1b6eb88689", "id": "39300233-9995-4806-89a5-3c1b6eb88689", "name": "my-floating-ip"}], "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e", "id": "10c02d81-0ecb-4dc5-897d-28392913b81e", "name": "my-network-interface", "port_speed": 1000, "primary_ipv4_address": "192.168.3.4", "resource_type": "network_interface", "security_groups": [{"crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "my-security-group"}], "status": "available", "subnet": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "href": "https://us-south.iaas.cloud.ibm.com/v1/subnets/7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e", "name": "my-subnet"}, "type": "primary"}], "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instances/3b2669a2-4c2b-4003-bc91-1b81f1326267/network_interfaces?start=d3e721fd-c988-4670-9927-dbd5e7b07fc6&limit=20"}, "total_count": 132}`) })) }) It(`Invoke ListSecurityGroupNetworkInterfaces successfully`, func() { @@ -14796,6 +14770,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ListSecurityGroupNetworkInterfacesOptions model listSecurityGroupNetworkInterfacesOptionsModel := new(vpcv1.ListSecurityGroupNetworkInterfacesOptions) listSecurityGroupNetworkInterfacesOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupNetworkInterfacesOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupNetworkInterfacesOptionsModel.Limit = core.Int64Ptr(int64(1)) listSecurityGroupNetworkInterfacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -14816,6 +14792,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the ListSecurityGroupNetworkInterfacesOptions model listSecurityGroupNetworkInterfacesOptionsModel := new(vpcv1.ListSecurityGroupNetworkInterfacesOptions) listSecurityGroupNetworkInterfacesOptionsModel.SecurityGroupID = core.StringPtr("testString") + listSecurityGroupNetworkInterfacesOptionsModel.Start = core.StringPtr("testString") + listSecurityGroupNetworkInterfacesOptionsModel.Limit = core.Int64Ptr(int64(1)) listSecurityGroupNetworkInterfacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -15233,7 +15211,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}]}`) + fmt.Fprintf(res, `{"rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}]}`) })) }) It(`Invoke ListSecurityGroupRules successfully`, func() { @@ -15325,16 +15303,16 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -15372,7 +15350,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}`) + fmt.Fprintf(res, `{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}`) })) }) It(`Invoke CreateSecurityGroupRule successfully`, func() { @@ -15390,16 +15368,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -15424,16 +15402,16 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) @@ -15603,7 +15581,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}`) + fmt.Fprintf(res, `{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}`) })) }) It(`Invoke GetSecurityGroupRule successfully`, func() { @@ -15742,7 +15720,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}`) + fmt.Fprintf(res, `{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}`) })) }) It(`Invoke UpdateSecurityGroupRule successfully`, func() { @@ -18173,7 +18151,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"anyKey": "anyValue"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) + fmt.Fprintf(res, `{"created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271", "id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271", "name": "observant-chip-emphatic-engraver", "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "rules": [{"direction": "inbound", "href": "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271/rules/6f2a6efe-21e2-401c-b237-620aa26ba16a", "id": "6f2a6efe-21e2-401c-b237-620aa26ba16a", "ip_version": "ipv4", "protocol": "all", "remote": {"address": "192.168.3.4"}}], "vpc": {"crn": "crn:v1:bluemix:public:is:us-south:a/123456::vpc:4727d842-f94f-4a2d-824a-9bc9b02c523b", "href": "https://us-south.iaas.cloud.ibm.com/v1/vpcs/4727d842-f94f-4a2d-824a-9bc9b02c523b", "id": "4727d842-f94f-4a2d-824a-9bc9b02c523b", "name": "my-vpc"}}`) })) }) It(`Invoke GetVPCDefaultSecurityGroup successfully`, func() { @@ -19022,9 +19000,9 @@ var _ = Describe(`VpcV1`, func() { createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.CreateVPCRoute(createVPCRouteOptionsModel) @@ -19085,9 +19063,9 @@ var _ = Describe(`VpcV1`, func() { createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -19117,9 +19095,9 @@ var _ = Describe(`VpcV1`, func() { createVPCRouteOptionsModel := new(vpcv1.CreateVPCRouteOptions) createVPCRouteOptionsModel.VPCID = core.StringPtr("testString") createVPCRouteOptionsModel.Destination = core.StringPtr("192.168.3.0/24") + createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Zone = zoneIdentityModel createVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") - createVPCRouteOptionsModel.NextHop = routeNextHopPrototypeModel createVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -20282,7 +20260,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) + fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) })) }) It(`Invoke ListIkePolicyConnections successfully`, func() { @@ -21028,7 +21006,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) + fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) })) }) It(`Invoke ListIpsecPolicyConnections successfully`, func() { @@ -21777,7 +21755,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) + fmt.Fprintf(res, `{"connections": [{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}]}`) })) }) It(`Invoke ListVPNGatewayConnections successfully`, func() { @@ -21894,9 +21872,9 @@ var _ = Describe(`VpcV1`, func() { createVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel createVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel createVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel - createVPNGatewayConnectionOptionsModel.LocalCidrs = []string{"192.168.1.0/24"} + createVPNGatewayConnectionOptionsModel.LocalCIDRs = []string{"192.168.1.0/24"} createVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.PeerCidrs = []string{"10.45.1.0/24"} + createVPNGatewayConnectionOptionsModel.PeerCIDRs = []string{"10.45.1.0/24"} createVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := testService.CreateVPNGatewayConnection(createVPNGatewayConnectionOptionsModel) @@ -21927,7 +21905,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) + fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) })) }) It(`Invoke CreateVPNGatewayConnection successfully`, func() { @@ -21968,9 +21946,9 @@ var _ = Describe(`VpcV1`, func() { createVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel createVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel createVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel - createVPNGatewayConnectionOptionsModel.LocalCidrs = []string{"192.168.1.0/24"} + createVPNGatewayConnectionOptionsModel.LocalCIDRs = []string{"192.168.1.0/24"} createVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.PeerCidrs = []string{"10.45.1.0/24"} + createVPNGatewayConnectionOptionsModel.PeerCIDRs = []string{"10.45.1.0/24"} createVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -22011,9 +21989,9 @@ var _ = Describe(`VpcV1`, func() { createVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel createVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel createVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel - createVPNGatewayConnectionOptionsModel.LocalCidrs = []string{"192.168.1.0/24"} + createVPNGatewayConnectionOptionsModel.LocalCIDRs = []string{"192.168.1.0/24"} createVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.PeerCidrs = []string{"10.45.1.0/24"} + createVPNGatewayConnectionOptionsModel.PeerCIDRs = []string{"10.45.1.0/24"} createVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") @@ -22176,7 +22154,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) + fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) })) }) It(`Invoke GetVPNGatewayConnection successfully`, func() { @@ -22325,7 +22303,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "ipsec_policy": {"id": "ddf51bec-3424-11e8-b467-0ed5f89f718b"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) + fmt.Fprintf(res, `{"admin_state_up": true, "authentication_mode": "psk", "created_at": "2019-01-01T12:00:00", "dead_peer_detection": {"action": "restart", "interval": 30, "timeout": 120}, "href": "https://us-south.iaas.cloud.ibm.com/v1/vpn_gateways/ddf51bec-3424-11e8-b467-0ed5f89f718b/connections/93487806-7743-4c46-81d6-72869883ea0b", "id": "a10a5771-dc23-442c-8460-c3601d8542f7", "ike_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ike_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ike-policy"}, "ipsec_policy": {"href": "https://us-south.iaas.cloud.ibm.com/v1/ipsec_policies/ddf51bec-3424-11e8-b467-0ed5f89f718b", "id": "ddf51bec-3424-11e8-b467-0ed5f89f718b", "name": "my-ipsec-policy"}, "local_cidrs": ["192.168.1.0/24"], "name": "my-vpn-connection", "peer_address": "169.21.50.5", "peer_cidrs": ["10.45.1.0/24"], "psk": "lkj14b1oi0alcniejkso", "route_mode": "policy", "status": "down"}`) })) }) It(`Invoke UpdateVPNGatewayConnection successfully`, func() { @@ -22432,16 +22410,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptions *ListVPNGatewayConnectionLocalCidrsOptions) - Operation response error`, func() { + Describe(`ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions) - Operation response error`, func() { version := "testString" - listVPNGatewayConnectionLocalCidrsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" + listVPNGatewayConnectionLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22452,7 +22430,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(res, `} this is not valid json {`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCidrs with error: Operation response processing error`, func() { + It(`Invoke ListVPNGatewayConnectionLocalCIDRs with error: Operation response processing error`, func() { testService, testServiceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22461,13 +22439,13 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model - listVPNGatewayConnectionLocalCidrsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCidrsOptions) - listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) + listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) @@ -22478,16 +22456,16 @@ var _ = Describe(`VpcV1`, func() { }) }) - Describe(`ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptions *ListVPNGatewayConnectionLocalCidrsOptions)`, func() { + Describe(`ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptions *ListVPNGatewayConnectionLocalCIDRsOptions)`, func() { version := "testString" - listVPNGatewayConnectionLocalCidrsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" + listVPNGatewayConnectionLocalCIDRsPath := "/vpn_gateways/testString/connections/testString/local_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22498,7 +22476,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(res, `{"local_cidrs": ["192.168.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionLocalCidrs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionLocalCIDRs successfully`, func() { testService, testServiceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22508,24 +22486,24 @@ var _ = Describe(`VpcV1`, func() { Expect(testService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - result, response, operationErr := testService.ListVPNGatewayConnectionLocalCidrs(nil) + result, response, operationErr := testService.ListVPNGatewayConnectionLocalCIDRs(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model - listVPNGatewayConnectionLocalCidrsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCidrsOptions) - listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) + listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - result, response, operationErr = testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModel) + result, response, operationErr = testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) }) - It(`Invoke ListVPNGatewayConnectionLocalCidrs with error: Operation validation and request error`, func() { + It(`Invoke ListVPNGatewayConnectionLocalCIDRs with error: Operation validation and request error`, func() { testService, testServiceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22534,23 +22512,23 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model - listVPNGatewayConnectionLocalCidrsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCidrsOptions) - listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) + listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") Expect(err).To(BeNil()) - result, response, operationErr := testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct a second instance of the ListVPNGatewayConnectionLocalCidrsOptions model with no property values - listVPNGatewayConnectionLocalCidrsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionLocalCidrsOptions) + // Construct a second instance of the ListVPNGatewayConnectionLocalCIDRsOptions model with no property values + listVPNGatewayConnectionLocalCIDRsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionLocalCIDRsOptions) // Invoke operation with invalid model (negative test) - result, response, operationErr = testService.ListVPNGatewayConnectionLocalCidrs(listVPNGatewayConnectionLocalCidrsOptionsModelNew) + result, response, operationErr = testService.ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLocalCIDRsOptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) @@ -22803,16 +22781,16 @@ var _ = Describe(`VpcV1`, func() { }) }) }) - Describe(`ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptions *ListVPNGatewayConnectionPeerCidrsOptions) - Operation response error`, func() { + Describe(`ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions) - Operation response error`, func() { version := "testString" - listVPNGatewayConnectionPeerCidrsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" + listVPNGatewayConnectionPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22823,7 +22801,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(res, `} this is not valid json {`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCidrs with error: Operation response processing error`, func() { + It(`Invoke ListVPNGatewayConnectionPeerCIDRs with error: Operation response processing error`, func() { testService, testServiceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22832,13 +22810,13 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model - listVPNGatewayConnectionPeerCidrsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCidrsOptions) - listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model + listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) + listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).To(BeNil()) @@ -22849,16 +22827,16 @@ var _ = Describe(`VpcV1`, func() { }) }) - Describe(`ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptions *ListVPNGatewayConnectionPeerCidrsOptions)`, func() { + Describe(`ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptions *ListVPNGatewayConnectionPeerCIDRsOptions)`, func() { version := "testString" - listVPNGatewayConnectionPeerCidrsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" + listVPNGatewayConnectionPeerCIDRsPath := "/vpn_gateways/testString/connections/testString/peer_cidrs" Context(`Using mock server endpoint`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCidrsPath)) + Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22869,7 +22847,7 @@ var _ = Describe(`VpcV1`, func() { fmt.Fprintf(res, `{"peer_cidrs": ["10.45.1.0/24"]}`) })) }) - It(`Invoke ListVPNGatewayConnectionPeerCidrs successfully`, func() { + It(`Invoke ListVPNGatewayConnectionPeerCIDRs successfully`, func() { testService, testServiceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22879,24 +22857,24 @@ var _ = Describe(`VpcV1`, func() { Expect(testService).ToNot(BeNil()) // Invoke operation with nil options model (negative test) - result, response, operationErr := testService.ListVPNGatewayConnectionPeerCidrs(nil) + result, response, operationErr := testService.ListVPNGatewayConnectionPeerCIDRs(nil) Expect(operationErr).NotTo(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model - listVPNGatewayConnectionPeerCidrsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCidrsOptions) - listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model + listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) + listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) - result, response, operationErr = testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModel) + result, response, operationErr = testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) }) - It(`Invoke ListVPNGatewayConnectionPeerCidrs with error: Operation validation and request error`, func() { + It(`Invoke ListVPNGatewayConnectionPeerCIDRs with error: Operation validation and request error`, func() { testService, testServiceErr := vpcv1.NewVpcV1(&vpcv1.VpcV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22905,23 +22883,23 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model - listVPNGatewayConnectionPeerCidrsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCidrsOptions) - listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.ID = core.StringPtr("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model + listVPNGatewayConnectionPeerCIDRsOptionsModel := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) + listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.ID = core.StringPtr("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := testService.SetServiceURL("") Expect(err).To(BeNil()) - result, response, operationErr := testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModel) + result, response, operationErr := testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModel) Expect(operationErr).ToNot(BeNil()) Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct a second instance of the ListVPNGatewayConnectionPeerCidrsOptions model with no property values - listVPNGatewayConnectionPeerCidrsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionPeerCidrsOptions) + // Construct a second instance of the ListVPNGatewayConnectionPeerCIDRsOptions model with no property values + listVPNGatewayConnectionPeerCIDRsOptionsModelNew := new(vpcv1.ListVPNGatewayConnectionPeerCIDRsOptions) // Invoke operation with invalid model (negative test) - result, response, operationErr = testService.ListVPNGatewayConnectionPeerCidrs(listVPNGatewayConnectionPeerCidrsOptionsModelNew) + result, response, operationErr = testService.ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeerCIDRsOptionsModelNew) Expect(operationErr).ToNot(BeNil()) Expect(response).To(BeNil()) Expect(result).To(BeNil()) @@ -23624,7 +23602,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "volumes": [{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) + fmt.Fprintf(res, `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volumes?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "volumes": [{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}]}`) })) }) It(`Invoke ListVolumes successfully`, func() { @@ -23715,6 +23693,10 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") @@ -23729,6 +23711,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) + volumePrototypeModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeModel.Name = core.StringPtr("my-volume") volumePrototypeModel.Profile = volumeProfileIdentityModel @@ -23769,7 +23752,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, `{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, `{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke CreateVolume successfully`, func() { @@ -23787,6 +23770,10 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") @@ -23801,6 +23788,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) + volumePrototypeModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeModel.Name = core.StringPtr("my-volume") volumePrototypeModel.Profile = volumeProfileIdentityModel @@ -23828,6 +23816,10 @@ var _ = Describe(`VpcV1`, func() { Expect(testServiceErr).To(BeNil()) Expect(testService).ToNot(BeNil()) + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") @@ -23842,6 +23834,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) + volumePrototypeModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeModel.Name = core.StringPtr("my-volume") volumePrototypeModel.Profile = volumeProfileIdentityModel @@ -24011,7 +24004,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, `{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke GetVolume successfully`, func() { @@ -24137,7 +24130,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, `{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) + fmt.Fprintf(res, `{"capacity": 100, "created_at": "2019-01-01T12:00:00", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "encryption": "provider_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "iops": 10000, "name": "my-volume", "profile": {"href": "https://us-south.iaas.cloud.ibm.com/v1/volume/profiles/general-purpose", "name": "general-purpose"}, "resource_group": {"href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345", "id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group"}, "status": "available", "volume_attachments": [{"delete_volume_on_instance_delete": true, "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "instance": {"crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance:1e09281b-f177-46fb-baf1-bc152b2e391a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a", "id": "1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance"}, "name": "my-volume-attachment", "type": "boot"}], "zone": {"href": "https://us-south.iaas.cloud.ibm.com/v1/regions/us-south/zones/us-south-1", "name": "us-south-1"}}`) })) }) It(`Invoke UpdateVolume successfully`, func() { @@ -24354,8 +24347,8 @@ var _ = Describe(`VpcV1`, func() { cloudObjectStorageBucketIdentityModel.Name = core.StringPtr("bucket-27200-lwx4cfvcue") Expect(cloudObjectStorageBucketIdentityModel.Name).To(Equal(core.StringPtr("bucket-27200-lwx4cfvcue"))) - // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model - flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + // Construct an instance of the FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + flowLogCollectorPrototypeTargetModel := new(vpcv1.FlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID) Expect(flowLogCollectorPrototypeTargetModel).ToNot(BeNil()) flowLogCollectorPrototypeTargetModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") Expect(flowLogCollectorPrototypeTargetModel.ID).To(Equal(core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e"))) @@ -24502,6 +24495,12 @@ var _ = Describe(`VpcV1`, func() { Expect(createInstanceNetworkInterfaceOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateInstanceOptions successfully`, func() { + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + Expect(encryptionKeyIdentityModel).ToNot(BeNil()) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcv1.VolumeProfileIdentityByName) Expect(volumeProfileIdentityModel).ToNot(BeNil()) @@ -24530,10 +24529,12 @@ var _ = Describe(`VpcV1`, func() { volumePrototypeInstanceByImageContextModel := new(vpcv1.VolumePrototypeInstanceByImageContext) Expect(volumePrototypeInstanceByImageContextModel).ToNot(BeNil()) volumePrototypeInstanceByImageContextModel.Capacity = core.Int64Ptr(int64(100)) + volumePrototypeInstanceByImageContextModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeInstanceByImageContextModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume") volumePrototypeInstanceByImageContextModel.Profile = volumeProfileIdentityModel Expect(volumePrototypeInstanceByImageContextModel.Capacity).To(Equal(core.Int64Ptr(int64(100)))) + Expect(volumePrototypeInstanceByImageContextModel.EncryptionKey).To(Equal(encryptionKeyIdentityModel)) Expect(volumePrototypeInstanceByImageContextModel.Iops).To(Equal(core.Int64Ptr(int64(10000)))) Expect(volumePrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume"))) Expect(volumePrototypeInstanceByImageContextModel.Profile).To(Equal(volumeProfileIdentityModel)) @@ -25050,41 +25051,21 @@ var _ = Describe(`VpcV1`, func() { Expect(createLoadBalancerPoolOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateNetworkACLOptions successfully`, func() { - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - Expect(networkACLRuleReferenceModel).ToNot(BeNil()) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - Expect(networkACLRuleReferenceModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.Name).To(Equal(core.StringPtr("my-rule-1"))) - // Construct an instance of the NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll model networkACLRulePrototypeNetworkACLContextModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) Expect(networkACLRulePrototypeNetworkACLContextModel).ToNot(BeNil()) networkACLRulePrototypeNetworkACLContextModel.Action = core.StringPtr("allow") - networkACLRulePrototypeNetworkACLContextModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeNetworkACLContextModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeNetworkACLContextModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeNetworkACLContextModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeNetworkACLContextModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeNetworkACLContextModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeNetworkACLContextModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeNetworkACLContextModel.Source = core.StringPtr("192.168.3.2/32") Expect(networkACLRulePrototypeNetworkACLContextModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.Before).To(Equal(networkACLRuleReferenceModel)) - Expect(networkACLRulePrototypeNetworkACLContextModel.CreatedAt).To(Equal(CreateMockDateTime())) - Expect(networkACLRulePrototypeNetworkACLContextModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeNetworkACLContextModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(networkACLRulePrototypeNetworkACLContextModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(networkACLRulePrototypeNetworkACLContextModel.Name).To(Equal(core.StringPtr("my-rule-2"))) Expect(networkACLRulePrototypeNetworkACLContextModel.Protocol).To(Equal(core.StringPtr("all"))) - Expect(networkACLRulePrototypeNetworkACLContextModel.Source).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeNetworkACLContextModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -25119,41 +25100,29 @@ var _ = Describe(`VpcV1`, func() { Expect(createNetworkACLOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateNetworkACLRuleOptions successfully`, func() { - // Construct an instance of the NetworkACLRuleReference model - networkACLRuleReferenceModel := new(vpcv1.NetworkACLRuleReference) - Expect(networkACLRuleReferenceModel).ToNot(BeNil()) - networkACLRuleReferenceModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRuleReferenceModel.Name = core.StringPtr("my-rule-1") - Expect(networkACLRuleReferenceModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRuleReferenceModel.Name).To(Equal(core.StringPtr("my-rule-1"))) + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + Expect(networkACLRuleIdentityModel).ToNot(BeNil()) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + Expect(networkACLRuleIdentityModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) // Construct an instance of the NetworkACLRulePrototypeNetworkACLRuleProtocolAll model networkACLRulePrototypeModel := new(vpcv1.NetworkACLRulePrototypeNetworkACLRuleProtocolAll) Expect(networkACLRulePrototypeModel).ToNot(BeNil()) networkACLRulePrototypeModel.Action = core.StringPtr("allow") - networkACLRulePrototypeModel.Before = networkACLRuleReferenceModel - networkACLRulePrototypeModel.CreatedAt = CreateMockDateTime() - networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Before = networkACLRuleIdentityModel + networkACLRulePrototypeModel.Destination = core.StringPtr("192.168.3.2/32") networkACLRulePrototypeModel.Direction = core.StringPtr("inbound") - networkACLRulePrototypeModel.Href = core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - networkACLRulePrototypeModel.IPVersion = core.StringPtr("ipv4") networkACLRulePrototypeModel.Name = core.StringPtr("my-rule-2") networkACLRulePrototypeModel.Protocol = core.StringPtr("all") - networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.0/24") + networkACLRulePrototypeModel.Source = core.StringPtr("192.168.3.2/32") Expect(networkACLRulePrototypeModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(networkACLRulePrototypeModel.Before).To(Equal(networkACLRuleReferenceModel)) - Expect(networkACLRulePrototypeModel.CreatedAt).To(Equal(CreateMockDateTime())) - Expect(networkACLRulePrototypeModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeModel.Before).To(Equal(networkACLRuleIdentityModel)) + Expect(networkACLRulePrototypeModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(networkACLRulePrototypeModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(networkACLRulePrototypeModel.Href).To(Equal(core.StringPtr("https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) - Expect(networkACLRulePrototypeModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(networkACLRulePrototypeModel.Name).To(Equal(core.StringPtr("my-rule-2"))) Expect(networkACLRulePrototypeModel.Protocol).To(Equal(core.StringPtr("all"))) - Expect(networkACLRulePrototypeModel.Source).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(networkACLRulePrototypeModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) // Construct an instance of the CreateNetworkACLRuleOptions model networkACLID := "testString" @@ -25211,11 +25180,11 @@ var _ = Describe(`VpcV1`, func() { Expect(createPublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateSecurityGroupOptions successfully`, func() { - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel).ToNot(BeNil()) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + Expect(securityGroupRulePrototypeRemoteModel).ToNot(BeNil()) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") + Expect(securityGroupRulePrototypeRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) @@ -25229,13 +25198,13 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) Expect(securityGroupRulePrototypeModel.Direction).To(Equal(core.StringPtr("inbound"))) Expect(securityGroupRulePrototypeModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(securityGroupRulePrototypeModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel)) + Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeRemoteModel)) Expect(securityGroupRulePrototypeModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(securityGroupRulePrototypeModel.Type).To(Equal(core.Int64Ptr(int64(8)))) @@ -25261,11 +25230,11 @@ var _ = Describe(`VpcV1`, func() { Expect(createSecurityGroupOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateSecurityGroupRuleOptions successfully`, func() { - // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP model - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP) - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel).ToNot(BeNil()) - securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address = core.StringPtr("192.168.3.4") - Expect(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) + // Construct an instance of the SecurityGroupRulePrototypeRemoteIP model + securityGroupRulePrototypeRemoteModel := new(vpcv1.SecurityGroupRulePrototypeRemoteIP) + Expect(securityGroupRulePrototypeRemoteModel).ToNot(BeNil()) + securityGroupRulePrototypeRemoteModel.Address = core.StringPtr("192.168.3.4") + Expect(securityGroupRulePrototypeRemoteModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) // Construct an instance of the SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp model securityGroupRulePrototypeModel := new(vpcv1.SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp) @@ -25273,13 +25242,13 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePrototypeModel.Direction = core.StringPtr("inbound") securityGroupRulePrototypeModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePrototypeModel.Protocol = core.StringPtr("icmp") - securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel + securityGroupRulePrototypeModel.Remote = securityGroupRulePrototypeRemoteModel securityGroupRulePrototypeModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePrototypeModel.Type = core.Int64Ptr(int64(8)) Expect(securityGroupRulePrototypeModel.Direction).To(Equal(core.StringPtr("inbound"))) Expect(securityGroupRulePrototypeModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) Expect(securityGroupRulePrototypeModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteModel)) + Expect(securityGroupRulePrototypeModel.Remote).To(Equal(securityGroupRulePrototypeRemoteModel)) Expect(securityGroupRulePrototypeModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(securityGroupRulePrototypeModel.Type).To(Equal(core.Int64Ptr(int64(8)))) @@ -25356,6 +25325,12 @@ var _ = Describe(`VpcV1`, func() { Expect(createSubnetOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVolumeOptions successfully`, func() { + // Construct an instance of the EncryptionKeyIdentityByCRN model + encryptionKeyIdentityModel := new(vpcv1.EncryptionKeyIdentityByCRN) + Expect(encryptionKeyIdentityModel).ToNot(BeNil()) + encryptionKeyIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"))) + // Construct an instance of the ResourceGroupIdentityByID model resourceGroupIdentityModel := new(vpcv1.ResourceGroupIdentityByID) Expect(resourceGroupIdentityModel).ToNot(BeNil()) @@ -25377,12 +25352,14 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumePrototypeVolumeByCapacity model volumePrototypeModel := new(vpcv1.VolumePrototypeVolumeByCapacity) Expect(volumePrototypeModel).ToNot(BeNil()) + volumePrototypeModel.EncryptionKey = encryptionKeyIdentityModel volumePrototypeModel.Iops = core.Int64Ptr(int64(10000)) volumePrototypeModel.Name = core.StringPtr("my-volume") volumePrototypeModel.Profile = volumeProfileIdentityModel volumePrototypeModel.ResourceGroup = resourceGroupIdentityModel volumePrototypeModel.Zone = zoneIdentityModel volumePrototypeModel.Capacity = core.Int64Ptr(int64(100)) + Expect(volumePrototypeModel.EncryptionKey).To(Equal(encryptionKeyIdentityModel)) Expect(volumePrototypeModel.Iops).To(Equal(core.Int64Ptr(int64(10000)))) Expect(volumePrototypeModel.Name).To(Equal(core.StringPtr("my-volume"))) Expect(volumePrototypeModel.Profile).To(Equal(volumeProfileIdentityModel)) @@ -25462,20 +25439,21 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the CreateVPCRouteOptions model vpcID := "testString" createVPCRouteOptionsDestination := "192.168.3.0/24" + var createVPCRouteOptionsNextHop vpcv1.RouteNextHopPrototypeIntf = nil var createVPCRouteOptionsZone vpcv1.ZoneIdentityIntf = nil - createVPCRouteOptionsModel := testService.NewCreateVPCRouteOptions(vpcID, createVPCRouteOptionsDestination, createVPCRouteOptionsZone) + createVPCRouteOptionsModel := testService.NewCreateVPCRouteOptions(vpcID, createVPCRouteOptionsDestination, createVPCRouteOptionsNextHop, createVPCRouteOptionsZone) createVPCRouteOptionsModel.SetVPCID("testString") createVPCRouteOptionsModel.SetDestination("192.168.3.0/24") + createVPCRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRouteOptionsModel.SetZone(zoneIdentityModel) createVPCRouteOptionsModel.SetName("my-route-2") - createVPCRouteOptionsModel.SetNextHop(routeNextHopPrototypeModel) createVPCRouteOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createVPCRouteOptionsModel).ToNot(BeNil()) Expect(createVPCRouteOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(createVPCRouteOptionsModel.Destination).To(Equal(core.StringPtr("192.168.3.0/24"))) + Expect(createVPCRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRouteOptionsModel.Zone).To(Equal(zoneIdentityModel)) Expect(createVPCRouteOptionsModel.Name).To(Equal(core.StringPtr("my-route-2"))) - Expect(createVPCRouteOptionsModel.NextHop).To(Equal(routeNextHopPrototypeModel)) Expect(createVPCRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPNGatewayConnectionOptions successfully`, func() { @@ -25513,9 +25491,9 @@ var _ = Describe(`VpcV1`, func() { createVPNGatewayConnectionOptionsModel.SetDeadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) createVPNGatewayConnectionOptionsModel.SetIkePolicy(ikePolicyIdentityModel) createVPNGatewayConnectionOptionsModel.SetIpsecPolicy(iPsecPolicyIdentityModel) - createVPNGatewayConnectionOptionsModel.SetLocalCidrs([]string{"192.168.1.0/24"}) + createVPNGatewayConnectionOptionsModel.SetLocalCIDRs([]string{"192.168.1.0/24"}) createVPNGatewayConnectionOptionsModel.SetName("my-vpn-connection") - createVPNGatewayConnectionOptionsModel.SetPeerCidrs([]string{"10.45.1.0/24"}) + createVPNGatewayConnectionOptionsModel.SetPeerCIDRs([]string{"10.45.1.0/24"}) createVPNGatewayConnectionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createVPNGatewayConnectionOptionsModel).ToNot(BeNil()) Expect(createVPNGatewayConnectionOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) @@ -25525,9 +25503,9 @@ var _ = Describe(`VpcV1`, func() { Expect(createVPNGatewayConnectionOptionsModel.DeadPeerDetection).To(Equal(vpnGatewayConnectionDpdPrototypeModel)) Expect(createVPNGatewayConnectionOptionsModel.IkePolicy).To(Equal(ikePolicyIdentityModel)) Expect(createVPNGatewayConnectionOptionsModel.IpsecPolicy).To(Equal(iPsecPolicyIdentityModel)) - Expect(createVPNGatewayConnectionOptionsModel.LocalCidrs).To(Equal([]string{"192.168.1.0/24"})) + Expect(createVPNGatewayConnectionOptionsModel.LocalCIDRs).To(Equal([]string{"192.168.1.0/24"})) Expect(createVPNGatewayConnectionOptionsModel.Name).To(Equal(core.StringPtr("my-vpn-connection"))) - Expect(createVPNGatewayConnectionOptionsModel.PeerCidrs).To(Equal([]string{"10.45.1.0/24"})) + Expect(createVPNGatewayConnectionOptionsModel.PeerCIDRs).To(Equal([]string{"10.45.1.0/24"})) Expect(createVPNGatewayConnectionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateVPNGatewayOptions successfully`, func() { @@ -26651,9 +26629,13 @@ var _ = Describe(`VpcV1`, func() { securityGroupID := "testString" listSecurityGroupNetworkInterfacesOptionsModel := testService.NewListSecurityGroupNetworkInterfacesOptions(securityGroupID) listSecurityGroupNetworkInterfacesOptionsModel.SetSecurityGroupID("testString") + listSecurityGroupNetworkInterfacesOptionsModel.SetStart("testString") + listSecurityGroupNetworkInterfacesOptionsModel.SetLimit(int64(1)) listSecurityGroupNetworkInterfacesOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listSecurityGroupNetworkInterfacesOptionsModel).ToNot(BeNil()) Expect(listSecurityGroupNetworkInterfacesOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) + Expect(listSecurityGroupNetworkInterfacesOptionsModel.Start).To(Equal(core.StringPtr("testString"))) + Expect(listSecurityGroupNetworkInterfacesOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1)))) Expect(listSecurityGroupNetworkInterfacesOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListSecurityGroupRulesOptions successfully`, func() { @@ -26761,31 +26743,31 @@ var _ = Describe(`VpcV1`, func() { Expect(listVpcsOptionsModel.ClassicAccess).To(Equal(core.BoolPtr(true))) Expect(listVpcsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewListVPNGatewayConnectionLocalCidrsOptions successfully`, func() { - // Construct an instance of the ListVPNGatewayConnectionLocalCidrsOptions model + It(`Invoke NewListVPNGatewayConnectionLocalCIDRsOptions successfully`, func() { + // Construct an instance of the ListVPNGatewayConnectionLocalCIDRsOptions model vpnGatewayID := "testString" id := "testString" - listVPNGatewayConnectionLocalCidrsOptionsModel := testService.NewListVPNGatewayConnectionLocalCidrsOptions(vpnGatewayID, id) - listVPNGatewayConnectionLocalCidrsOptionsModel.SetVPNGatewayID("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.SetID("testString") - listVPNGatewayConnectionLocalCidrsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel).ToNot(BeNil()) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionLocalCidrsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewListVPNGatewayConnectionPeerCidrsOptions successfully`, func() { - // Construct an instance of the ListVPNGatewayConnectionPeerCidrsOptions model + listVPNGatewayConnectionLocalCIDRsOptionsModel := testService.NewListVPNGatewayConnectionLocalCIDRsOptions(vpnGatewayID, id) + listVPNGatewayConnectionLocalCIDRsOptionsModel.SetVPNGatewayID("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.SetID("testString") + listVPNGatewayConnectionLocalCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel).ToNot(BeNil()) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionLocalCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + }) + It(`Invoke NewListVPNGatewayConnectionPeerCIDRsOptions successfully`, func() { + // Construct an instance of the ListVPNGatewayConnectionPeerCIDRsOptions model vpnGatewayID := "testString" id := "testString" - listVPNGatewayConnectionPeerCidrsOptionsModel := testService.NewListVPNGatewayConnectionPeerCidrsOptions(vpnGatewayID, id) - listVPNGatewayConnectionPeerCidrsOptionsModel.SetVPNGatewayID("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.SetID("testString") - listVPNGatewayConnectionPeerCidrsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel).ToNot(BeNil()) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(listVPNGatewayConnectionPeerCidrsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) + listVPNGatewayConnectionPeerCIDRsOptionsModel := testService.NewListVPNGatewayConnectionPeerCIDRsOptions(vpnGatewayID, id) + listVPNGatewayConnectionPeerCIDRsOptionsModel.SetVPNGatewayID("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.SetID("testString") + listVPNGatewayConnectionPeerCIDRsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel).ToNot(BeNil()) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(listVPNGatewayConnectionPeerCIDRsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewListVPNGatewayConnectionsOptions successfully`, func() { // Construct an instance of the ListVPNGatewayConnectionsOptions model @@ -26883,14 +26865,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLRuleReference successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - name := "my-rule-1" - model, err := testService.NewNetworkACLRuleReference(href, id, name) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewNetworkInterfacePrototype successfully`, func() { var subnet vpcv1.SubnetIdentityIntf = nil _, err := testService.NewNetworkInterfacePrototype(subnet) @@ -27044,23 +27018,23 @@ var _ = Describe(`VpcV1`, func() { Expect(unsetSubnetPublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateFloatingIPOptions successfully`, func() { - // Construct an instance of the NetworkInterfaceIdentityByID model - networkInterfaceIdentityModel := new(vpcv1.NetworkInterfaceIdentityByID) - Expect(networkInterfaceIdentityModel).ToNot(BeNil()) - networkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") - Expect(networkInterfaceIdentityModel.ID).To(Equal(core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e"))) + // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model + floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) + Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel).ToNot(BeNil()) + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel.ID).To(Equal(core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e"))) // Construct an instance of the UpdateFloatingIPOptions model id := "testString" updateFloatingIPOptionsModel := testService.NewUpdateFloatingIPOptions(id) updateFloatingIPOptionsModel.SetID("testString") updateFloatingIPOptionsModel.SetName("my-floating-ip") - updateFloatingIPOptionsModel.SetTarget(networkInterfaceIdentityModel) + updateFloatingIPOptionsModel.SetTarget(floatingIPPatchTargetNetworkInterfaceIdentityModel) updateFloatingIPOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateFloatingIPOptionsModel).ToNot(BeNil()) Expect(updateFloatingIPOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(updateFloatingIPOptionsModel.Name).To(Equal(core.StringPtr("my-floating-ip"))) - Expect(updateFloatingIPOptionsModel.Target).To(Equal(networkInterfaceIdentityModel)) + Expect(updateFloatingIPOptionsModel.Target).To(Equal(floatingIPPatchTargetNetworkInterfaceIdentityModel)) Expect(updateFloatingIPOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateFlowLogCollectorOptions successfully`, func() { @@ -27375,11 +27349,11 @@ var _ = Describe(`VpcV1`, func() { Expect(updateNetworkACLOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateNetworkACLRuleOptions successfully`, func() { - // Construct an instance of the NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID model - networkACLRulePatchBeforeModel := new(vpcv1.NetworkACLRulePatchBeforeNetworkACLRuleIdentityByID) - Expect(networkACLRulePatchBeforeModel).ToNot(BeNil()) - networkACLRulePatchBeforeModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") - Expect(networkACLRulePatchBeforeModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) + // Construct an instance of the NetworkACLRuleIdentityByID model + networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) + Expect(networkACLRuleIdentityModel).ToNot(BeNil()) + networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + Expect(networkACLRuleIdentityModel.ID).To(Equal(core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9"))) // Construct an instance of the UpdateNetworkACLRuleOptions model networkACLID := "testString" @@ -27388,7 +27362,7 @@ var _ = Describe(`VpcV1`, func() { updateNetworkACLRuleOptionsModel.SetNetworkACLID("testString") updateNetworkACLRuleOptionsModel.SetID("testString") updateNetworkACLRuleOptionsModel.SetAction("allow") - updateNetworkACLRuleOptionsModel.SetBefore(networkACLRulePatchBeforeModel) + updateNetworkACLRuleOptionsModel.SetBefore(networkACLRuleIdentityModel) updateNetworkACLRuleOptionsModel.SetCode(int64(0)) updateNetworkACLRuleOptionsModel.SetDestination("192.168.3.2/32") updateNetworkACLRuleOptionsModel.SetDestinationPortMax(int64(22)) @@ -27404,7 +27378,7 @@ var _ = Describe(`VpcV1`, func() { Expect(updateNetworkACLRuleOptionsModel.NetworkACLID).To(Equal(core.StringPtr("testString"))) Expect(updateNetworkACLRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(updateNetworkACLRuleOptionsModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(updateNetworkACLRuleOptionsModel.Before).To(Equal(networkACLRulePatchBeforeModel)) + Expect(updateNetworkACLRuleOptionsModel.Before).To(Equal(networkACLRuleIdentityModel)) Expect(updateNetworkACLRuleOptionsModel.Code).To(Equal(core.Int64Ptr(int64(0)))) Expect(updateNetworkACLRuleOptionsModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) Expect(updateNetworkACLRuleOptionsModel.DestinationPortMax).To(Equal(core.Int64Ptr(int64(22)))) @@ -27646,8 +27620,38 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewEncryptionKeyIdentityByCRN successfully`, func() { + crn := "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179" + model, err := testService.NewEncryptionKeyIdentityByCRN(crn) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref successfully`, func() { + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPByTargetTargetNetworkInterfaceIdentityByHref(href) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID successfully`, func() { + id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPByTargetTargetNetworkInterfaceIdentityByID(id) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { + href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) + It(`Invoke NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { + id := "10c02d81-0ecb-4dc5-897d-28392913b81e" + model, err := testService.NewFloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewFloatingIPPrototypeFloatingIPByTarget successfully`, func() { - var target vpcv1.NetworkInterfaceIdentityIntf = nil + var target vpcv1.FloatingIPByTargetTargetIntf = nil _, err := testService.NewFloatingIPPrototypeFloatingIPByTarget(target) Expect(err).ToNot(BeNil()) }) @@ -27729,12 +27733,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewKeyIdentityByFingerprint successfully`, func() { - fingerprint := "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY" - model, err := testService.NewKeyIdentityByFingerprint(fingerprint) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewKeyIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/keys/a6b1a881-2ce8-41a3-80fc-36316a73f803" model, err := testService.NewKeyIdentityByHref(href) @@ -27747,6 +27745,12 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) + It(`Invoke NewKeyIdentityKeyIdentityByFingerprint successfully`, func() { + fingerprint := "SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY" + model, err := testService.NewKeyIdentityKeyIdentityByFingerprint(fingerprint) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewLoadBalancerListenerPolicyPrototypeTargetLoadBalancerListenerPolicyRedirectURLPrototype successfully`, func() { httpStatusCode := int64(301) url := "https://www.redirect.com" @@ -27801,123 +27805,75 @@ var _ = Describe(`VpcV1`, func() { _, err := testService.NewNetworkACLPrototypeNetworkACLBySourceNetworkACL(vpc, sourceNetworkACL) Expect(err).ToNot(BeNil()) }) - It(`Invoke NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref successfully`, func() { + It(`Invoke NewNetworkACLRuleIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByHref(href) + model, err := testService.NewNetworkACLRuleIdentityByHref(href) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID successfully`, func() { + It(`Invoke NewNetworkACLRuleIdentityByID successfully`, func() { id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePatchBeforeNetworkACLRuleIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID successfully`, func() { - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - model, err := testService.NewNetworkACLRulePrototypeBeforeNetworkACLRuleIdentityByID(id) + model, err := testService.NewNetworkACLRuleIdentityByID(id) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "all" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "icmp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "udp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "all" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action, createdAt, destination, direction, href, id, ipVersion, name, source) + protocol := "icmp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp successfully`, func() { action := "allow" - createdAt := CreateMockDateTime() - destination := "192.168.3.0/24" + destination := "192.168.3.2/32" direction := "inbound" - href := "https://us-south.iaas.cloud.ibm.com/v1/network_acls/a4e28308-8ee7-46ab-8108-9f881f22bdbf/rules/8daca77a-4980-4d33-8f3e-7038797be8f9" - id := "8daca77a-4980-4d33-8f3e-7038797be8f9" - ipVersion := "ipv4" - name := "my-rule-2" - source := "192.168.3.0/24" - model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action, createdAt, destination, direction, href, id, ipVersion, name, source) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkInterfaceIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" - model, err := testService.NewNetworkInterfaceIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkInterfaceIdentityByID successfully`, func() { - id := "10c02d81-0ecb-4dc5-897d-28392913b81e" - model, err := testService.NewNetworkInterfaceIdentityByID(id) + protocol := "udp" + source := "192.168.3.2/32" + model, err := testService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action, destination, direction, protocol, source) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) @@ -28005,42 +27961,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR successfully`, func() { - cidrBlock := "192.168.3.0/24" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteCIDR(cidrBlock) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP successfully`, func() { - address := "192.168.3.4" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteIP(address) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll successfully`, func() { direction := "inbound" model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction) @@ -28175,15 +28095,15 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { + It(`Invoke NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/network_interfaces/10c02d81-0ecb-4dc5-897d-28392913b81e" - model, err := testService.NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) + model, err := testService.NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByHref(href) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { + It(`Invoke NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID successfully`, func() { id := "10c02d81-0ecb-4dc5-897d-28392913b81e" - model, err := testService.NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) + model, err := testService.NewFlowLogCollectorPrototypeTargetNetworkInterfaceIdentityNetworkInterfaceIdentityNetworkInterfaceIdentityByID(id) Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) @@ -28307,60 +28227,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAllRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN successfully`, func() { - crn := "crn:v1:bluemix:public:is:us-south:a/123456::security-group:be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByCRN(crn) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref successfully`, func() { - href := "https://us-south.iaas.cloud.ibm.com/v1/security_groups/be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByHref(href) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID successfully`, func() { - id := "be5df5ca-12a0-494b-907e-aa6ec2bfa271" - model, err := testService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpRemoteSecurityGroupIdentitySecurityGroupIdentityByID(id) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewVolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByCRN successfully`, func() { crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5" model, err := testService.NewVolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByCRN(crn)