diff --git a/Makefile b/Makefile index 05022be..fbd3aa7 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: build lint tidy -travis-ci: build lint tidy alltestgen2 alltestgen1 +travis-ci: build lint tidy unittest build: go build ./... diff --git a/go.mod b/go.mod index b6aea01..086fdf3 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.3.0 + github.com/IBM/go-sdk-core/v4 v4.5.1 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 ed30ee7..b4f7470 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/IBM/go-sdk-core/v4 v4.3.0 h1:gWfy8HpptwpgKqXaDPwgomcRTED7wJLkd+nDoz3undo= -github.com/IBM/go-sdk-core/v4 v4.3.0/go.mod h1:lTUXbqIX6/aAbSCkP6q59+dyFsTwZAc0ewRS2vJWVbg= +github.com/IBM/go-sdk-core/v4 v4.5.1 h1:CmXLPY1CkbWY+JS7ncGxLoM4lfF+viA8JPc5anWgoF8= +github.com/IBM/go-sdk-core/v4 v4.5.1/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 b7b1efe..97ecd0a 100644 --- a/vpcclassicv1/vpc_classic_v1.go +++ b/vpcclassicv1/vpc_classic_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.12.0-64fe8d3f-20200820-144050 + * IBM OpenAPI SDK Code Generator Version: 3.12.3-81ed37e0-20200929-215851 */ // Package vpcclassicv1 : Operations and models for the VpcClassicV1 service @@ -34,7 +34,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-08-25 +// Version: 2020-10-06 type VpcClassicV1 struct { Service *core.BaseService @@ -110,10 +110,6 @@ func NewVpcClassicV1(options *VpcClassicV1Options) (service *VpcClassicV1, err e return } - if options.Version == nil { - options.Version = core.StringPtr("2020-08-25") - } - if options.URL != "" { err = baseService.SetServiceURL(options.URL) if err != nil { @@ -121,6 +117,10 @@ func NewVpcClassicV1(options *VpcClassicV1Options) (service *VpcClassicV1, err e } } + if options.Version == nil { + options.Version = core.StringPtr("2020-10-06") + } + service = &VpcClassicV1{ Service: baseService, Version: options.Version, @@ -145,11 +145,8 @@ func (vpcClassic *VpcClassicV1) ListVpcs(listVpcsOptions *ListVpcsOptions) (resu return } - pathSegments := []string{"vpcs"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs`, nil) if err != nil { return } @@ -204,11 +201,8 @@ func (vpcClassic *VpcClassicV1) CreateVPC(createVPCOptions *CreateVPCOptions) (r return } - pathSegments := []string{"vpcs"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs`, nil) if err != nil { return } @@ -278,11 +272,12 @@ func (vpcClassic *VpcClassicV1) DeleteVPC(deleteVPCOptions *DeleteVPCOptions) (r return } - pathSegments := []string{"vpcs"} - pathParameters := []string{*deleteVPCOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteVPCOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { return } @@ -321,11 +316,12 @@ func (vpcClassic *VpcClassicV1) GetVPC(getVPCOptions *GetVPCOptions) (result *VP return } - pathSegments := []string{"vpcs"} - pathParameters := []string{*getVPCOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPCOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { return } @@ -374,11 +370,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPC(updateVPCOptions *UpdateVPCOptions) (r return } - pathSegments := []string{"vpcs"} - pathParameters := []string{*updateVPCOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateVPCOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { return } @@ -392,16 +389,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPC(updateVPCOptions *UpdateVPCOptions) (r builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateVPCOptions.Name != nil { - body["name"] = updateVPCOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPCOptions.VPCPatch) if err != nil { return } @@ -438,11 +431,12 @@ func (vpcClassic *VpcClassicV1) GetVPCDefaultSecurityGroup(getVPCDefaultSecurity return } - pathSegments := []string{"vpcs", "default_security_group"} - pathParameters := []string{*getVPCDefaultSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPCDefaultSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{id}/default_security_group`, pathParamsMap) if err != nil { return } @@ -491,11 +485,12 @@ func (vpcClassic *VpcClassicV1) ListVPCAddressPrefixes(listVPCAddressPrefixesOpt return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*listVPCAddressPrefixesOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *listVPCAddressPrefixesOptions.VPCID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap) if err != nil { return } @@ -551,11 +546,12 @@ func (vpcClassic *VpcClassicV1) CreateVPCAddressPrefix(createVPCAddressPrefixOpt return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*createVPCAddressPrefixOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *createVPCAddressPrefixOptions.VPCID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap) if err != nil { return } @@ -624,11 +620,13 @@ func (vpcClassic *VpcClassicV1) DeleteVPCAddressPrefix(deleteVPCAddressPrefixOpt return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*deleteVPCAddressPrefixOptions.VPCID, *deleteVPCAddressPrefixOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *deleteVPCAddressPrefixOptions.VPCID, + "id": *deleteVPCAddressPrefixOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { return } @@ -667,11 +665,13 @@ func (vpcClassic *VpcClassicV1) GetVPCAddressPrefix(getVPCAddressPrefixOptions * return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*getVPCAddressPrefixOptions.VPCID, *getVPCAddressPrefixOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *getVPCAddressPrefixOptions.VPCID, + "id": *getVPCAddressPrefixOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { return } @@ -721,11 +721,13 @@ func (vpcClassic *VpcClassicV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOpt return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*updateVPCAddressPrefixOptions.VPCID, *updateVPCAddressPrefixOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *updateVPCAddressPrefixOptions.VPCID, + "id": *updateVPCAddressPrefixOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { return } @@ -739,19 +741,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOpt builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateVPCAddressPrefixOptions.Name != nil { - body["name"] = updateVPCAddressPrefixOptions.Name - } - if updateVPCAddressPrefixOptions.IsDefault != nil { - body["is_default"] = updateVPCAddressPrefixOptions.IsDefault - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPCAddressPrefixOptions.AddressPrefixPatch) if err != nil { return } @@ -776,10 +771,9 @@ func (vpcClassic *VpcClassicV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOpt } // ListVPCRoutes : List all routes in the VPC's default routing table -// This request retrieves routes in the VPC's default routing table. For compatibility, routes with `action` values -// other than `deliver` are omitted. Each route is zone-specific and directs any packets matching its destination CIDR -// block to a `next_hop` IP address. The most specific route matching a packet's destination will be used. If multiple -// equally-specific routes exist, traffic will be distributed across them. +// This request retrieves routes in the VPC's default routing table. Each route is zone-specific and directs any packets +// matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's +// destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them. func (vpcClassic *VpcClassicV1) ListVPCRoutes(listVPCRoutesOptions *ListVPCRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPCRoutesOptions, "listVPCRoutesOptions cannot be nil") if err != nil { @@ -790,11 +784,12 @@ func (vpcClassic *VpcClassicV1) ListVPCRoutes(listVPCRoutesOptions *ListVPCRoute return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*listVPCRoutesOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *listVPCRoutesOptions.VPCID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap) if err != nil { return } @@ -848,11 +843,12 @@ func (vpcClassic *VpcClassicV1) CreateVPCRoute(createVPCRouteOptions *CreateVPCR return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*createVPCRouteOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *createVPCRouteOptions.VPCID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap) if err != nil { return } @@ -920,11 +916,13 @@ func (vpcClassic *VpcClassicV1) DeleteVPCRoute(deleteVPCRouteOptions *DeleteVPCR return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*deleteVPCRouteOptions.VPCID, *deleteVPCRouteOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *deleteVPCRouteOptions.VPCID, + "id": *deleteVPCRouteOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { return } @@ -963,11 +961,13 @@ func (vpcClassic *VpcClassicV1) GetVPCRoute(getVPCRouteOptions *GetVPCRouteOptio return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*getVPCRouteOptions.VPCID, *getVPCRouteOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *getVPCRouteOptions.VPCID, + "id": *getVPCRouteOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { return } @@ -1017,11 +1017,13 @@ func (vpcClassic *VpcClassicV1) UpdateVPCRoute(updateVPCRouteOptions *UpdateVPCR return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*updateVPCRouteOptions.VPCID, *updateVPCRouteOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *updateVPCRouteOptions.VPCID, + "id": *updateVPCRouteOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { return } @@ -1035,16 +1037,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPCRoute(updateVPCRouteOptions *UpdateVPCR builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateVPCRouteOptions.Name != nil { - body["name"] = updateVPCRouteOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPCRouteOptions.RoutePatch) if err != nil { return } @@ -1077,11 +1075,8 @@ func (vpcClassic *VpcClassicV1) ListSubnets(listSubnetsOptions *ListSubnetsOptio return } - pathSegments := []string{"subnets"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets`, nil) if err != nil { return } @@ -1138,11 +1133,8 @@ func (vpcClassic *VpcClassicV1) CreateSubnet(createSubnetOptions *CreateSubnetOp return } - pathSegments := []string{"subnets"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets`, nil) if err != nil { return } @@ -1201,11 +1193,12 @@ func (vpcClassic *VpcClassicV1) DeleteSubnet(deleteSubnetOptions *DeleteSubnetOp return } - pathSegments := []string{"subnets"} - pathParameters := []string{*deleteSubnetOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteSubnetOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { return } @@ -1244,11 +1237,12 @@ func (vpcClassic *VpcClassicV1) GetSubnet(getSubnetOptions *GetSubnetOptions) (r return } - pathSegments := []string{"subnets"} - pathParameters := []string{*getSubnetOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSubnetOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { return } @@ -1298,11 +1292,12 @@ func (vpcClassic *VpcClassicV1) UpdateSubnet(updateSubnetOptions *UpdateSubnetOp return } - pathSegments := []string{"subnets"} - pathParameters := []string{*updateSubnetOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateSubnetOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { return } @@ -1316,22 +1311,12 @@ func (vpcClassic *VpcClassicV1) UpdateSubnet(updateSubnetOptions *UpdateSubnetOp builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateSubnetOptions.Name != nil { - body["name"] = updateSubnetOptions.Name - } - if updateSubnetOptions.NetworkACL != nil { - body["network_acl"] = updateSubnetOptions.NetworkACL - } - if updateSubnetOptions.PublicGateway != nil { - body["public_gateway"] = updateSubnetOptions.PublicGateway - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateSubnetOptions.SubnetPatch) if err != nil { return } @@ -1367,11 +1352,12 @@ func (vpcClassic *VpcClassicV1) GetSubnetNetworkACL(getSubnetNetworkACLOptions * return } - pathSegments := []string{"subnets", "network_acl"} - pathParameters := []string{*getSubnetNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSubnetNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap) if err != nil { return } @@ -1421,11 +1407,12 @@ func (vpcClassic *VpcClassicV1) ReplaceSubnetNetworkACL(replaceSubnetNetworkACLO return } - pathSegments := []string{"subnets", "network_acl"} - pathParameters := []string{*replaceSubnetNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *replaceSubnetNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap) if err != nil { return } @@ -1480,11 +1467,12 @@ func (vpcClassic *VpcClassicV1) UnsetSubnetPublicGateway(unsetSubnetPublicGatewa return } - pathSegments := []string{"subnets", "public_gateway"} - pathParameters := []string{*unsetSubnetPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *unsetSubnetPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { return } @@ -1523,11 +1511,12 @@ func (vpcClassic *VpcClassicV1) GetSubnetPublicGateway(getSubnetPublicGatewayOpt return } - pathSegments := []string{"subnets", "public_gateway"} - pathParameters := []string{*getSubnetPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSubnetPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { return } @@ -1577,11 +1566,12 @@ func (vpcClassic *VpcClassicV1) SetSubnetPublicGateway(setSubnetPublicGatewayOpt return } - pathSegments := []string{"subnets", "public_gateway"} - pathParameters := []string{*setSubnetPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *setSubnetPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { return } @@ -1627,17 +1617,17 @@ func (vpcClassic *VpcClassicV1) SetSubnetPublicGateway(setSubnetPublicGatewayOpt // ListImages : List all images // This request lists all provisionable images available in the region. An image provides source data for a volume. // Images are either system-provided, or created from another source, such as importing from object storage. +// +// The images will be sorted by their `created_at` property values, with the newest first. Images with identical +// `created_at` values will be secondarily sorted by ascending `id` property values. func (vpcClassic *VpcClassicV1) ListImages(listImagesOptions *ListImagesOptions) (result *ImageCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listImagesOptions, "listImagesOptions") if err != nil { return } - pathSegments := []string{"images"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/images`, nil) if err != nil { return } @@ -1703,11 +1693,8 @@ func (vpcClassic *VpcClassicV1) CreateImage(createImageOptions *CreateImageOptio return } - pathSegments := []string{"images"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/images`, nil) if err != nil { return } @@ -1763,11 +1750,12 @@ func (vpcClassic *VpcClassicV1) DeleteImage(deleteImageOptions *DeleteImageOptio return } - pathSegments := []string{"images"} - pathParameters := []string{*deleteImageOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteImageOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { return } @@ -1806,11 +1794,12 @@ func (vpcClassic *VpcClassicV1) GetImage(getImageOptions *GetImageOptions) (resu return } - pathSegments := []string{"images"} - pathParameters := []string{*getImageOptions.ID} + pathParamsMap := map[string]string{ + "id": *getImageOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { return } @@ -1861,11 +1850,12 @@ func (vpcClassic *VpcClassicV1) UpdateImage(updateImageOptions *UpdateImageOptio return } - pathSegments := []string{"images"} - pathParameters := []string{*updateImageOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateImageOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { return } @@ -1879,16 +1869,12 @@ func (vpcClassic *VpcClassicV1) UpdateImage(updateImageOptions *UpdateImageOptio builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateImageOptions.Name != nil { - body["name"] = updateImageOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateImageOptions.ImagePatch) if err != nil { return } @@ -1920,11 +1906,8 @@ func (vpcClassic *VpcClassicV1) ListOperatingSystems(listOperatingSystemsOptions return } - pathSegments := []string{"operating_systems"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/operating_systems`, nil) if err != nil { return } @@ -1979,11 +1962,12 @@ func (vpcClassic *VpcClassicV1) GetOperatingSystem(getOperatingSystemOptions *Ge return } - pathSegments := []string{"operating_systems"} - pathParameters := []string{*getOperatingSystemOptions.Name} + pathParamsMap := map[string]string{ + "name": *getOperatingSystemOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/operating_systems/{name}`, pathParamsMap) if err != nil { return } @@ -2029,11 +2013,8 @@ func (vpcClassic *VpcClassicV1) ListKeys(listKeysOptions *ListKeysOptions) (resu return } - pathSegments := []string{"keys"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/keys`, nil) if err != nil { return } @@ -2090,11 +2071,8 @@ func (vpcClassic *VpcClassicV1) CreateKey(createKeyOptions *CreateKeyOptions) (r return } - pathSegments := []string{"keys"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/keys`, nil) if err != nil { return } @@ -2162,11 +2140,12 @@ func (vpcClassic *VpcClassicV1) DeleteKey(deleteKeyOptions *DeleteKeyOptions) (r return } - pathSegments := []string{"keys"} - pathParameters := []string{*deleteKeyOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteKeyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { return } @@ -2205,11 +2184,12 @@ func (vpcClassic *VpcClassicV1) GetKey(getKeyOptions *GetKeyOptions) (result *Ke return } - pathSegments := []string{"keys"} - pathParameters := []string{*getKeyOptions.ID} + pathParamsMap := map[string]string{ + "id": *getKeyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { return } @@ -2258,11 +2238,12 @@ func (vpcClassic *VpcClassicV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (r return } - pathSegments := []string{"keys"} - pathParameters := []string{*updateKeyOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateKeyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { return } @@ -2276,16 +2257,12 @@ func (vpcClassic *VpcClassicV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (r builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateKeyOptions.Name != nil { - body["name"] = updateKeyOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateKeyOptions.KeyPatch) if err != nil { return } @@ -2310,19 +2287,14 @@ func (vpcClassic *VpcClassicV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (r } // ListInstanceProfiles : List all instance profiles -// This request lists all instance profiles available in the region. An instance profile specifies the performance -// characteristics and pricing model for an instance. func (vpcClassic *VpcClassicV1) ListInstanceProfiles(listInstanceProfilesOptions *ListInstanceProfilesOptions) (result *InstanceProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listInstanceProfilesOptions, "listInstanceProfilesOptions") if err != nil { return } - pathSegments := []string{"instance/profiles"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instance/profiles`, nil) if err != nil { return } @@ -2377,11 +2349,12 @@ func (vpcClassic *VpcClassicV1) GetInstanceProfile(getInstanceProfileOptions *Ge return } - pathSegments := []string{"instance/profiles"} - pathParameters := []string{*getInstanceProfileOptions.Name} + pathParamsMap := map[string]string{ + "name": *getInstanceProfileOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instance/profiles/{name}`, pathParamsMap) if err != nil { return } @@ -2426,11 +2399,8 @@ func (vpcClassic *VpcClassicV1) ListInstances(listInstancesOptions *ListInstance return } - pathSegments := []string{"instances"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances`, nil) if err != nil { return } @@ -2496,11 +2466,8 @@ func (vpcClassic *VpcClassicV1) CreateInstance(createInstanceOptions *CreateInst return } - pathSegments := []string{"instances"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances`, nil) if err != nil { return } @@ -2557,11 +2524,12 @@ func (vpcClassic *VpcClassicV1) DeleteInstance(deleteInstanceOptions *DeleteInst return } - pathSegments := []string{"instances"} - pathParameters := []string{*deleteInstanceOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteInstanceOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { return } @@ -2600,11 +2568,12 @@ func (vpcClassic *VpcClassicV1) GetInstance(getInstanceOptions *GetInstanceOptio return } - pathSegments := []string{"instances"} - pathParameters := []string{*getInstanceOptions.ID} + pathParamsMap := map[string]string{ + "id": *getInstanceOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { return } @@ -2654,11 +2623,12 @@ func (vpcClassic *VpcClassicV1) UpdateInstance(updateInstanceOptions *UpdateInst return } - pathSegments := []string{"instances"} - pathParameters := []string{*updateInstanceOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateInstanceOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { return } @@ -2672,16 +2642,12 @@ func (vpcClassic *VpcClassicV1) UpdateInstance(updateInstanceOptions *UpdateInst builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateInstanceOptions.Name != nil { - body["name"] = updateInstanceOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceOptions.InstancePatch) if err != nil { return } @@ -2718,11 +2684,12 @@ func (vpcClassic *VpcClassicV1) GetInstanceInitialization(getInstanceInitializat return } - pathSegments := []string{"instances", "initialization"} - pathParameters := []string{*getInstanceInitializationOptions.ID} + pathParamsMap := map[string]string{ + "id": *getInstanceInitializationOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{id}/initialization`, pathParamsMap) if err != nil { return } @@ -2772,11 +2739,12 @@ func (vpcClassic *VpcClassicV1) CreateInstanceAction(createInstanceActionOptions return } - pathSegments := []string{"instances", "actions"} - pathParameters := []string{*createInstanceActionOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *createInstanceActionOptions.InstanceID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/actions`, pathParamsMap) if err != nil { return } @@ -2838,11 +2806,12 @@ func (vpcClassic *VpcClassicV1) ListInstanceNetworkInterfaces(listInstanceNetwor return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*listInstanceNetworkInterfacesOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *listInstanceNetworkInterfacesOptions.InstanceID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap) if err != nil { return } @@ -2891,11 +2860,13 @@ func (vpcClassic *VpcClassicV1) GetInstanceNetworkInterface(getInstanceNetworkIn return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*getInstanceNetworkInterfaceOptions.InstanceID, *getInstanceNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *getInstanceNetworkInterfaceOptions.InstanceID, + "id": *getInstanceNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -2944,11 +2915,13 @@ func (vpcClassic *VpcClassicV1) ListInstanceNetworkInterfaceFloatingIps(listInst return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*listInstanceNetworkInterfaceFloatingIpsOptions.InstanceID, *listInstanceNetworkInterfaceFloatingIpsOptions.NetworkInterfaceID} + pathParamsMap := map[string]string{ + "instance_id": *listInstanceNetworkInterfaceFloatingIpsOptions.InstanceID, + "network_interface_id": *listInstanceNetworkInterfaceFloatingIpsOptions.NetworkInterfaceID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips`, pathParamsMap) if err != nil { return } @@ -2997,11 +2970,14 @@ func (vpcClassic *VpcClassicV1) RemoveInstanceNetworkInterfaceFloatingIP(removeI return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*removeInstanceNetworkInterfaceFloatingIPOptions.InstanceID, *removeInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, *removeInstanceNetworkInterfaceFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *removeInstanceNetworkInterfaceFloatingIPOptions.InstanceID, + "network_interface_id": *removeInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, + "id": *removeInstanceNetworkInterfaceFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -3041,11 +3017,14 @@ func (vpcClassic *VpcClassicV1) GetInstanceNetworkInterfaceFloatingIP(getInstanc return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*getInstanceNetworkInterfaceFloatingIPOptions.InstanceID, *getInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, *getInstanceNetworkInterfaceFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *getInstanceNetworkInterfaceFloatingIPOptions.InstanceID, + "network_interface_id": *getInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, + "id": *getInstanceNetworkInterfaceFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -3096,11 +3075,14 @@ func (vpcClassic *VpcClassicV1) AddInstanceNetworkInterfaceFloatingIP(addInstanc return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*addInstanceNetworkInterfaceFloatingIPOptions.InstanceID, *addInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, *addInstanceNetworkInterfaceFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *addInstanceNetworkInterfaceFloatingIPOptions.InstanceID, + "network_interface_id": *addInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, + "id": *addInstanceNetworkInterfaceFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -3151,11 +3133,12 @@ func (vpcClassic *VpcClassicV1) ListInstanceVolumeAttachments(listInstanceVolume return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*listInstanceVolumeAttachmentsOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *listInstanceVolumeAttachmentsOptions.InstanceID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap) if err != nil { return } @@ -3206,11 +3189,12 @@ func (vpcClassic *VpcClassicV1) CreateInstanceVolumeAttachment(createInstanceVol return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*createInstanceVolumeAttachmentOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *createInstanceVolumeAttachmentOptions.InstanceID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap) if err != nil { return } @@ -3233,12 +3217,12 @@ func (vpcClassic *VpcClassicV1) CreateInstanceVolumeAttachment(createInstanceVol if createInstanceVolumeAttachmentOptions.Volume != nil { body["volume"] = createInstanceVolumeAttachmentOptions.Volume } - if createInstanceVolumeAttachmentOptions.Name != nil { - body["name"] = createInstanceVolumeAttachmentOptions.Name - } if createInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete != nil { body["delete_volume_on_instance_delete"] = createInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete } + if createInstanceVolumeAttachmentOptions.Name != nil { + body["name"] = createInstanceVolumeAttachmentOptions.Name + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -3275,11 +3259,13 @@ func (vpcClassic *VpcClassicV1) DeleteInstanceVolumeAttachment(deleteInstanceVol return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*deleteInstanceVolumeAttachmentOptions.InstanceID, *deleteInstanceVolumeAttachmentOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *deleteInstanceVolumeAttachmentOptions.InstanceID, + "id": *deleteInstanceVolumeAttachmentOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { return } @@ -3318,11 +3304,13 @@ func (vpcClassic *VpcClassicV1) GetInstanceVolumeAttachment(getInstanceVolumeAtt return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*getInstanceVolumeAttachmentOptions.InstanceID, *getInstanceVolumeAttachmentOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *getInstanceVolumeAttachmentOptions.InstanceID, + "id": *getInstanceVolumeAttachmentOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { return } @@ -3373,11 +3361,13 @@ func (vpcClassic *VpcClassicV1) UpdateInstanceVolumeAttachment(updateInstanceVol return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*updateInstanceVolumeAttachmentOptions.InstanceID, *updateInstanceVolumeAttachmentOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *updateInstanceVolumeAttachmentOptions.InstanceID, + "id": *updateInstanceVolumeAttachmentOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { return } @@ -3391,19 +3381,12 @@ func (vpcClassic *VpcClassicV1) UpdateInstanceVolumeAttachment(updateInstanceVol builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateInstanceVolumeAttachmentOptions.Name != nil { - body["name"] = updateInstanceVolumeAttachmentOptions.Name - } - if updateInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete != nil { - body["delete_volume_on_instance_delete"] = updateInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceVolumeAttachmentOptions.VolumeAttachmentPatch) if err != nil { return } @@ -3436,11 +3419,8 @@ func (vpcClassic *VpcClassicV1) ListVolumeProfiles(listVolumeProfilesOptions *Li return } - pathSegments := []string{"volume/profiles"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volume/profiles`, nil) if err != nil { return } @@ -3495,11 +3475,12 @@ func (vpcClassic *VpcClassicV1) GetVolumeProfile(getVolumeProfileOptions *GetVol return } - pathSegments := []string{"volume/profiles"} - pathParameters := []string{*getVolumeProfileOptions.Name} + pathParamsMap := map[string]string{ + "name": *getVolumeProfileOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volume/profiles/{name}`, pathParamsMap) if err != nil { return } @@ -3545,11 +3526,8 @@ func (vpcClassic *VpcClassicV1) ListVolumes(listVolumesOptions *ListVolumesOptio return } - pathSegments := []string{"volumes"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volumes`, nil) if err != nil { return } @@ -3611,11 +3589,8 @@ func (vpcClassic *VpcClassicV1) CreateVolume(createVolumeOptions *CreateVolumeOp return } - pathSegments := []string{"volumes"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volumes`, nil) if err != nil { return } @@ -3671,11 +3646,12 @@ func (vpcClassic *VpcClassicV1) DeleteVolume(deleteVolumeOptions *DeleteVolumeOp return } - pathSegments := []string{"volumes"} - pathParameters := []string{*deleteVolumeOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteVolumeOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { return } @@ -3714,11 +3690,12 @@ func (vpcClassic *VpcClassicV1) GetVolume(getVolumeOptions *GetVolumeOptions) (r return } - pathSegments := []string{"volumes"} - pathParameters := []string{*getVolumeOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVolumeOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { return } @@ -3768,11 +3745,12 @@ func (vpcClassic *VpcClassicV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOp return } - pathSegments := []string{"volumes"} - pathParameters := []string{*updateVolumeOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateVolumeOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { return } @@ -3786,16 +3764,12 @@ func (vpcClassic *VpcClassicV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOp builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateVolumeOptions.Name != nil { - body["name"] = updateVolumeOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVolumeOptions.VolumePatch) if err != nil { return } @@ -3831,11 +3805,8 @@ func (vpcClassic *VpcClassicV1) ListRegions(listRegionsOptions *ListRegionsOptio return } - pathSegments := []string{"regions"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/regions`, nil) if err != nil { return } @@ -3884,11 +3855,12 @@ func (vpcClassic *VpcClassicV1) GetRegion(getRegionOptions *GetRegionOptions) (r return } - pathSegments := []string{"regions"} - pathParameters := []string{*getRegionOptions.Name} + pathParamsMap := map[string]string{ + "name": *getRegionOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/regions/{name}`, pathParamsMap) if err != nil { return } @@ -3938,11 +3910,12 @@ func (vpcClassic *VpcClassicV1) ListRegionZones(listRegionZonesOptions *ListRegi return } - pathSegments := []string{"regions", "zones"} - pathParameters := []string{*listRegionZonesOptions.RegionName} + pathParamsMap := map[string]string{ + "region_name": *listRegionZonesOptions.RegionName, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/regions/{region_name}/zones`, pathParamsMap) if err != nil { return } @@ -3991,11 +3964,13 @@ func (vpcClassic *VpcClassicV1) GetRegionZone(getRegionZoneOptions *GetRegionZon return } - pathSegments := []string{"regions", "zones"} - pathParameters := []string{*getRegionZoneOptions.RegionName, *getRegionZoneOptions.ZoneName} + pathParamsMap := map[string]string{ + "region_name": *getRegionZoneOptions.RegionName, + "zone_name": *getRegionZoneOptions.ZoneName, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/regions/{region_name}/zones/{zone_name}`, pathParamsMap) if err != nil { return } @@ -4042,11 +4017,8 @@ func (vpcClassic *VpcClassicV1) ListPublicGateways(listPublicGatewaysOptions *Li return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/public_gateways`, nil) if err != nil { return } @@ -4106,11 +4078,8 @@ func (vpcClassic *VpcClassicV1) CreatePublicGateway(createPublicGatewayOptions * return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/public_gateways`, nil) if err != nil { return } @@ -4180,11 +4149,12 @@ func (vpcClassic *VpcClassicV1) DeletePublicGateway(deletePublicGatewayOptions * return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{*deletePublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *deletePublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -4223,11 +4193,12 @@ func (vpcClassic *VpcClassicV1) GetPublicGateway(getPublicGatewayOptions *GetPub return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{*getPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *getPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -4276,11 +4247,12 @@ func (vpcClassic *VpcClassicV1) UpdatePublicGateway(updatePublicGatewayOptions * return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{*updatePublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *updatePublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -4294,16 +4266,12 @@ func (vpcClassic *VpcClassicV1) UpdatePublicGateway(updatePublicGatewayOptions * builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updatePublicGatewayOptions.Name != nil { - body["name"] = updatePublicGatewayOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updatePublicGatewayOptions.PublicGatewayPatch) if err != nil { return } @@ -4336,11 +4304,8 @@ func (vpcClassic *VpcClassicV1) ListFloatingIps(listFloatingIpsOptions *ListFloa return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/floating_ips`, nil) if err != nil { return } @@ -4395,11 +4360,8 @@ func (vpcClassic *VpcClassicV1) CreateFloatingIP(createFloatingIPOptions *Create return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/floating_ips`, nil) if err != nil { return } @@ -4455,11 +4417,12 @@ func (vpcClassic *VpcClassicV1) DeleteFloatingIP(deleteFloatingIPOptions *Delete return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{*deleteFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -4498,11 +4461,12 @@ func (vpcClassic *VpcClassicV1) GetFloatingIP(getFloatingIPOptions *GetFloatingI return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{*getFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "id": *getFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -4551,11 +4515,12 @@ func (vpcClassic *VpcClassicV1) UpdateFloatingIP(updateFloatingIPOptions *Update return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{*updateFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -4569,19 +4534,12 @@ func (vpcClassic *VpcClassicV1) UpdateFloatingIP(updateFloatingIPOptions *Update builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateFloatingIPOptions.Name != nil { - body["name"] = updateFloatingIPOptions.Name - } - if updateFloatingIPOptions.Target != nil { - body["target"] = updateFloatingIPOptions.Target - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateFloatingIPOptions.FloatingIPPatch) if err != nil { return } @@ -4615,11 +4573,8 @@ func (vpcClassic *VpcClassicV1) ListNetworkAcls(listNetworkAclsOptions *ListNetw return } - pathSegments := []string{"network_acls"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls`, nil) if err != nil { return } @@ -4671,11 +4626,8 @@ func (vpcClassic *VpcClassicV1) CreateNetworkACL(createNetworkACLOptions *Create return } - pathSegments := []string{"network_acls"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls`, nil) if err != nil { return } @@ -4733,11 +4685,12 @@ func (vpcClassic *VpcClassicV1) DeleteNetworkACL(deleteNetworkACLOptions *Delete return } - pathSegments := []string{"network_acls"} - pathParameters := []string{*deleteNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { return } @@ -4776,11 +4729,12 @@ func (vpcClassic *VpcClassicV1) GetNetworkACL(getNetworkACLOptions *GetNetworkAC return } - pathSegments := []string{"network_acls"} - pathParameters := []string{*getNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *getNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { return } @@ -4829,11 +4783,12 @@ func (vpcClassic *VpcClassicV1) UpdateNetworkACL(updateNetworkACLOptions *Update return } - pathSegments := []string{"network_acls"} - pathParameters := []string{*updateNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { return } @@ -4847,16 +4802,12 @@ func (vpcClassic *VpcClassicV1) UpdateNetworkACL(updateNetworkACLOptions *Update builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateNetworkACLOptions.Name != nil { - body["name"] = updateNetworkACLOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateNetworkACLOptions.NetworkACLPatch) if err != nil { return } @@ -4893,11 +4844,12 @@ func (vpcClassic *VpcClassicV1) ListNetworkACLRules(listNetworkACLRulesOptions * return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*listNetworkACLRulesOptions.NetworkACLID} + pathParamsMap := map[string]string{ + "network_acl_id": *listNetworkACLRulesOptions.NetworkACLID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap) if err != nil { return } @@ -4956,11 +4908,12 @@ func (vpcClassic *VpcClassicV1) CreateNetworkACLRule(createNetworkACLRuleOptions return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*createNetworkACLRuleOptions.NetworkACLID} + pathParamsMap := map[string]string{ + "network_acl_id": *createNetworkACLRuleOptions.NetworkACLID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap) if err != nil { return } @@ -5015,11 +4968,13 @@ func (vpcClassic *VpcClassicV1) DeleteNetworkACLRule(deleteNetworkACLRuleOptions return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*deleteNetworkACLRuleOptions.NetworkACLID, *deleteNetworkACLRuleOptions.ID} + pathParamsMap := map[string]string{ + "network_acl_id": *deleteNetworkACLRuleOptions.NetworkACLID, + "id": *deleteNetworkACLRuleOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -5058,11 +5013,13 @@ func (vpcClassic *VpcClassicV1) GetNetworkACLRule(getNetworkACLRuleOptions *GetN return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*getNetworkACLRuleOptions.NetworkACLID, *getNetworkACLRuleOptions.ID} + pathParamsMap := map[string]string{ + "network_acl_id": *getNetworkACLRuleOptions.NetworkACLID, + "id": *getNetworkACLRuleOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -5112,11 +5069,13 @@ func (vpcClassic *VpcClassicV1) UpdateNetworkACLRule(updateNetworkACLRuleOptions return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*updateNetworkACLRuleOptions.NetworkACLID, *updateNetworkACLRuleOptions.ID} + pathParamsMap := map[string]string{ + "network_acl_id": *updateNetworkACLRuleOptions.NetworkACLID, + "id": *updateNetworkACLRuleOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -5130,7 +5089,7 @@ func (vpcClassic *VpcClassicV1) UpdateNetworkACLRule(updateNetworkACLRuleOptions builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) @@ -5170,11 +5129,8 @@ func (vpcClassic *VpcClassicV1) ListSecurityGroups(listSecurityGroupsOptions *Li return } - pathSegments := []string{"security_groups"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups`, nil) if err != nil { return } @@ -5236,11 +5192,8 @@ func (vpcClassic *VpcClassicV1) CreateSecurityGroup(createSecurityGroupOptions * return } - pathSegments := []string{"security_groups"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups`, nil) if err != nil { return } @@ -5310,11 +5263,12 @@ func (vpcClassic *VpcClassicV1) DeleteSecurityGroup(deleteSecurityGroupOptions * return } - pathSegments := []string{"security_groups"} - pathParameters := []string{*deleteSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { return } @@ -5353,11 +5307,12 @@ func (vpcClassic *VpcClassicV1) GetSecurityGroup(getSecurityGroupOptions *GetSec return } - pathSegments := []string{"security_groups"} - pathParameters := []string{*getSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { return } @@ -5408,11 +5363,12 @@ func (vpcClassic *VpcClassicV1) UpdateSecurityGroup(updateSecurityGroupOptions * return } - pathSegments := []string{"security_groups"} - pathParameters := []string{*updateSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { return } @@ -5426,16 +5382,12 @@ func (vpcClassic *VpcClassicV1) UpdateSecurityGroup(updateSecurityGroupOptions * builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateSecurityGroupOptions.Name != nil { - body["name"] = updateSecurityGroupOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateSecurityGroupOptions.SecurityGroupPatch) if err != nil { return } @@ -5472,11 +5424,12 @@ func (vpcClassic *VpcClassicV1) ListSecurityGroupNetworkInterfaces(listSecurityG return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*listSecurityGroupNetworkInterfacesOptions.SecurityGroupID} + pathParamsMap := map[string]string{ + "security_group_id": *listSecurityGroupNetworkInterfacesOptions.SecurityGroupID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces`, pathParamsMap) if err != nil { return } @@ -5528,11 +5481,13 @@ func (vpcClassic *VpcClassicV1) RemoveSecurityGroupNetworkInterface(removeSecuri return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*removeSecurityGroupNetworkInterfaceOptions.SecurityGroupID, *removeSecurityGroupNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *removeSecurityGroupNetworkInterfaceOptions.SecurityGroupID, + "id": *removeSecurityGroupNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -5572,11 +5527,13 @@ func (vpcClassic *VpcClassicV1) GetSecurityGroupNetworkInterface(getSecurityGrou return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*getSecurityGroupNetworkInterfaceOptions.SecurityGroupID, *getSecurityGroupNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *getSecurityGroupNetworkInterfaceOptions.SecurityGroupID, + "id": *getSecurityGroupNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -5627,11 +5584,13 @@ func (vpcClassic *VpcClassicV1) AddSecurityGroupNetworkInterface(addSecurityGrou return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*addSecurityGroupNetworkInterfaceOptions.SecurityGroupID, *addSecurityGroupNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *addSecurityGroupNetworkInterfaceOptions.SecurityGroupID, + "id": *addSecurityGroupNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -5682,11 +5641,12 @@ func (vpcClassic *VpcClassicV1) ListSecurityGroupRules(listSecurityGroupRulesOpt return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*listSecurityGroupRulesOptions.SecurityGroupID} + pathParamsMap := map[string]string{ + "security_group_id": *listSecurityGroupRulesOptions.SecurityGroupID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap) if err != nil { return } @@ -5740,11 +5700,12 @@ func (vpcClassic *VpcClassicV1) CreateSecurityGroupRule(createSecurityGroupRuleO return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*createSecurityGroupRuleOptions.SecurityGroupID} + pathParamsMap := map[string]string{ + "security_group_id": *createSecurityGroupRuleOptions.SecurityGroupID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap) if err != nil { return } @@ -5800,11 +5761,13 @@ func (vpcClassic *VpcClassicV1) DeleteSecurityGroupRule(deleteSecurityGroupRuleO return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*deleteSecurityGroupRuleOptions.SecurityGroupID, *deleteSecurityGroupRuleOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *deleteSecurityGroupRuleOptions.SecurityGroupID, + "id": *deleteSecurityGroupRuleOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -5843,11 +5806,13 @@ func (vpcClassic *VpcClassicV1) GetSecurityGroupRule(getSecurityGroupRuleOptions return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*getSecurityGroupRuleOptions.SecurityGroupID, *getSecurityGroupRuleOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *getSecurityGroupRuleOptions.SecurityGroupID, + "id": *getSecurityGroupRuleOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -5898,11 +5863,13 @@ func (vpcClassic *VpcClassicV1) UpdateSecurityGroupRule(updateSecurityGroupRuleO return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*updateSecurityGroupRuleOptions.SecurityGroupID, *updateSecurityGroupRuleOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *updateSecurityGroupRuleOptions.SecurityGroupID, + "id": *updateSecurityGroupRuleOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -5916,7 +5883,7 @@ func (vpcClassic *VpcClassicV1) UpdateSecurityGroupRule(updateSecurityGroupRuleO builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) @@ -5953,11 +5920,8 @@ func (vpcClassic *VpcClassicV1) ListIkePolicies(listIkePoliciesOptions *ListIkeP return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ike_policies`, nil) if err != nil { return } @@ -6012,11 +5976,8 @@ func (vpcClassic *VpcClassicV1) CreateIkePolicy(createIkePolicyOptions *CreateIk return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ike_policies`, nil) if err != nil { return } @@ -6093,11 +6054,12 @@ func (vpcClassic *VpcClassicV1) DeleteIkePolicy(deleteIkePolicyOptions *DeleteIk return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{*deleteIkePolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteIkePolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { return } @@ -6136,11 +6098,12 @@ func (vpcClassic *VpcClassicV1) GetIkePolicy(getIkePolicyOptions *GetIkePolicyOp return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{*getIkePolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *getIkePolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { return } @@ -6189,11 +6152,12 @@ func (vpcClassic *VpcClassicV1) UpdateIkePolicy(updateIkePolicyOptions *UpdateIk return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{*updateIkePolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateIkePolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { return } @@ -6207,31 +6171,12 @@ func (vpcClassic *VpcClassicV1) UpdateIkePolicy(updateIkePolicyOptions *UpdateIk builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateIkePolicyOptions.Name != nil { - body["name"] = updateIkePolicyOptions.Name - } - if updateIkePolicyOptions.AuthenticationAlgorithm != nil { - body["authentication_algorithm"] = updateIkePolicyOptions.AuthenticationAlgorithm - } - if updateIkePolicyOptions.DhGroup != nil { - body["dh_group"] = updateIkePolicyOptions.DhGroup - } - if updateIkePolicyOptions.EncryptionAlgorithm != nil { - body["encryption_algorithm"] = updateIkePolicyOptions.EncryptionAlgorithm - } - if updateIkePolicyOptions.IkeVersion != nil { - body["ike_version"] = updateIkePolicyOptions.IkeVersion - } - if updateIkePolicyOptions.KeyLifetime != nil { - body["key_lifetime"] = updateIkePolicyOptions.KeyLifetime - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateIkePolicyOptions.IkePolicyPatch) if err != nil { return } @@ -6267,11 +6212,12 @@ func (vpcClassic *VpcClassicV1) ListIkePolicyConnections(listIkePolicyConnection return } - pathSegments := []string{"ike_policies", "connections"} - pathParameters := []string{*listIkePolicyConnectionsOptions.ID} + pathParamsMap := map[string]string{ + "id": *listIkePolicyConnectionsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ike_policies/{id}/connections`, pathParamsMap) if err != nil { return } @@ -6316,11 +6262,8 @@ func (vpcClassic *VpcClassicV1) ListIpsecPolicies(listIpsecPoliciesOptions *List return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ipsec_policies`, nil) if err != nil { return } @@ -6375,11 +6318,8 @@ func (vpcClassic *VpcClassicV1) CreateIpsecPolicy(createIpsecPolicyOptions *Crea return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ipsec_policies`, nil) if err != nil { return } @@ -6453,11 +6393,12 @@ func (vpcClassic *VpcClassicV1) DeleteIpsecPolicy(deleteIpsecPolicyOptions *Dele return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{*deleteIpsecPolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteIpsecPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { return } @@ -6496,11 +6437,12 @@ func (vpcClassic *VpcClassicV1) GetIpsecPolicy(getIpsecPolicyOptions *GetIpsecPo return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{*getIpsecPolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *getIpsecPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { return } @@ -6549,11 +6491,12 @@ func (vpcClassic *VpcClassicV1) UpdateIpsecPolicy(updateIpsecPolicyOptions *Upda return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{*updateIpsecPolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateIpsecPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { return } @@ -6567,28 +6510,12 @@ func (vpcClassic *VpcClassicV1) UpdateIpsecPolicy(updateIpsecPolicyOptions *Upda builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateIpsecPolicyOptions.Name != nil { - body["name"] = updateIpsecPolicyOptions.Name - } - if updateIpsecPolicyOptions.AuthenticationAlgorithm != nil { - body["authentication_algorithm"] = updateIpsecPolicyOptions.AuthenticationAlgorithm - } - if updateIpsecPolicyOptions.EncryptionAlgorithm != nil { - body["encryption_algorithm"] = updateIpsecPolicyOptions.EncryptionAlgorithm - } - if updateIpsecPolicyOptions.KeyLifetime != nil { - body["key_lifetime"] = updateIpsecPolicyOptions.KeyLifetime - } - if updateIpsecPolicyOptions.Pfs != nil { - body["pfs"] = updateIpsecPolicyOptions.Pfs - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateIpsecPolicyOptions.IPsecPolicyPatch) if err != nil { return } @@ -6624,11 +6551,12 @@ func (vpcClassic *VpcClassicV1) ListIpsecPolicyConnections(listIpsecPolicyConnec return } - pathSegments := []string{"ipsec_policies", "connections"} - pathParameters := []string{*listIpsecPolicyConnectionsOptions.ID} + pathParamsMap := map[string]string{ + "id": *listIpsecPolicyConnectionsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/ipsec_policies/{id}/connections`, pathParamsMap) if err != nil { return } @@ -6673,11 +6601,8 @@ func (vpcClassic *VpcClassicV1) ListVPNGateways(listVPNGatewaysOptions *ListVPNG return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways`, nil) if err != nil { return } @@ -6735,11 +6660,8 @@ func (vpcClassic *VpcClassicV1) CreateVPNGateway(createVPNGatewayOptions *Create return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways`, nil) if err != nil { return } @@ -6805,11 +6727,12 @@ func (vpcClassic *VpcClassicV1) DeleteVPNGateway(deleteVPNGatewayOptions *Delete return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{*deleteVPNGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteVPNGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -6848,11 +6771,12 @@ func (vpcClassic *VpcClassicV1) GetVPNGateway(getVPNGatewayOptions *GetVPNGatewa return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{*getVPNGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPNGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -6901,11 +6825,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPNGateway(updateVPNGatewayOptions *Update return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{*updateVPNGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateVPNGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -6919,16 +6844,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPNGateway(updateVPNGatewayOptions *Update builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateVPNGatewayOptions.Name != nil { - body["name"] = updateVPNGatewayOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPNGatewayOptions.VPNGatewayPatch) if err != nil { return } @@ -6964,11 +6885,12 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnections(listVPNGatewayConnecti return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*listVPNGatewayConnectionsOptions.VPNGatewayID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayConnectionsOptions.VPNGatewayID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap) if err != nil { return } @@ -7020,11 +6942,12 @@ func (vpcClassic *VpcClassicV1) CreateVPNGatewayConnection(createVPNGatewayConne return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*createVPNGatewayConnectionOptions.VPNGatewayID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *createVPNGatewayConnectionOptions.VPNGatewayID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap) if err != nil { return } @@ -7107,11 +7030,13 @@ func (vpcClassic *VpcClassicV1) DeleteVPNGatewayConnection(deleteVPNGatewayConne return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*deleteVPNGatewayConnectionOptions.VPNGatewayID, *deleteVPNGatewayConnectionOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *deleteVPNGatewayConnectionOptions.VPNGatewayID, + "id": *deleteVPNGatewayConnectionOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { return } @@ -7150,11 +7075,13 @@ func (vpcClassic *VpcClassicV1) GetVPNGatewayConnection(getVPNGatewayConnectionO return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*getVPNGatewayConnectionOptions.VPNGatewayID, *getVPNGatewayConnectionOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *getVPNGatewayConnectionOptions.VPNGatewayID, + "id": *getVPNGatewayConnectionOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { return } @@ -7203,11 +7130,13 @@ func (vpcClassic *VpcClassicV1) UpdateVPNGatewayConnection(updateVPNGatewayConne return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*updateVPNGatewayConnectionOptions.VPNGatewayID, *updateVPNGatewayConnectionOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *updateVPNGatewayConnectionOptions.VPNGatewayID, + "id": *updateVPNGatewayConnectionOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { return } @@ -7221,34 +7150,12 @@ func (vpcClassic *VpcClassicV1) UpdateVPNGatewayConnection(updateVPNGatewayConne builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateVPNGatewayConnectionOptions.AdminStateUp != nil { - body["admin_state_up"] = updateVPNGatewayConnectionOptions.AdminStateUp - } - if updateVPNGatewayConnectionOptions.PeerAddress != nil { - body["peer_address"] = updateVPNGatewayConnectionOptions.PeerAddress - } - if updateVPNGatewayConnectionOptions.Name != nil { - body["name"] = updateVPNGatewayConnectionOptions.Name - } - if updateVPNGatewayConnectionOptions.Psk != nil { - body["psk"] = updateVPNGatewayConnectionOptions.Psk - } - if updateVPNGatewayConnectionOptions.DeadPeerDetection != nil { - body["dead_peer_detection"] = updateVPNGatewayConnectionOptions.DeadPeerDetection - } - if updateVPNGatewayConnectionOptions.IkePolicy != nil { - body["ike_policy"] = updateVPNGatewayConnectionOptions.IkePolicy - } - if updateVPNGatewayConnectionOptions.IpsecPolicy != nil { - body["ipsec_policy"] = updateVPNGatewayConnectionOptions.IpsecPolicy - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPNGatewayConnectionOptions.VPNGatewayConnectionPatch) if err != nil { return } @@ -7284,11 +7191,13 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionLocalCIDRs(listVPNGatewa return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionLocalCIDRsOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, + "id": *listVPNGatewayConnectionLocalCIDRsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs`, pathParamsMap) if err != nil { return } @@ -7337,11 +7246,15 @@ func (vpcClassic *VpcClassicV1) RemoveVPNGatewayConnectionLocalCIDR(removeVPNGat return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs", ""} - pathParameters := []string{*removeVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, *removeVPNGatewayConnectionLocalCIDROptions.ID, *removeVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, *removeVPNGatewayConnectionLocalCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *removeVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, + "id": *removeVPNGatewayConnectionLocalCIDROptions.ID, + "cidr_prefix": *removeVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, + "prefix_length": *removeVPNGatewayConnectionLocalCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -7380,11 +7293,15 @@ func (vpcClassic *VpcClassicV1) CheckVPNGatewayConnectionLocalCIDR(checkVPNGatew return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs", ""} - pathParameters := []string{*checkVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, *checkVPNGatewayConnectionLocalCIDROptions.ID, *checkVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, *checkVPNGatewayConnectionLocalCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *checkVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, + "id": *checkVPNGatewayConnectionLocalCIDROptions.ID, + "cidr_prefix": *checkVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, + "prefix_length": *checkVPNGatewayConnectionLocalCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -7424,11 +7341,15 @@ func (vpcClassic *VpcClassicV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayCo return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs", ""} - pathParameters := []string{*addVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, *addVPNGatewayConnectionLocalCIDROptions.ID, *addVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, *addVPNGatewayConnectionLocalCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *addVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, + "id": *addVPNGatewayConnectionLocalCIDROptions.ID, + "cidr_prefix": *addVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, + "prefix_length": *addVPNGatewayConnectionLocalCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -7467,11 +7388,13 @@ func (vpcClassic *VpcClassicV1) ListVPNGatewayConnectionPeerCIDRs(listVPNGateway return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionPeerCIDRsOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, + "id": *listVPNGatewayConnectionPeerCIDRsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs`, pathParamsMap) if err != nil { return } @@ -7520,11 +7443,15 @@ func (vpcClassic *VpcClassicV1) RemoveVPNGatewayConnectionPeerCIDR(removeVPNGate return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs", ""} - pathParameters := []string{*removeVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, *removeVPNGatewayConnectionPeerCIDROptions.ID, *removeVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, *removeVPNGatewayConnectionPeerCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *removeVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, + "id": *removeVPNGatewayConnectionPeerCIDROptions.ID, + "cidr_prefix": *removeVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, + "prefix_length": *removeVPNGatewayConnectionPeerCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -7563,11 +7490,15 @@ func (vpcClassic *VpcClassicV1) CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewa return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs", ""} - pathParameters := []string{*checkVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, *checkVPNGatewayConnectionPeerCIDROptions.ID, *checkVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, *checkVPNGatewayConnectionPeerCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *checkVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, + "id": *checkVPNGatewayConnectionPeerCIDROptions.ID, + "cidr_prefix": *checkVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, + "prefix_length": *checkVPNGatewayConnectionPeerCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -7607,11 +7538,15 @@ func (vpcClassic *VpcClassicV1) AddVPNGatewayConnectionPeerCIDR(addVPNGatewayCon return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs", ""} - pathParameters := []string{*addVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, *addVPNGatewayConnectionPeerCIDROptions.ID, *addVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, *addVPNGatewayConnectionPeerCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *addVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, + "id": *addVPNGatewayConnectionPeerCIDROptions.ID, + "cidr_prefix": *addVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, + "prefix_length": *addVPNGatewayConnectionPeerCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -7646,11 +7581,8 @@ func (vpcClassic *VpcClassicV1) ListLoadBalancers(listLoadBalancersOptions *List return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers`, nil) if err != nil { return } @@ -7699,11 +7631,8 @@ func (vpcClassic *VpcClassicV1) CreateLoadBalancer(createLoadBalancerOptions *Cr return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers`, nil) if err != nil { return } @@ -7777,11 +7706,12 @@ func (vpcClassic *VpcClassicV1) DeleteLoadBalancer(deleteLoadBalancerOptions *De return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{*deleteLoadBalancerOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteLoadBalancerOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { return } @@ -7820,11 +7750,12 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancer(getLoadBalancerOptions *GetLoadB return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{*getLoadBalancerOptions.ID} + pathParamsMap := map[string]string{ + "id": *getLoadBalancerOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { return } @@ -7873,11 +7804,12 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancer(updateLoadBalancerOptions *Up return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{*updateLoadBalancerOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateLoadBalancerOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { return } @@ -7891,16 +7823,12 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancer(updateLoadBalancerOptions *Up builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerOptions.Name != nil { - body["name"] = updateLoadBalancerOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerOptions.LoadBalancerPatch) if err != nil { return } @@ -7936,11 +7864,12 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancerStatistics(getLoadBalancerStatist return } - pathSegments := []string{"load_balancers", "statistics"} - pathParameters := []string{*getLoadBalancerStatisticsOptions.ID} + pathParamsMap := map[string]string{ + "id": *getLoadBalancerStatisticsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{id}/statistics`, pathParamsMap) if err != nil { return } @@ -7989,11 +7918,12 @@ func (vpcClassic *VpcClassicV1) ListLoadBalancerListeners(listLoadBalancerListen return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*listLoadBalancerListenersOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerListenersOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap) if err != nil { return } @@ -8042,11 +7972,12 @@ func (vpcClassic *VpcClassicV1) CreateLoadBalancerListener(createLoadBalancerLis return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*createLoadBalancerListenerOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerListenerOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap) if err != nil { return } @@ -8120,11 +8051,13 @@ func (vpcClassic *VpcClassicV1) DeleteLoadBalancerListener(deleteLoadBalancerLis return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*deleteLoadBalancerListenerOptions.LoadBalancerID, *deleteLoadBalancerListenerOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerListenerOptions.LoadBalancerID, + "id": *deleteLoadBalancerListenerOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { return } @@ -8163,11 +8096,13 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancerListener(getLoadBalancerListenerO return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*getLoadBalancerListenerOptions.LoadBalancerID, *getLoadBalancerListenerOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerListenerOptions.LoadBalancerID, + "id": *getLoadBalancerListenerOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { return } @@ -8216,11 +8151,13 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerListener(updateLoadBalancerLis return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*updateLoadBalancerListenerOptions.LoadBalancerID, *updateLoadBalancerListenerOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerListenerOptions.LoadBalancerID, + "id": *updateLoadBalancerListenerOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { return } @@ -8234,30 +8171,14 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerListener(updateLoadBalancerLis builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerListenerOptions.ConnectionLimit != nil { - body["connection_limit"] = updateLoadBalancerListenerOptions.ConnectionLimit - } - if updateLoadBalancerListenerOptions.Port != nil { - body["port"] = updateLoadBalancerListenerOptions.Port - } - if updateLoadBalancerListenerOptions.Protocol != nil { - body["protocol"] = updateLoadBalancerListenerOptions.Protocol - } - if updateLoadBalancerListenerOptions.CertificateInstance != nil { - body["certificate_instance"] = updateLoadBalancerListenerOptions.CertificateInstance - } - if updateLoadBalancerListenerOptions.DefaultPool != nil { - body["default_pool"] = updateLoadBalancerListenerOptions.DefaultPool - } - _, err = builder.SetBodyContentJSON(body) - if err != nil { - return + _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerOptions.LoadBalancerListenerPatch) + if err != nil { + return } request, err := builder.Build() @@ -8291,11 +8212,13 @@ func (vpcClassic *VpcClassicV1) ListLoadBalancerListenerPolicies(listLoadBalance return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*listLoadBalancerListenerPoliciesOptions.LoadBalancerID, *listLoadBalancerListenerPoliciesOptions.ListenerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerListenerPoliciesOptions.LoadBalancerID, + "listener_id": *listLoadBalancerListenerPoliciesOptions.ListenerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap) if err != nil { return } @@ -8344,11 +8267,13 @@ func (vpcClassic *VpcClassicV1) CreateLoadBalancerListenerPolicy(createLoadBalan return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*createLoadBalancerListenerPolicyOptions.LoadBalancerID, *createLoadBalancerListenerPolicyOptions.ListenerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *createLoadBalancerListenerPolicyOptions.ListenerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap) if err != nil { return } @@ -8419,11 +8344,14 @@ func (vpcClassic *VpcClassicV1) DeleteLoadBalancerListenerPolicy(deleteLoadBalan return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*deleteLoadBalancerListenerPolicyOptions.LoadBalancerID, *deleteLoadBalancerListenerPolicyOptions.ListenerID, *deleteLoadBalancerListenerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *deleteLoadBalancerListenerPolicyOptions.ListenerID, + "id": *deleteLoadBalancerListenerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -8462,11 +8390,14 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancerListenerPolicy(getLoadBalancerLis return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*getLoadBalancerListenerPolicyOptions.LoadBalancerID, *getLoadBalancerListenerPolicyOptions.ListenerID, *getLoadBalancerListenerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *getLoadBalancerListenerPolicyOptions.ListenerID, + "id": *getLoadBalancerListenerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -8515,11 +8446,14 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerListenerPolicy(updateLoadBalan return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*updateLoadBalancerListenerPolicyOptions.LoadBalancerID, *updateLoadBalancerListenerPolicyOptions.ListenerID, *updateLoadBalancerListenerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *updateLoadBalancerListenerPolicyOptions.ListenerID, + "id": *updateLoadBalancerListenerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -8533,22 +8467,12 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerListenerPolicy(updateLoadBalan builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerListenerPolicyOptions.Name != nil { - body["name"] = updateLoadBalancerListenerPolicyOptions.Name - } - if updateLoadBalancerListenerPolicyOptions.Priority != nil { - body["priority"] = updateLoadBalancerListenerPolicyOptions.Priority - } - if updateLoadBalancerListenerPolicyOptions.Target != nil { - body["target"] = updateLoadBalancerListenerPolicyOptions.Target - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyOptions.LoadBalancerListenerPolicyPatch) if err != nil { return } @@ -8584,11 +8508,14 @@ func (vpcClassic *VpcClassicV1) ListLoadBalancerListenerPolicyRules(listLoadBala return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*listLoadBalancerListenerPolicyRulesOptions.LoadBalancerID, *listLoadBalancerListenerPolicyRulesOptions.ListenerID, *listLoadBalancerListenerPolicyRulesOptions.PolicyID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerListenerPolicyRulesOptions.LoadBalancerID, + "listener_id": *listLoadBalancerListenerPolicyRulesOptions.ListenerID, + "policy_id": *listLoadBalancerListenerPolicyRulesOptions.PolicyID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap) if err != nil { return } @@ -8637,11 +8564,14 @@ func (vpcClassic *VpcClassicV1) CreateLoadBalancerListenerPolicyRule(createLoadB return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*createLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *createLoadBalancerListenerPolicyRuleOptions.ListenerID, *createLoadBalancerListenerPolicyRuleOptions.PolicyID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *createLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *createLoadBalancerListenerPolicyRuleOptions.PolicyID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap) if err != nil { return } @@ -8709,11 +8639,15 @@ func (vpcClassic *VpcClassicV1) DeleteLoadBalancerListenerPolicyRule(deleteLoadB return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*deleteLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *deleteLoadBalancerListenerPolicyRuleOptions.ListenerID, *deleteLoadBalancerListenerPolicyRuleOptions.PolicyID, *deleteLoadBalancerListenerPolicyRuleOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *deleteLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *deleteLoadBalancerListenerPolicyRuleOptions.PolicyID, + "id": *deleteLoadBalancerListenerPolicyRuleOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -8752,11 +8686,15 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancerListenerPolicyRule(getLoadBalance return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*getLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *getLoadBalancerListenerPolicyRuleOptions.ListenerID, *getLoadBalancerListenerPolicyRuleOptions.PolicyID, *getLoadBalancerListenerPolicyRuleOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *getLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *getLoadBalancerListenerPolicyRuleOptions.PolicyID, + "id": *getLoadBalancerListenerPolicyRuleOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -8805,11 +8743,15 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerListenerPolicyRule(updateLoadB return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *updateLoadBalancerListenerPolicyRuleOptions.ListenerID, *updateLoadBalancerListenerPolicyRuleOptions.PolicyID, *updateLoadBalancerListenerPolicyRuleOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *updateLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *updateLoadBalancerListenerPolicyRuleOptions.PolicyID, + "id": *updateLoadBalancerListenerPolicyRuleOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -8823,25 +8765,12 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerListenerPolicyRule(updateLoadB builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerListenerPolicyRuleOptions.Condition != nil { - body["condition"] = updateLoadBalancerListenerPolicyRuleOptions.Condition - } - if updateLoadBalancerListenerPolicyRuleOptions.Field != nil { - body["field"] = updateLoadBalancerListenerPolicyRuleOptions.Field - } - if updateLoadBalancerListenerPolicyRuleOptions.Type != nil { - body["type"] = updateLoadBalancerListenerPolicyRuleOptions.Type - } - if updateLoadBalancerListenerPolicyRuleOptions.Value != nil { - body["value"] = updateLoadBalancerListenerPolicyRuleOptions.Value - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerListenerPolicyRulePatch) if err != nil { return } @@ -8877,11 +8806,12 @@ func (vpcClassic *VpcClassicV1) ListLoadBalancerPools(listLoadBalancerPoolsOptio return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*listLoadBalancerPoolsOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerPoolsOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap) if err != nil { return } @@ -8930,11 +8860,12 @@ func (vpcClassic *VpcClassicV1) CreateLoadBalancerPool(createLoadBalancerPoolOpt return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*createLoadBalancerPoolOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerPoolOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap) if err != nil { return } @@ -9008,11 +8939,13 @@ func (vpcClassic *VpcClassicV1) DeleteLoadBalancerPool(deleteLoadBalancerPoolOpt return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*deleteLoadBalancerPoolOptions.LoadBalancerID, *deleteLoadBalancerPoolOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerPoolOptions.LoadBalancerID, + "id": *deleteLoadBalancerPoolOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { return } @@ -9051,11 +8984,13 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancerPool(getLoadBalancerPoolOptions * return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*getLoadBalancerPoolOptions.LoadBalancerID, *getLoadBalancerPoolOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerPoolOptions.LoadBalancerID, + "id": *getLoadBalancerPoolOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { return } @@ -9104,11 +9039,13 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerPool(updateLoadBalancerPoolOpt return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*updateLoadBalancerPoolOptions.LoadBalancerID, *updateLoadBalancerPoolOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerPoolOptions.LoadBalancerID, + "id": *updateLoadBalancerPoolOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { return } @@ -9122,28 +9059,12 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerPool(updateLoadBalancerPoolOpt builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerPoolOptions.Name != nil { - body["name"] = updateLoadBalancerPoolOptions.Name - } - if updateLoadBalancerPoolOptions.Algorithm != nil { - body["algorithm"] = updateLoadBalancerPoolOptions.Algorithm - } - if updateLoadBalancerPoolOptions.Protocol != nil { - body["protocol"] = updateLoadBalancerPoolOptions.Protocol - } - if updateLoadBalancerPoolOptions.HealthMonitor != nil { - body["health_monitor"] = updateLoadBalancerPoolOptions.HealthMonitor - } - if updateLoadBalancerPoolOptions.SessionPersistence != nil { - body["session_persistence"] = updateLoadBalancerPoolOptions.SessionPersistence - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerPoolOptions.LoadBalancerPoolPatch) if err != nil { return } @@ -9179,11 +9100,13 @@ func (vpcClassic *VpcClassicV1) ListLoadBalancerPoolMembers(listLoadBalancerPool return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*listLoadBalancerPoolMembersOptions.LoadBalancerID, *listLoadBalancerPoolMembersOptions.PoolID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerPoolMembersOptions.LoadBalancerID, + "pool_id": *listLoadBalancerPoolMembersOptions.PoolID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { return } @@ -9232,11 +9155,13 @@ func (vpcClassic *VpcClassicV1) CreateLoadBalancerPoolMember(createLoadBalancerP return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*createLoadBalancerPoolMemberOptions.LoadBalancerID, *createLoadBalancerPoolMemberOptions.PoolID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *createLoadBalancerPoolMemberOptions.PoolID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { return } @@ -9301,11 +9226,13 @@ func (vpcClassic *VpcClassicV1) ReplaceLoadBalancerPoolMembers(replaceLoadBalanc return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*replaceLoadBalancerPoolMembersOptions.LoadBalancerID, *replaceLoadBalancerPoolMembersOptions.PoolID} + pathParamsMap := map[string]string{ + "load_balancer_id": *replaceLoadBalancerPoolMembersOptions.LoadBalancerID, + "pool_id": *replaceLoadBalancerPoolMembersOptions.PoolID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { return } @@ -9364,11 +9291,14 @@ func (vpcClassic *VpcClassicV1) DeleteLoadBalancerPoolMember(deleteLoadBalancerP return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*deleteLoadBalancerPoolMemberOptions.LoadBalancerID, *deleteLoadBalancerPoolMemberOptions.PoolID, *deleteLoadBalancerPoolMemberOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *deleteLoadBalancerPoolMemberOptions.PoolID, + "id": *deleteLoadBalancerPoolMemberOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { return } @@ -9407,11 +9337,14 @@ func (vpcClassic *VpcClassicV1) GetLoadBalancerPoolMember(getLoadBalancerPoolMem return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*getLoadBalancerPoolMemberOptions.LoadBalancerID, *getLoadBalancerPoolMemberOptions.PoolID, *getLoadBalancerPoolMemberOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *getLoadBalancerPoolMemberOptions.PoolID, + "id": *getLoadBalancerPoolMemberOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { return } @@ -9460,11 +9393,14 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerPoolMember(updateLoadBalancerP return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*updateLoadBalancerPoolMemberOptions.LoadBalancerID, *updateLoadBalancerPoolMemberOptions.PoolID, *updateLoadBalancerPoolMemberOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *updateLoadBalancerPoolMemberOptions.PoolID, + "id": *updateLoadBalancerPoolMemberOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpcClassic.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpcClassic.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { return } @@ -9478,22 +9414,12 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerPoolMember(updateLoadBalancerP builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpcClassic.Version)) builder.AddQuery("generation", fmt.Sprint(*vpcClassic.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerPoolMemberOptions.Port != nil { - body["port"] = updateLoadBalancerPoolMemberOptions.Port - } - if updateLoadBalancerPoolMemberOptions.Weight != nil { - body["weight"] = updateLoadBalancerPoolMemberOptions.Weight - } - if updateLoadBalancerPoolMemberOptions.Target != nil { - body["target"] = updateLoadBalancerPoolMemberOptions.Target - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerPoolMemberOptions.LoadBalancerPoolMemberPatch) if err != nil { return } @@ -9520,13 +9446,13 @@ func (vpcClassic *VpcClassicV1) UpdateLoadBalancerPoolMember(updateLoadBalancerP // AddInstanceNetworkInterfaceFloatingIPOptions : The AddInstanceNetworkInterfaceFloatingIP options. type AddInstanceNetworkInterfaceFloatingIPOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -9568,10 +9494,10 @@ func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param ma // AddSecurityGroupNetworkInterfaceOptions : The AddSecurityGroupNetworkInterface options. type AddSecurityGroupNetworkInterfaceOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -9606,16 +9532,16 @@ func (options *AddSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[str // AddVPNGatewayConnectionLocalCIDROptions : The AddVPNGatewayConnectionLocalCIDR options. type AddVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -9664,16 +9590,16 @@ func (options *AddVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[str // AddVPNGatewayConnectionPeerCIDROptions : The AddVPNGatewayConnectionPeerCIDR options. type AddVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -9860,6 +9786,42 @@ func UnmarshalAddressPrefixCollectionNext(m map[string]json.RawMessage, result i return } +// AddressPrefixPatch : AddressPrefixPatch struct +type AddressPrefixPatch struct { + // The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in. + Name *string `json:"name,omitempty"` + + // Indicates whether this is the default prefix for this zone in this VPC. Updating to true makes this prefix the + // default prefix for this zone in this VPC, provided the VPC currently has no default address prefix for this zone. + // Updating to false removes the default prefix for this zone in this VPC. + IsDefault *bool `json:"is_default,omitempty"` +} + +// UnmarshalAddressPrefixPatch unmarshals an instance of AddressPrefixPatch from the specified map of raw messages. +func UnmarshalAddressPrefixPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AddressPrefixPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the AddressPrefixPatch +func (addressPrefixPatch *AddressPrefixPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(addressPrefixPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // CertificateInstanceIdentity : Identifies a certificate instance by a unique property. // Models which "extend" this model: // - CertificateInstanceIdentityByCRN @@ -9907,16 +9869,16 @@ func UnmarshalCertificateInstanceReference(m map[string]json.RawMessage, result // CheckVPNGatewayConnectionLocalCIDROptions : The CheckVPNGatewayConnectionLocalCIDR options. type CheckVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -9965,16 +9927,16 @@ func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[s // CheckVPNGatewayConnectionPeerCIDROptions : The CheckVPNGatewayConnectionPeerCIDR options. type CheckVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -10181,7 +10143,7 @@ func (options *CreateImageOptions) SetHeaders(param map[string]string) *CreateIm // CreateInstanceActionOptions : The CreateInstanceAction options. type CreateInstanceActionOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The type of action. Type *string `json:"type" validate:"required"` @@ -10256,18 +10218,18 @@ func (options *CreateInstanceOptions) SetHeaders(param map[string]string) *Creat // CreateInstanceVolumeAttachmentOptions : The CreateInstanceVolumeAttachment options. type CreateInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The identity of the volume to attach to the instance. Volume VolumeIdentityIntf `json:"volume" validate:"required"` + // If set to true, when deleting the instance the volume will also be deleted. + DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. If unspecified, the name will be a hyphenated list of // randomly-selected words. Name *string `json:"name,omitempty"` - // If set to true, when deleting the instance the volume will also be deleted. - DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` - // Allows users to set headers on API requests Headers map[string]string } @@ -10292,18 +10254,18 @@ func (options *CreateInstanceVolumeAttachmentOptions) SetVolume(volume VolumeIde return options } -// SetName : Allow user to set Name -func (options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions { - options.Name = core.StringPtr(name) - return options -} - // SetDeleteVolumeOnInstanceDelete : Allow user to set DeleteVolumeOnInstanceDelete func (options *CreateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *CreateInstanceVolumeAttachmentOptions { options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete) return options } +// SetName : Allow user to set Name +func (options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions { + options.Name = core.StringPtr(name) + return options +} + // SetHeaders : Allow user to set Headers func (options *CreateInstanceVolumeAttachmentOptions) SetHeaders(param map[string]string) *CreateInstanceVolumeAttachmentOptions { options.Headers = param @@ -10477,7 +10439,7 @@ func (options *CreateKeyOptions) SetHeaders(param map[string]string) *CreateKeyO // CreateLoadBalancerListenerOptions : The CreateLoadBalancerListener options. type CreateLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener port number. Port *int64 `json:"port" validate:"required"` @@ -10570,10 +10532,10 @@ func (options *CreateLoadBalancerListenerOptions) SetHeaders(param map[string]st // CreateLoadBalancerListenerPolicyOptions : The CreateLoadBalancerListenerPolicy options. type CreateLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // Priority of the policy. Lower value indicates higher priority. Priority *int64 `json:"priority" validate:"required"` @@ -10666,13 +10628,13 @@ func (options *CreateLoadBalancerListenerPolicyOptions) SetHeaders(param map[str // CreateLoadBalancerListenerPolicyRuleOptions : The CreateLoadBalancerListenerPolicyRule options. type CreateLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The condition of the rule. Condition *string `json:"condition" validate:"required"` @@ -10845,10 +10807,10 @@ func (options *CreateLoadBalancerOptions) SetHeaders(param map[string]string) *C // CreateLoadBalancerPoolMemberOptions : The CreateLoadBalancerPoolMember options. type CreateLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The port number of the application running in the server member. Port *int64 `json:"port" validate:"required"` @@ -10913,7 +10875,7 @@ func (options *CreateLoadBalancerPoolMemberOptions) SetHeaders(param map[string] // CreateLoadBalancerPoolOptions : The CreateLoadBalancerPool options. type CreateLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The load balancing algorithm. Algorithm *string `json:"algorithm" validate:"required"` @@ -11050,7 +11012,7 @@ func (options *CreateNetworkACLOptions) SetHeaders(param map[string]string) *Cre // CreateNetworkACLRuleOptions : The CreateNetworkACLRule options. type CreateNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The network ACL rule prototype object. NetworkACLRulePrototype NetworkACLRulePrototypeIntf `json:"NetworkACLRulePrototype" validate:"required"` @@ -11202,7 +11164,7 @@ func (options *CreateSecurityGroupOptions) SetHeaders(param map[string]string) * // CreateSecurityGroupRuleOptions : The CreateSecurityGroupRule options. type CreateSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The properties of the security group rule to be created. SecurityGroupRulePrototype SecurityGroupRulePrototypeIntf `json:"SecurityGroupRulePrototype" validate:"required"` @@ -11296,7 +11258,7 @@ func (options *CreateVolumeOptions) SetHeaders(param map[string]string) *CreateV // CreateVPCAddressPrefixOptions : The CreateVPCAddressPrefix options. type CreateVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The CIDR block for this address prefix. The request must not overlap with any existing address prefixes in the VPC, // or the reserved CIDR blocks 169.254.0.0/16 and 161.26.0.0/16. @@ -11431,7 +11393,7 @@ func (options *CreateVPCOptions) SetHeaders(param map[string]string) *CreateVPCO // CreateVPCRouteOptions : The CreateVPCRoute options. type CreateVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The next hop that packets will be delivered to. NextHop RouteNextHopPrototypeIntf `json:"next_hop" validate:"required"` @@ -11502,7 +11464,7 @@ func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *Creat // CreateVPNGatewayConnectionOptions : The CreateVPNGatewayConnection options. type CreateVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` @@ -11723,7 +11685,7 @@ func UnmarshalDefaultSecurityGroup(m map[string]json.RawMessage, result interfac // DeleteFloatingIPOptions : The DeleteFloatingIP options. type DeleteFloatingIPOptions struct { // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11751,7 +11713,7 @@ func (options *DeleteFloatingIPOptions) SetHeaders(param map[string]string) *Del // DeleteIkePolicyOptions : The DeleteIkePolicy options. type DeleteIkePolicyOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11779,7 +11741,7 @@ func (options *DeleteIkePolicyOptions) SetHeaders(param map[string]string) *Dele // DeleteImageOptions : The DeleteImage options. type DeleteImageOptions struct { // The image identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11807,7 +11769,7 @@ func (options *DeleteImageOptions) SetHeaders(param map[string]string) *DeleteIm // DeleteInstanceOptions : The DeleteInstance options. type DeleteInstanceOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11835,10 +11797,10 @@ func (options *DeleteInstanceOptions) SetHeaders(param map[string]string) *Delet // DeleteInstanceVolumeAttachmentOptions : The DeleteInstanceVolumeAttachment options. type DeleteInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The volume attachment identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11873,7 +11835,7 @@ func (options *DeleteInstanceVolumeAttachmentOptions) SetHeaders(param map[strin // DeleteIpsecPolicyOptions : The DeleteIpsecPolicy options. type DeleteIpsecPolicyOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11901,7 +11863,7 @@ func (options *DeleteIpsecPolicyOptions) SetHeaders(param map[string]string) *De // DeleteKeyOptions : The DeleteKey options. type DeleteKeyOptions struct { // The key identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11929,10 +11891,10 @@ func (options *DeleteKeyOptions) SetHeaders(param map[string]string) *DeleteKeyO // DeleteLoadBalancerListenerOptions : The DeleteLoadBalancerListener options. type DeleteLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11967,13 +11929,13 @@ func (options *DeleteLoadBalancerListenerOptions) SetHeaders(param map[string]st // DeleteLoadBalancerListenerPolicyOptions : The DeleteLoadBalancerListenerPolicy options. type DeleteLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12015,16 +11977,16 @@ func (options *DeleteLoadBalancerListenerPolicyOptions) SetHeaders(param map[str // DeleteLoadBalancerListenerPolicyRuleOptions : The DeleteLoadBalancerListenerPolicyRule options. type DeleteLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12073,7 +12035,7 @@ func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map // DeleteLoadBalancerOptions : The DeleteLoadBalancer options. type DeleteLoadBalancerOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12101,13 +12063,13 @@ func (options *DeleteLoadBalancerOptions) SetHeaders(param map[string]string) *D // DeleteLoadBalancerPoolMemberOptions : The DeleteLoadBalancerPoolMember options. type DeleteLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The member identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12149,10 +12111,10 @@ func (options *DeleteLoadBalancerPoolMemberOptions) SetHeaders(param map[string] // DeleteLoadBalancerPoolOptions : The DeleteLoadBalancerPool options. type DeleteLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12187,7 +12149,7 @@ func (options *DeleteLoadBalancerPoolOptions) SetHeaders(param map[string]string // DeleteNetworkACLOptions : The DeleteNetworkACL options. type DeleteNetworkACLOptions struct { // The network ACL identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12215,10 +12177,10 @@ func (options *DeleteNetworkACLOptions) SetHeaders(param map[string]string) *Del // DeleteNetworkACLRuleOptions : The DeleteNetworkACLRule options. type DeleteNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12253,7 +12215,7 @@ func (options *DeleteNetworkACLRuleOptions) SetHeaders(param map[string]string) // DeletePublicGatewayOptions : The DeletePublicGateway options. type DeletePublicGatewayOptions struct { // The public gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12281,7 +12243,7 @@ func (options *DeletePublicGatewayOptions) SetHeaders(param map[string]string) * // DeleteSecurityGroupOptions : The DeleteSecurityGroup options. type DeleteSecurityGroupOptions struct { // The security group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12309,10 +12271,10 @@ func (options *DeleteSecurityGroupOptions) SetHeaders(param map[string]string) * // DeleteSecurityGroupRuleOptions : The DeleteSecurityGroupRule options. type DeleteSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12347,7 +12309,7 @@ func (options *DeleteSecurityGroupRuleOptions) SetHeaders(param map[string]strin // DeleteSubnetOptions : The DeleteSubnet options. type DeleteSubnetOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12375,7 +12337,7 @@ func (options *DeleteSubnetOptions) SetHeaders(param map[string]string) *DeleteS // DeleteVolumeOptions : The DeleteVolume options. type DeleteVolumeOptions struct { // The volume identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12403,10 +12365,10 @@ func (options *DeleteVolumeOptions) SetHeaders(param map[string]string) *DeleteV // DeleteVPCAddressPrefixOptions : The DeleteVPCAddressPrefix options. type DeleteVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The prefix identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12441,7 +12403,7 @@ func (options *DeleteVPCAddressPrefixOptions) SetHeaders(param map[string]string // DeleteVPCOptions : The DeleteVPC options. type DeleteVPCOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12469,10 +12431,10 @@ func (options *DeleteVPCOptions) SetHeaders(param map[string]string) *DeleteVPCO // DeleteVPCRouteOptions : The DeleteVPCRoute options. type DeleteVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The route identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12507,10 +12469,10 @@ func (options *DeleteVPCRouteOptions) SetHeaders(param map[string]string) *Delet // DeleteVPNGatewayConnectionOptions : The DeleteVPNGatewayConnection options. type DeleteVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12545,7 +12507,7 @@ func (options *DeleteVPNGatewayConnectionOptions) SetHeaders(param map[string]st // DeleteVPNGatewayOptions : The DeleteVPNGateway options. type DeleteVPNGatewayOptions struct { // The VPN gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12808,6 +12770,42 @@ func UnmarshalFloatingIPCollectionNext(m map[string]json.RawMessage, result inte return } +// FloatingIPPatch : FloatingIPPatch struct +type FloatingIPPatch struct { + // The unique user-defined name for this floating IP. + Name *string `json:"name,omitempty"` + + // 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 FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"` +} + +// UnmarshalFloatingIPPatch unmarshals an instance of FloatingIPPatch from the specified map of raw messages. +func UnmarshalFloatingIPPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the FloatingIPPatch +func (floatingIPPatch *FloatingIPPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(floatingIPPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + 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: @@ -13021,7 +13019,7 @@ func UnmarshalFloatingIPUnpaginatedCollection(m map[string]json.RawMessage, resu // GetFloatingIPOptions : The GetFloatingIP options. type GetFloatingIPOptions struct { // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13049,7 +13047,7 @@ func (options *GetFloatingIPOptions) SetHeaders(param map[string]string) *GetFlo // GetIkePolicyOptions : The GetIkePolicy options. type GetIkePolicyOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13077,7 +13075,7 @@ func (options *GetIkePolicyOptions) SetHeaders(param map[string]string) *GetIkeP // GetImageOptions : The GetImage options. type GetImageOptions struct { // The image identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13105,7 +13103,7 @@ func (options *GetImageOptions) SetHeaders(param map[string]string) *GetImageOpt // GetInstanceInitializationOptions : The GetInstanceInitialization options. type GetInstanceInitializationOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13133,13 +13131,13 @@ func (options *GetInstanceInitializationOptions) SetHeaders(param map[string]str // GetInstanceNetworkInterfaceFloatingIPOptions : The GetInstanceNetworkInterfaceFloatingIP options. type GetInstanceNetworkInterfaceFloatingIPOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13181,10 +13179,10 @@ func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param ma // GetInstanceNetworkInterfaceOptions : The GetInstanceNetworkInterface options. type GetInstanceNetworkInterfaceOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13219,7 +13217,7 @@ func (options *GetInstanceNetworkInterfaceOptions) SetHeaders(param map[string]s // GetInstanceOptions : The GetInstance options. type GetInstanceOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13247,7 +13245,7 @@ func (options *GetInstanceOptions) SetHeaders(param map[string]string) *GetInsta // GetInstanceProfileOptions : The GetInstanceProfile options. type GetInstanceProfileOptions struct { // The instance profile name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13275,10 +13273,10 @@ func (options *GetInstanceProfileOptions) SetHeaders(param map[string]string) *G // GetInstanceVolumeAttachmentOptions : The GetInstanceVolumeAttachment options. type GetInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The volume attachment identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13313,7 +13311,7 @@ func (options *GetInstanceVolumeAttachmentOptions) SetHeaders(param map[string]s // GetIpsecPolicyOptions : The GetIpsecPolicy options. type GetIpsecPolicyOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13341,7 +13339,7 @@ func (options *GetIpsecPolicyOptions) SetHeaders(param map[string]string) *GetIp // GetKeyOptions : The GetKey options. type GetKeyOptions struct { // The key identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13369,10 +13367,10 @@ func (options *GetKeyOptions) SetHeaders(param map[string]string) *GetKeyOptions // GetLoadBalancerListenerOptions : The GetLoadBalancerListener options. type GetLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13407,13 +13405,13 @@ func (options *GetLoadBalancerListenerOptions) SetHeaders(param map[string]strin // GetLoadBalancerListenerPolicyOptions : The GetLoadBalancerListenerPolicy options. type GetLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13455,16 +13453,16 @@ func (options *GetLoadBalancerListenerPolicyOptions) SetHeaders(param map[string // GetLoadBalancerListenerPolicyRuleOptions : The GetLoadBalancerListenerPolicyRule options. type GetLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13513,7 +13511,7 @@ func (options *GetLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[st // GetLoadBalancerOptions : The GetLoadBalancer options. type GetLoadBalancerOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13541,13 +13539,13 @@ func (options *GetLoadBalancerOptions) SetHeaders(param map[string]string) *GetL // GetLoadBalancerPoolMemberOptions : The GetLoadBalancerPoolMember options. type GetLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The member identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13589,10 +13587,10 @@ func (options *GetLoadBalancerPoolMemberOptions) SetHeaders(param map[string]str // GetLoadBalancerPoolOptions : The GetLoadBalancerPool options. type GetLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13627,7 +13625,7 @@ func (options *GetLoadBalancerPoolOptions) SetHeaders(param map[string]string) * // GetLoadBalancerStatisticsOptions : The GetLoadBalancerStatistics options. type GetLoadBalancerStatisticsOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13655,7 +13653,7 @@ func (options *GetLoadBalancerStatisticsOptions) SetHeaders(param map[string]str // GetNetworkACLOptions : The GetNetworkACL options. type GetNetworkACLOptions struct { // The network ACL identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13683,10 +13681,10 @@ func (options *GetNetworkACLOptions) SetHeaders(param map[string]string) *GetNet // GetNetworkACLRuleOptions : The GetNetworkACLRule options. type GetNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13721,7 +13719,7 @@ func (options *GetNetworkACLRuleOptions) SetHeaders(param map[string]string) *Ge // GetOperatingSystemOptions : The GetOperatingSystem options. type GetOperatingSystemOptions struct { // The operating system name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13749,7 +13747,7 @@ func (options *GetOperatingSystemOptions) SetHeaders(param map[string]string) *G // GetPublicGatewayOptions : The GetPublicGateway options. type GetPublicGatewayOptions struct { // The public gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13777,7 +13775,7 @@ func (options *GetPublicGatewayOptions) SetHeaders(param map[string]string) *Get // GetRegionOptions : The GetRegion options. type GetRegionOptions struct { // The region name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13805,10 +13803,10 @@ func (options *GetRegionOptions) SetHeaders(param map[string]string) *GetRegionO // GetRegionZoneOptions : The GetRegionZone options. type GetRegionZoneOptions struct { // The region name. - RegionName *string `json:"region_name" validate:"required"` + RegionName *string `json:"region_name" validate:"required,ne="` // The zone name. - ZoneName *string `json:"zone_name" validate:"required"` + ZoneName *string `json:"zone_name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13843,10 +13841,10 @@ func (options *GetRegionZoneOptions) SetHeaders(param map[string]string) *GetReg // GetSecurityGroupNetworkInterfaceOptions : The GetSecurityGroupNetworkInterface options. type GetSecurityGroupNetworkInterfaceOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13881,7 +13879,7 @@ func (options *GetSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[str // GetSecurityGroupOptions : The GetSecurityGroup options. type GetSecurityGroupOptions struct { // The security group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13909,10 +13907,10 @@ func (options *GetSecurityGroupOptions) SetHeaders(param map[string]string) *Get // GetSecurityGroupRuleOptions : The GetSecurityGroupRule options. type GetSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13947,7 +13945,7 @@ func (options *GetSecurityGroupRuleOptions) SetHeaders(param map[string]string) // GetSubnetNetworkACLOptions : The GetSubnetNetworkACL options. type GetSubnetNetworkACLOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -13975,7 +13973,7 @@ func (options *GetSubnetNetworkACLOptions) SetHeaders(param map[string]string) * // GetSubnetOptions : The GetSubnet options. type GetSubnetOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14003,7 +14001,7 @@ func (options *GetSubnetOptions) SetHeaders(param map[string]string) *GetSubnetO // GetSubnetPublicGatewayOptions : The GetSubnetPublicGateway options. type GetSubnetPublicGatewayOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14031,7 +14029,7 @@ func (options *GetSubnetPublicGatewayOptions) SetHeaders(param map[string]string // GetVolumeOptions : The GetVolume options. type GetVolumeOptions struct { // The volume identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14059,7 +14057,7 @@ func (options *GetVolumeOptions) SetHeaders(param map[string]string) *GetVolumeO // GetVolumeProfileOptions : The GetVolumeProfile options. type GetVolumeProfileOptions struct { // The volume profile name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14087,10 +14085,10 @@ func (options *GetVolumeProfileOptions) SetHeaders(param map[string]string) *Get // GetVPCAddressPrefixOptions : The GetVPCAddressPrefix options. type GetVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The prefix identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14125,7 +14123,7 @@ func (options *GetVPCAddressPrefixOptions) SetHeaders(param map[string]string) * // GetVPCDefaultSecurityGroupOptions : The GetVPCDefaultSecurityGroup options. type GetVPCDefaultSecurityGroupOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14153,7 +14151,7 @@ func (options *GetVPCDefaultSecurityGroupOptions) SetHeaders(param map[string]st // GetVPCOptions : The GetVPC options. type GetVPCOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14181,10 +14179,10 @@ func (options *GetVPCOptions) SetHeaders(param map[string]string) *GetVPCOptions // GetVPCRouteOptions : The GetVPCRoute options. type GetVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The route identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14219,10 +14217,10 @@ func (options *GetVPCRouteOptions) SetHeaders(param map[string]string) *GetVPCRo // GetVPNGatewayConnectionOptions : The GetVPNGatewayConnection options. type GetVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14257,7 +14255,7 @@ func (options *GetVPNGatewayConnectionOptions) SetHeaders(param map[string]strin // GetVPNGatewayOptions : The GetVPNGateway options. type GetVPNGatewayOptions struct { // The VPN gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14492,6 +14490,84 @@ func UnmarshalIkePolicyIdentity(m map[string]json.RawMessage, result interface{} return } +// IkePolicyPatch : IkePolicyPatch struct +type IkePolicyPatch struct { + // The user-defined name for this IKE policy. + Name *string `json:"name,omitempty"` + + // The authentication algorithm. + AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` + + // The Diffie-Hellman group. + DhGroup *int64 `json:"dh_group,omitempty"` + + // The encryption algorithm. + EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` + + // The IKE protocol version. + IkeVersion *int64 `json:"ike_version,omitempty"` + + // The key lifetime in seconds. + KeyLifetime *int64 `json:"key_lifetime,omitempty"` +} + +// Constants associated with the IkePolicyPatch.AuthenticationAlgorithm property. +// The authentication algorithm. +const ( + IkePolicyPatchAuthenticationAlgorithmMd5Const = "md5" + IkePolicyPatchAuthenticationAlgorithmSha1Const = "sha1" + IkePolicyPatchAuthenticationAlgorithmSha256Const = "sha256" +) + +// Constants associated with the IkePolicyPatch.EncryptionAlgorithm property. +// The encryption algorithm. +const ( + IkePolicyPatchEncryptionAlgorithmAes128Const = "aes128" + IkePolicyPatchEncryptionAlgorithmAes256Const = "aes256" + IkePolicyPatchEncryptionAlgorithmTripleDesConst = "triple_des" +) + +// UnmarshalIkePolicyPatch unmarshals an instance of IkePolicyPatch from the specified map of raw messages. +func UnmarshalIkePolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IkePolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "dh_group", &obj.DhGroup) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "ike_version", &obj.IkeVersion) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the IkePolicyPatch +func (ikePolicyPatch *IkePolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(ikePolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // IkePolicyReference : IkePolicyReference struct type IkePolicyReference struct { // The unique identifier for this IKE policy. @@ -14814,12 +14890,92 @@ func UnmarshalIPsecPolicyIdentity(m map[string]json.RawMessage, result interface return } -// IPsecPolicyReference : IPsecPolicyReference struct -type IPsecPolicyReference struct { - // The unique identifier for this IPsec policy. - ID *string `json:"id" validate:"required"` +// IPsecPolicyPatch : IPsecPolicyPatch struct +type IPsecPolicyPatch struct { + // The user-defined name for this IPsec policy. + Name *string `json:"name,omitempty"` - // The IPsec policy's canonical URL. + // The authentication algorithm. + AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` + + // The encryption algorithm. + EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` + + // The key lifetime in seconds. + KeyLifetime *int64 `json:"key_lifetime,omitempty"` + + // Perfect Forward Secrecy. + Pfs *string `json:"pfs,omitempty"` +} + +// Constants associated with the IPsecPolicyPatch.AuthenticationAlgorithm property. +// The authentication algorithm. +const ( + IPsecPolicyPatchAuthenticationAlgorithmMd5Const = "md5" + IPsecPolicyPatchAuthenticationAlgorithmSha1Const = "sha1" + IPsecPolicyPatchAuthenticationAlgorithmSha256Const = "sha256" +) + +// Constants associated with the IPsecPolicyPatch.EncryptionAlgorithm property. +// The encryption algorithm. +const ( + IPsecPolicyPatchEncryptionAlgorithmAes128Const = "aes128" + IPsecPolicyPatchEncryptionAlgorithmAes256Const = "aes256" + IPsecPolicyPatchEncryptionAlgorithmTripleDesConst = "triple_des" +) + +// Constants associated with the IPsecPolicyPatch.Pfs property. +// Perfect Forward Secrecy. +const ( + IPsecPolicyPatchPfsDisabledConst = "disabled" + IPsecPolicyPatchPfsGroup14Const = "group_14" + IPsecPolicyPatchPfsGroup2Const = "group_2" + IPsecPolicyPatchPfsGroup5Const = "group_5" +) + +// UnmarshalIPsecPolicyPatch unmarshals an instance of IPsecPolicyPatch from the specified map of raw messages. +func UnmarshalIPsecPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IPsecPolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "pfs", &obj.Pfs) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the IPsecPolicyPatch +func (iPsecPolicyPatch *IPsecPolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(iPsecPolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + +// IPsecPolicyReference : IPsecPolicyReference struct +type IPsecPolicyReference struct { + // The unique identifier for this IPsec policy. + ID *string `json:"id" validate:"required"` + + // The IPsec policy's canonical URL. Href *string `json:"href" validate:"required"` // The user-defined name for this IPsec policy. @@ -15162,6 +15318,33 @@ func UnmarshalImageIdentity(m map[string]json.RawMessage, result interface{}) (e return } +// ImagePatch : ImagePatch struct +type ImagePatch struct { + // The unique user-defined name for this image. Names starting with "ibm-" are not allowed. + Name *string `json:"name,omitempty"` +} + +// UnmarshalImagePatch unmarshals an instance of ImagePatch from the specified map of raw messages. +func UnmarshalImagePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ImagePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the ImagePatch +func (imagePatch *ImagePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(imagePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // ImagePrototype : ImagePrototype struct // Models which "extend" this model: // - ImagePrototypeImageByFile @@ -15607,6 +15790,33 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul return } +// InstancePatch : InstancePatch struct +type InstancePatch struct { + // The user-defined name for this virtual server instance (and default system hostname). + Name *string `json:"name,omitempty"` +} + +// UnmarshalInstancePatch unmarshals an instance of InstancePatch from the specified map of raw messages. +func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstancePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstancePatch +func (instancePatch *InstancePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instancePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // InstanceProfile : InstanceProfile struct type InstanceProfile struct { // The name for this virtual server instance profile. @@ -16323,6 +16533,33 @@ func UnmarshalKeyIdentity(m map[string]json.RawMessage, result interface{}) (err return } +// KeyPatch : KeyPatch struct +type KeyPatch struct { + // The user-defined name for this key. + Name *string `json:"name,omitempty"` +} + +// UnmarshalKeyPatch unmarshals an instance of KeyPatch from the specified map of raw messages. +func UnmarshalKeyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(KeyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the KeyPatch +func (keyPatch *KeyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(keyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // KeyReferenceInstanceInitializationContext : KeyReferenceInstanceInitializationContext struct // Models which "extend" this model: // - KeyReferenceInstanceInitializationContextKeyReference @@ -16453,7 +16690,7 @@ func (options *ListIkePoliciesOptions) SetHeaders(param map[string]string) *List // ListIkePolicyConnectionsOptions : The ListIkePolicyConnections options. type ListIkePolicyConnectionsOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16551,10 +16788,10 @@ func (options *ListImagesOptions) SetHeaders(param map[string]string) *ListImage // ListInstanceNetworkInterfaceFloatingIpsOptions : The ListInstanceNetworkInterfaceFloatingIps options. type ListInstanceNetworkInterfaceFloatingIpsOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16589,7 +16826,7 @@ func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetHeaders(param // ListInstanceNetworkInterfacesOptions : The ListInstanceNetworkInterfaces options. type ListInstanceNetworkInterfacesOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16652,7 +16889,7 @@ func (options *ListInstanceProfilesOptions) SetHeaders(param map[string]string) // ListInstanceVolumeAttachmentsOptions : The ListInstanceVolumeAttachments options. type ListInstanceVolumeAttachmentsOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16777,7 +17014,7 @@ func (options *ListIpsecPoliciesOptions) SetHeaders(param map[string]string) *Li // ListIpsecPolicyConnectionsOptions : The ListIpsecPolicyConnections options. type ListIpsecPolicyConnectionsOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16840,10 +17077,10 @@ func (options *ListKeysOptions) SetHeaders(param map[string]string) *ListKeysOpt // ListLoadBalancerListenerPoliciesOptions : The ListLoadBalancerListenerPolicies options. type ListLoadBalancerListenerPoliciesOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16878,13 +17115,13 @@ func (options *ListLoadBalancerListenerPoliciesOptions) SetHeaders(param map[str // ListLoadBalancerListenerPolicyRulesOptions : The ListLoadBalancerListenerPolicyRules options. type ListLoadBalancerListenerPolicyRulesOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16926,7 +17163,7 @@ func (options *ListLoadBalancerListenerPolicyRulesOptions) SetHeaders(param map[ // ListLoadBalancerListenersOptions : The ListLoadBalancerListeners options. type ListLoadBalancerListenersOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16954,10 +17191,10 @@ func (options *ListLoadBalancerListenersOptions) SetHeaders(param map[string]str // ListLoadBalancerPoolMembersOptions : The ListLoadBalancerPoolMembers options. type ListLoadBalancerPoolMembersOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16992,7 +17229,7 @@ func (options *ListLoadBalancerPoolMembersOptions) SetHeaders(param map[string]s // ListLoadBalancerPoolsOptions : The ListLoadBalancerPools options. type ListLoadBalancerPoolsOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17038,7 +17275,7 @@ func (options *ListLoadBalancersOptions) SetHeaders(param map[string]string) *Li // ListNetworkACLRulesOptions : The ListNetworkACLRules options. type ListNetworkACLRulesOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // A server-supplied token determining what resource to start the page on. Start *string `json:"start,omitempty"` @@ -17205,7 +17442,7 @@ func (options *ListPublicGatewaysOptions) SetHeaders(param map[string]string) *L // ListRegionZonesOptions : The ListRegionZones options. type ListRegionZonesOptions struct { // The region name. - RegionName *string `json:"region_name" validate:"required"` + RegionName *string `json:"region_name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17251,7 +17488,7 @@ func (options *ListRegionsOptions) SetHeaders(param map[string]string) *ListRegi // ListSecurityGroupNetworkInterfacesOptions : The ListSecurityGroupNetworkInterfaces options. type ListSecurityGroupNetworkInterfacesOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17279,7 +17516,7 @@ func (options *ListSecurityGroupNetworkInterfacesOptions) SetHeaders(param map[s // ListSecurityGroupRulesOptions : The ListSecurityGroupRules options. type ListSecurityGroupRulesOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17474,7 +17711,7 @@ func (options *ListVolumesOptions) SetHeaders(param map[string]string) *ListVolu // ListVPCAddressPrefixesOptions : The ListVPCAddressPrefixes options. type ListVPCAddressPrefixesOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // A server-supplied token determining what resource to start the page on. Start *string `json:"start,omitempty"` @@ -17520,7 +17757,7 @@ func (options *ListVPCAddressPrefixesOptions) SetHeaders(param map[string]string // ListVPCRoutesOptions : The ListVPCRoutes options. type ListVPCRoutesOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // Filters the collection to resources in the zone with the exact specified name. ZoneName *string `json:"zone.name,omitempty"` @@ -17603,10 +17840,10 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt // ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options. type ListVPNGatewayConnectionLocalCIDRsOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17641,10 +17878,10 @@ func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[s // ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options. type ListVPNGatewayConnectionPeerCIDRsOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17679,7 +17916,7 @@ func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[st // ListVPNGatewayConnectionsOptions : The ListVPNGatewayConnections options. type ListVPNGatewayConnectionsOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // Filters the collection to VPN gateway connections with the specified status. Status *string `json:"status,omitempty"` @@ -18025,6 +18262,70 @@ func UnmarshalLoadBalancerListenerCollection(m map[string]json.RawMessage, resul return } +// LoadBalancerListenerPatch : LoadBalancerListenerPatch struct +type LoadBalancerListenerPatch struct { + // The connection limit of the listener. + ConnectionLimit *int64 `json:"connection_limit,omitempty"` + + // The listener port number. + Port *int64 `json:"port,omitempty"` + + // The listener protocol. + Protocol *string `json:"protocol,omitempty"` + + // The certificate instance used for SSL termination. It is applicable only to `https` + // protocol. + CertificateInstance CertificateInstanceIdentityIntf `json:"certificate_instance,omitempty"` + + // The default pool associated with the listener. + DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"` +} + +// Constants associated with the LoadBalancerListenerPatch.Protocol property. +// The listener protocol. +const ( + LoadBalancerListenerPatchProtocolHTTPConst = "http" + LoadBalancerListenerPatchProtocolHTTPSConst = "https" + LoadBalancerListenerPatchProtocolTCPConst = "tcp" +) + +// UnmarshalLoadBalancerListenerPatch unmarshals an instance of LoadBalancerListenerPatch from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPatch) + err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "port", &obj.Port) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) + if err != nil { + return + } + err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerListenerPatch +func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerListenerPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerListenerPolicy : LoadBalancerListenerPolicy struct type LoadBalancerListenerPolicy struct { // The policy's unique identifier. @@ -18053,7 +18354,7 @@ type LoadBalancerListenerPolicy struct { // `LoadBalancerPoolReference` is in the response if `action` is `forward`. // `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`. - Target LoadBalancerListenerPolicyTargetReferenceIntf `json:"target,omitempty"` + Target LoadBalancerListenerPolicyTargetIntf `json:"target,omitempty"` } // Constants associated with the LoadBalancerListenerPolicy.Action property. @@ -18110,7 +18411,7 @@ func UnmarshalLoadBalancerListenerPolicy(m map[string]json.RawMessage, result in if err != nil { return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTargetReference) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTarget) if err != nil { return } @@ -18135,6 +18436,50 @@ func UnmarshalLoadBalancerListenerPolicyCollection(m map[string]json.RawMessage, return } +// LoadBalancerListenerPolicyPatch : LoadBalancerListenerPolicyPatch struct +type LoadBalancerListenerPolicyPatch struct { + // The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in. + Name *string `json:"name,omitempty"` + + // Priority of the policy. Lower value indicates higher priority. + Priority *int64 `json:"priority,omitempty"` + + // When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load + // balancer forwards the traffic to. When `action` is `redirect`, + // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http + // status code used in the redirect response. + Target LoadBalancerListenerPolicyPatchTargetIntf `json:"target,omitempty"` +} + +// UnmarshalLoadBalancerListenerPolicyPatch unmarshals an instance of LoadBalancerListenerPolicyPatch from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) + if err != nil { + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyPatchTarget) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyPatch +func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerListenerPolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerListenerPolicyPatchTarget : When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load balancer forwards the traffic // to. When `action` is `redirect`, // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http status code used in the redirect response. @@ -18438,6 +18783,70 @@ func UnmarshalLoadBalancerListenerPolicyRuleCollection(m map[string]json.RawMess return } +// LoadBalancerListenerPolicyRulePatch : LoadBalancerListenerPolicyRulePatch struct +type LoadBalancerListenerPolicyRulePatch struct { + // The condition of the rule. + Condition *string `json:"condition,omitempty"` + + // HTTP header field. This is only applicable to "header" rule type. + Field *string `json:"field,omitempty"` + + // The type of the rule. + Type *string `json:"type,omitempty"` + + // Value to be matched for rule condition. + Value *string `json:"value,omitempty"` +} + +// Constants associated with the LoadBalancerListenerPolicyRulePatch.Condition property. +// The condition of the rule. +const ( + LoadBalancerListenerPolicyRulePatchConditionContainsConst = "contains" + LoadBalancerListenerPolicyRulePatchConditionEqualsConst = "equals" + LoadBalancerListenerPolicyRulePatchConditionMatchesRegexConst = "matches_regex" +) + +// Constants associated with the LoadBalancerListenerPolicyRulePatch.Type property. +// The type of the rule. +const ( + LoadBalancerListenerPolicyRulePatchTypeHeaderConst = "header" + LoadBalancerListenerPolicyRulePatchTypeHostnameConst = "hostname" + LoadBalancerListenerPolicyRulePatchTypePathConst = "path" +) + +// UnmarshalLoadBalancerListenerPolicyRulePatch unmarshals an instance of LoadBalancerListenerPolicyRulePatch from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyRulePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyRulePatch) + err = core.UnmarshalPrimitive(m, "condition", &obj.Condition) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "field", &obj.Field) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyRulePatch +func (loadBalancerListenerPolicyRulePatch *LoadBalancerListenerPolicyRulePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerListenerPolicyRulePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerListenerPolicyRulePrototype : LoadBalancerListenerPolicyRulePrototype struct type LoadBalancerListenerPolicyRulePrototype struct { // The condition of the rule. @@ -18527,12 +18936,12 @@ func UnmarshalLoadBalancerListenerPolicyRuleReference(m map[string]json.RawMessa return } -// LoadBalancerListenerPolicyTargetReference : `LoadBalancerPoolReference` is in the response if `action` is `forward`. +// LoadBalancerListenerPolicyTarget : `LoadBalancerPoolReference` is in the response if `action` is `forward`. // `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`. // Models which "extend" this model: -// - LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference -// - LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL -type LoadBalancerListenerPolicyTargetReference struct { +// - LoadBalancerListenerPolicyTargetLoadBalancerPoolReference +// - LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL +type LoadBalancerListenerPolicyTarget struct { // The unique identifier for this load balancer pool. ID *string `json:"id,omitempty"` @@ -18549,17 +18958,17 @@ type LoadBalancerListenerPolicyTargetReference struct { URL *string `json:"url,omitempty"` } -func (*LoadBalancerListenerPolicyTargetReference) isaLoadBalancerListenerPolicyTargetReference() bool { +func (*LoadBalancerListenerPolicyTarget) isaLoadBalancerListenerPolicyTarget() bool { return true } -type LoadBalancerListenerPolicyTargetReferenceIntf interface { - isaLoadBalancerListenerPolicyTargetReference() bool +type LoadBalancerListenerPolicyTargetIntf interface { + isaLoadBalancerListenerPolicyTarget() bool } -// UnmarshalLoadBalancerListenerPolicyTargetReference unmarshals an instance of LoadBalancerListenerPolicyTargetReference from the specified map of raw messages. -func UnmarshalLoadBalancerListenerPolicyTargetReference(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerListenerPolicyTargetReference) +// UnmarshalLoadBalancerListenerPolicyTarget unmarshals an instance of LoadBalancerListenerPolicyTarget from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyTarget(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyTarget) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return @@ -18664,6 +19073,33 @@ func UnmarshalLoadBalancerListenerReference(m map[string]json.RawMessage, result return } +// LoadBalancerPatch : LoadBalancerPatch struct +type LoadBalancerPatch struct { + // The unique user-defined name for this load balancer. + Name *string `json:"name,omitempty"` +} + +// UnmarshalLoadBalancerPatch unmarshals an instance of LoadBalancerPatch from the specified map of raw messages. +func UnmarshalLoadBalancerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerPatch +func (loadBalancerPatch *LoadBalancerPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerPool : LoadBalancerPool struct type LoadBalancerPool struct { // The unique identifier for this load balancer pool. @@ -19173,17 +19609,59 @@ func UnmarshalLoadBalancerPoolMemberCollection(m map[string]json.RawMessage, res return } -// LoadBalancerPoolMemberPrototype : LoadBalancerPoolMemberPrototype struct -type LoadBalancerPoolMemberPrototype struct { +// LoadBalancerPoolMemberPatch : LoadBalancerPoolMemberPatch struct +type LoadBalancerPoolMemberPatch struct { // The port number of the application running in the server member. - Port *int64 `json:"port" validate:"required"` + Port *int64 `json:"port,omitempty"` // Weight of the server member. This takes effect only when the load balancing algorithm of its belonging pool is // `weighted_round_robin`. Weight *int64 `json:"weight,omitempty"` // The pool member target. - Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target" validate:"required"` + Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target,omitempty"` +} + +// UnmarshalLoadBalancerPoolMemberPatch unmarshals an instance of LoadBalancerPoolMemberPatch from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberPatch) + err = core.UnmarshalPrimitive(m, "port", &obj.Port) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) + if err != nil { + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTargetPrototype) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerPoolMemberPatch +func (loadBalancerPoolMemberPatch *LoadBalancerPoolMemberPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerPoolMemberPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + +// LoadBalancerPoolMemberPrototype : LoadBalancerPoolMemberPrototype struct +type LoadBalancerPoolMemberPrototype struct { + // The port number of the application running in the server member. + Port *int64 `json:"port" validate:"required"` + + // Weight of the server member. This takes effect only when the load balancing algorithm of its belonging pool is + // `weighted_round_robin`. + Weight *int64 `json:"weight,omitempty"` + + // The pool member target. + Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target" validate:"required"` } // NewLoadBalancerPoolMemberPrototype : Instantiate LoadBalancerPoolMemberPrototype (Generic Model Constructor) @@ -19297,6 +19775,85 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototype(m map[string]json.RawMessage return } +// LoadBalancerPoolPatch : LoadBalancerPoolPatch struct +type LoadBalancerPoolPatch struct { + // The user-defined name for this load balancer pool. + Name *string `json:"name,omitempty"` + + // The load balancing algorithm. + Algorithm *string `json:"algorithm,omitempty"` + + // The protocol used for this load balancer pool. + // + // 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 pool on which the + // unexpected property value was encountered. + Protocol *string `json:"protocol,omitempty"` + + // The health monitor of this pool. + HealthMonitor *LoadBalancerPoolHealthMonitorPatch `json:"health_monitor,omitempty"` + + // The session persistence of this pool. + SessionPersistence *LoadBalancerPoolSessionPersistencePatch `json:"session_persistence,omitempty"` +} + +// Constants associated with the LoadBalancerPoolPatch.Algorithm property. +// The load balancing algorithm. +const ( + LoadBalancerPoolPatchAlgorithmLeastConnectionsConst = "least_connections" + LoadBalancerPoolPatchAlgorithmRoundRobinConst = "round_robin" + LoadBalancerPoolPatchAlgorithmWeightedRoundRobinConst = "weighted_round_robin" +) + +// Constants associated with the LoadBalancerPoolPatch.Protocol property. +// The protocol used for this load balancer pool. +// +// 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 pool on which the +// unexpected property value was encountered. +const ( + LoadBalancerPoolPatchProtocolHTTPConst = "http" + LoadBalancerPoolPatchProtocolHTTPSConst = "https" + LoadBalancerPoolPatchProtocolTCPConst = "tcp" +) + +// UnmarshalLoadBalancerPoolPatch unmarshals an instance of LoadBalancerPoolPatch from the specified map of raw messages. +func UnmarshalLoadBalancerPoolPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) + if err != nil { + return + } + err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitorPatch) + if err != nil { + return + } + err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistencePatch) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerPoolPatch +func (loadBalancerPoolPatch *LoadBalancerPoolPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerPoolPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerPoolPrototype : LoadBalancerPoolPrototype struct type LoadBalancerPoolPrototype struct { // The user-defined name for this load balancer pool. If unspecified, the name will be a hyphenated list of @@ -19702,6 +20259,33 @@ func UnmarshalNetworkACLIdentity(m map[string]json.RawMessage, result interface{ return } +// NetworkACLPatch : NetworkACLPatch struct +type NetworkACLPatch struct { + // The unique user-defined name for this network ACL. + Name *string `json:"name,omitempty"` +} + +// UnmarshalNetworkACLPatch unmarshals an instance of NetworkACLPatch from the specified map of raw messages. +func UnmarshalNetworkACLPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the NetworkACLPatch +func (networkACLPatch *NetworkACLPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(networkACLPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // NetworkACLPrototype : NetworkACLPrototype struct // Models which "extend" this model: // - NetworkACLPrototypeNetworkACLByRules @@ -20242,6 +20826,16 @@ func UnmarshalNetworkACLRulePatch(m map[string]json.RawMessage, result interface return } +// AsPatch returns a generic map representation of the NetworkACLRulePatch +func (networkACLRulePatch *NetworkACLRulePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(networkACLRulePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // NetworkACLRulePrototype : NetworkACLRulePrototype struct // Models which "extend" this model: // - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp @@ -21220,6 +21814,33 @@ func UnmarshalPublicGatewayIdentity(m map[string]json.RawMessage, result interfa return } +// PublicGatewayPatch : PublicGatewayPatch struct +type PublicGatewayPatch struct { + // The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. + Name *string `json:"name,omitempty"` +} + +// UnmarshalPublicGatewayPatch unmarshals an instance of PublicGatewayPatch from the specified map of raw messages. +func UnmarshalPublicGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(PublicGatewayPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the PublicGatewayPatch +func (publicGatewayPatch *PublicGatewayPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(publicGatewayPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // PublicGatewayPrototypeFloatingIP : PublicGatewayPrototypeFloatingIP struct // Models which "extend" this model: // - PublicGatewayPrototypeFloatingIPFloatingIPIdentity @@ -21417,13 +22038,13 @@ func UnmarshalRegionReference(m map[string]json.RawMessage, result interface{}) // RemoveInstanceNetworkInterfaceFloatingIPOptions : The RemoveInstanceNetworkInterfaceFloatingIP options. type RemoveInstanceNetworkInterfaceFloatingIPOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21465,10 +22086,10 @@ func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param // RemoveSecurityGroupNetworkInterfaceOptions : The RemoveSecurityGroupNetworkInterface options. type RemoveSecurityGroupNetworkInterfaceOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21503,16 +22124,16 @@ func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[ // RemoveVPNGatewayConnectionLocalCIDROptions : The RemoveVPNGatewayConnectionLocalCIDR options. type RemoveVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21561,16 +22182,16 @@ func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[ // RemoveVPNGatewayConnectionPeerCIDROptions : The RemoveVPNGatewayConnectionPeerCIDR options. type RemoveVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21619,10 +22240,10 @@ func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[s // ReplaceLoadBalancerPoolMembersOptions : The ReplaceLoadBalancerPoolMembers options. type ReplaceLoadBalancerPoolMembersOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // Array of pool member prototype objects. Members []LoadBalancerPoolMemberPrototype `json:"members" validate:"required"` @@ -21667,7 +22288,7 @@ func (options *ReplaceLoadBalancerPoolMembersOptions) SetHeaders(param map[strin // ReplaceSubnetNetworkACLOptions : The ReplaceSubnetNetworkACL options. type ReplaceSubnetNetworkACLOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The network ACL identity. NetworkACLIdentity NetworkACLIdentityIntf `json:"NetworkACLIdentity" validate:"required"` @@ -21909,6 +22530,33 @@ func UnmarshalRouteNextHopPrototype(m map[string]json.RawMessage, result interfa return } +// RoutePatch : RoutePatch struct +type RoutePatch struct { + // The user-defined name for this route. Names must be unique within the VPC routing table the route resides in. + Name *string `json:"name,omitempty"` +} + +// UnmarshalRoutePatch unmarshals an instance of RoutePatch from the specified map of raw messages. +func UnmarshalRoutePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoutePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the RoutePatch +func (routePatch *RoutePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(routePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SecurityGroup : SecurityGroup struct type SecurityGroup struct { // The unique identifier for this security group. @@ -22042,6 +22690,33 @@ func UnmarshalSecurityGroupIdentity(m map[string]json.RawMessage, result interfa return } +// SecurityGroupPatch : SecurityGroupPatch struct +type SecurityGroupPatch struct { + // The user-defined name for this security group. Security group names must be unique, within the scope of an account. + Name *string `json:"name,omitempty"` +} + +// UnmarshalSecurityGroupPatch unmarshals an instance of SecurityGroupPatch from the specified map of raw messages. +func UnmarshalSecurityGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the SecurityGroupPatch +func (securityGroupPatch *SecurityGroupPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(securityGroupPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SecurityGroupReference : SecurityGroupReference struct type SecurityGroupReference struct { // The unique identifier for this security group. @@ -22290,6 +22965,16 @@ func UnmarshalSecurityGroupRulePatch(m map[string]json.RawMessage, result interf return } +// AsPatch returns a generic map representation of the SecurityGroupRulePatch +func (securityGroupRulePatch *SecurityGroupRulePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(securityGroupRulePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SecurityGroupRulePatchRemote : 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). @@ -22584,7 +23269,7 @@ func UnmarshalSecurityGroupRuleRemote(m map[string]json.RawMessage, result inter // SetSubnetPublicGatewayOptions : The SetSubnetPublicGateway options. type SetSubnetPublicGatewayOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The public gateway identity. PublicGatewayIdentity PublicGatewayIdentityIntf `json:"PublicGatewayIdentity" validate:"required"` @@ -22849,6 +23534,47 @@ func UnmarshalSubnetIdentity(m map[string]json.RawMessage, result interface{}) ( return } +// SubnetPatch : SubnetPatch struct +type SubnetPatch struct { + // The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. + Name *string `json:"name,omitempty"` + + // The network ACL to use for this subnet. + NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` + + // The public gateway to handle internet bound traffic for this subnet. + PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"` +} + +// UnmarshalSubnetPatch unmarshals an instance of SubnetPatch from the specified map of raw messages. +func UnmarshalSubnetPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SubnetPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the SubnetPatch +func (subnetPatch *SubnetPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(subnetPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SubnetPrototype : SubnetPrototype struct // Models which "extend" this model: // - SubnetPrototypeSubnetByTotalCount @@ -22965,7 +23691,7 @@ func UnmarshalSubnetReference(m map[string]json.RawMessage, result interface{}) // UnsetSubnetPublicGatewayOptions : The UnsetSubnetPublicGateway options. type UnsetSubnetPublicGatewayOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22993,24 +23719,20 @@ func (options *UnsetSubnetPublicGatewayOptions) SetHeaders(param map[string]stri // UpdateFloatingIPOptions : The UpdateFloatingIP options. type UpdateFloatingIPOptions struct { // The floating IP identifier. - ID *string `json:"id" validate:"required"` - - // The unique user-defined name for this floating IP. - Name *string `json:"name,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // 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 FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"` + // The floating IP patch. + FloatingIPPatch map[string]interface{} `json:"FloatingIP_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateFloatingIPOptions : Instantiate UpdateFloatingIPOptions -func (*VpcClassicV1) NewUpdateFloatingIPOptions(id string) *UpdateFloatingIPOptions { +func (*VpcClassicV1) NewUpdateFloatingIPOptions(id string, floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions { return &UpdateFloatingIPOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + FloatingIPPatch: floatingIPPatch, } } @@ -23020,15 +23742,9 @@ func (options *UpdateFloatingIPOptions) SetID(id string) *UpdateFloatingIPOption return options } -// SetName : Allow user to set Name -func (options *UpdateFloatingIPOptions) SetName(name string) *UpdateFloatingIPOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetTarget : Allow user to set Target -func (options *UpdateFloatingIPOptions) SetTarget(target FloatingIPPatchTargetNetworkInterfaceIdentityIntf) *UpdateFloatingIPOptions { - options.Target = target +// SetFloatingIPPatch : Allow user to set FloatingIPPatch +func (options *UpdateFloatingIPOptions) SetFloatingIPPatch(floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions { + options.FloatingIPPatch = floatingIPPatch return options } @@ -23041,50 +23757,20 @@ func (options *UpdateFloatingIPOptions) SetHeaders(param map[string]string) *Upd // UpdateIkePolicyOptions : The UpdateIkePolicy options. type UpdateIkePolicyOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` - - // The user-defined name for this IKE policy. - Name *string `json:"name,omitempty"` - - // The authentication algorithm. - AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` - - // The Diffie-Hellman group. - DhGroup *int64 `json:"dh_group,omitempty"` - - // The encryption algorithm. - EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` - - // The IKE protocol version. - IkeVersion *int64 `json:"ike_version,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The key lifetime in seconds. - KeyLifetime *int64 `json:"key_lifetime,omitempty"` + // The IKE policy patch. + IkePolicyPatch map[string]interface{} `json:"IKEPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateIkePolicyOptions.AuthenticationAlgorithm property. -// The authentication algorithm. -const ( - UpdateIkePolicyOptionsAuthenticationAlgorithmMd5Const = "md5" - UpdateIkePolicyOptionsAuthenticationAlgorithmSha1Const = "sha1" - UpdateIkePolicyOptionsAuthenticationAlgorithmSha256Const = "sha256" -) - -// Constants associated with the UpdateIkePolicyOptions.EncryptionAlgorithm property. -// The encryption algorithm. -const ( - UpdateIkePolicyOptionsEncryptionAlgorithmAes128Const = "aes128" - UpdateIkePolicyOptionsEncryptionAlgorithmAes256Const = "aes256" - UpdateIkePolicyOptionsEncryptionAlgorithmTripleDesConst = "triple_des" -) - // NewUpdateIkePolicyOptions : Instantiate UpdateIkePolicyOptions -func (*VpcClassicV1) NewUpdateIkePolicyOptions(id string) *UpdateIkePolicyOptions { +func (*VpcClassicV1) NewUpdateIkePolicyOptions(id string, ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions { return &UpdateIkePolicyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + IkePolicyPatch: ikePolicyPatch, } } @@ -23094,64 +23780,35 @@ func (options *UpdateIkePolicyOptions) SetID(id string) *UpdateIkePolicyOptions return options } -// SetName : Allow user to set Name -func (options *UpdateIkePolicyOptions) SetName(name string) *UpdateIkePolicyOptions { - options.Name = core.StringPtr(name) +// SetIkePolicyPatch : Allow user to set IkePolicyPatch +func (options *UpdateIkePolicyOptions) SetIkePolicyPatch(ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions { + options.IkePolicyPatch = ikePolicyPatch return options } -// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm -func (options *UpdateIkePolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *UpdateIkePolicyOptions { - options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm) - return options -} - -// SetDhGroup : Allow user to set DhGroup -func (options *UpdateIkePolicyOptions) SetDhGroup(dhGroup int64) *UpdateIkePolicyOptions { - options.DhGroup = core.Int64Ptr(dhGroup) - return options -} - -// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm -func (options *UpdateIkePolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *UpdateIkePolicyOptions { - options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm) - return options -} - -// SetIkeVersion : Allow user to set IkeVersion -func (options *UpdateIkePolicyOptions) SetIkeVersion(ikeVersion int64) *UpdateIkePolicyOptions { - options.IkeVersion = core.Int64Ptr(ikeVersion) - return options -} - -// SetKeyLifetime : Allow user to set KeyLifetime -func (options *UpdateIkePolicyOptions) SetKeyLifetime(keyLifetime int64) *UpdateIkePolicyOptions { - options.KeyLifetime = core.Int64Ptr(keyLifetime) - return options -} - -// SetHeaders : Allow user to set Headers -func (options *UpdateIkePolicyOptions) SetHeaders(param map[string]string) *UpdateIkePolicyOptions { - options.Headers = param +// SetHeaders : Allow user to set Headers +func (options *UpdateIkePolicyOptions) SetHeaders(param map[string]string) *UpdateIkePolicyOptions { + options.Headers = param return options } // UpdateImageOptions : The UpdateImage options. type UpdateImageOptions struct { // The image identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this image. Names starting with "ibm-" are not allowed. - Name *string `json:"name,omitempty"` + // The image patch. + ImagePatch map[string]interface{} `json:"Image_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateImageOptions : Instantiate UpdateImageOptions -func (*VpcClassicV1) NewUpdateImageOptions(id string) *UpdateImageOptions { +func (*VpcClassicV1) NewUpdateImageOptions(id string, imagePatch map[string]interface{}) *UpdateImageOptions { return &UpdateImageOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + ImagePatch: imagePatch, } } @@ -23161,9 +23818,9 @@ func (options *UpdateImageOptions) SetID(id string) *UpdateImageOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateImageOptions) SetName(name string) *UpdateImageOptions { - options.Name = core.StringPtr(name) +// SetImagePatch : Allow user to set ImagePatch +func (options *UpdateImageOptions) SetImagePatch(imagePatch map[string]interface{}) *UpdateImageOptions { + options.ImagePatch = imagePatch return options } @@ -23176,19 +23833,20 @@ func (options *UpdateImageOptions) SetHeaders(param map[string]string) *UpdateIm // UpdateInstanceOptions : The UpdateInstance options. type UpdateInstanceOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this virtual server instance (and default system hostname). - Name *string `json:"name,omitempty"` + // The instance patch. + InstancePatch map[string]interface{} `json:"Instance_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceOptions : Instantiate UpdateInstanceOptions -func (*VpcClassicV1) NewUpdateInstanceOptions(id string) *UpdateInstanceOptions { +func (*VpcClassicV1) NewUpdateInstanceOptions(id string, instancePatch map[string]interface{}) *UpdateInstanceOptions { return &UpdateInstanceOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + InstancePatch: instancePatch, } } @@ -23198,9 +23856,9 @@ func (options *UpdateInstanceOptions) SetID(id string) *UpdateInstanceOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceOptions) SetName(name string) *UpdateInstanceOptions { - options.Name = core.StringPtr(name) +// SetInstancePatch : Allow user to set InstancePatch +func (options *UpdateInstanceOptions) SetInstancePatch(instancePatch map[string]interface{}) *UpdateInstanceOptions { + options.InstancePatch = instancePatch return options } @@ -23213,26 +23871,24 @@ func (options *UpdateInstanceOptions) SetHeaders(param map[string]string) *Updat // UpdateInstanceVolumeAttachmentOptions : The UpdateInstanceVolumeAttachment options. type UpdateInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The volume attachment identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this volume attachment. - Name *string `json:"name,omitempty"` - - // If set to true, when deleting the instance the volume will also be deleted. - DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The volume attachment patch. + VolumeAttachmentPatch map[string]interface{} `json:"VolumeAttachment_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceVolumeAttachmentOptions : Instantiate UpdateInstanceVolumeAttachmentOptions -func (*VpcClassicV1) NewUpdateInstanceVolumeAttachmentOptions(instanceID string, id string) *UpdateInstanceVolumeAttachmentOptions { +func (*VpcClassicV1) NewUpdateInstanceVolumeAttachmentOptions(instanceID string, id string, volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions { return &UpdateInstanceVolumeAttachmentOptions{ - InstanceID: core.StringPtr(instanceID), - ID: core.StringPtr(id), + InstanceID: core.StringPtr(instanceID), + ID: core.StringPtr(id), + VolumeAttachmentPatch: volumeAttachmentPatch, } } @@ -23248,15 +23904,9 @@ func (options *UpdateInstanceVolumeAttachmentOptions) SetID(id string) *UpdateIn return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceVolumeAttachmentOptions) SetName(name string) *UpdateInstanceVolumeAttachmentOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetDeleteVolumeOnInstanceDelete : Allow user to set DeleteVolumeOnInstanceDelete -func (options *UpdateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *UpdateInstanceVolumeAttachmentOptions { - options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete) +// SetVolumeAttachmentPatch : Allow user to set VolumeAttachmentPatch +func (options *UpdateInstanceVolumeAttachmentOptions) SetVolumeAttachmentPatch(volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions { + options.VolumeAttachmentPatch = volumeAttachmentPatch return options } @@ -23269,56 +23919,20 @@ func (options *UpdateInstanceVolumeAttachmentOptions) SetHeaders(param map[strin // UpdateIpsecPolicyOptions : The UpdateIpsecPolicy options. type UpdateIpsecPolicyOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this IPsec policy. - Name *string `json:"name,omitempty"` - - // The authentication algorithm. - AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` - - // The encryption algorithm. - EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` - - // The key lifetime in seconds. - KeyLifetime *int64 `json:"key_lifetime,omitempty"` - - // Perfect Forward Secrecy. - Pfs *string `json:"pfs,omitempty"` + // The IPsec policy patch. + IPsecPolicyPatch map[string]interface{} `json:"IPsecPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateIpsecPolicyOptions.AuthenticationAlgorithm property. -// The authentication algorithm. -const ( - UpdateIpsecPolicyOptionsAuthenticationAlgorithmMd5Const = "md5" - UpdateIpsecPolicyOptionsAuthenticationAlgorithmSha1Const = "sha1" - UpdateIpsecPolicyOptionsAuthenticationAlgorithmSha256Const = "sha256" -) - -// Constants associated with the UpdateIpsecPolicyOptions.EncryptionAlgorithm property. -// The encryption algorithm. -const ( - UpdateIpsecPolicyOptionsEncryptionAlgorithmAes128Const = "aes128" - UpdateIpsecPolicyOptionsEncryptionAlgorithmAes256Const = "aes256" - UpdateIpsecPolicyOptionsEncryptionAlgorithmTripleDesConst = "triple_des" -) - -// Constants associated with the UpdateIpsecPolicyOptions.Pfs property. -// Perfect Forward Secrecy. -const ( - UpdateIpsecPolicyOptionsPfsDisabledConst = "disabled" - UpdateIpsecPolicyOptionsPfsGroup14Const = "group_14" - UpdateIpsecPolicyOptionsPfsGroup2Const = "group_2" - UpdateIpsecPolicyOptionsPfsGroup5Const = "group_5" -) - // NewUpdateIpsecPolicyOptions : Instantiate UpdateIpsecPolicyOptions -func (*VpcClassicV1) NewUpdateIpsecPolicyOptions(id string) *UpdateIpsecPolicyOptions { +func (*VpcClassicV1) NewUpdateIpsecPolicyOptions(id string, iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions { return &UpdateIpsecPolicyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + IPsecPolicyPatch: iPsecPolicyPatch, } } @@ -23328,33 +23942,9 @@ func (options *UpdateIpsecPolicyOptions) SetID(id string) *UpdateIpsecPolicyOpti return options } -// SetName : Allow user to set Name -func (options *UpdateIpsecPolicyOptions) SetName(name string) *UpdateIpsecPolicyOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm -func (options *UpdateIpsecPolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *UpdateIpsecPolicyOptions { - options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm) - return options -} - -// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm -func (options *UpdateIpsecPolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *UpdateIpsecPolicyOptions { - options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm) - return options -} - -// SetKeyLifetime : Allow user to set KeyLifetime -func (options *UpdateIpsecPolicyOptions) SetKeyLifetime(keyLifetime int64) *UpdateIpsecPolicyOptions { - options.KeyLifetime = core.Int64Ptr(keyLifetime) - return options -} - -// SetPfs : Allow user to set Pfs -func (options *UpdateIpsecPolicyOptions) SetPfs(pfs string) *UpdateIpsecPolicyOptions { - options.Pfs = core.StringPtr(pfs) +// SetIPsecPolicyPatch : Allow user to set IPsecPolicyPatch +func (options *UpdateIpsecPolicyOptions) SetIPsecPolicyPatch(iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions { + options.IPsecPolicyPatch = iPsecPolicyPatch return options } @@ -23367,19 +23957,20 @@ func (options *UpdateIpsecPolicyOptions) SetHeaders(param map[string]string) *Up // UpdateKeyOptions : The UpdateKey options. type UpdateKeyOptions struct { // The key identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this key. - Name *string `json:"name,omitempty"` + // The key patch. + KeyPatch map[string]interface{} `json:"Key_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateKeyOptions : Instantiate UpdateKeyOptions -func (*VpcClassicV1) NewUpdateKeyOptions(id string) *UpdateKeyOptions { +func (*VpcClassicV1) NewUpdateKeyOptions(id string, keyPatch map[string]interface{}) *UpdateKeyOptions { return &UpdateKeyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + KeyPatch: keyPatch, } } @@ -23389,9 +23980,9 @@ func (options *UpdateKeyOptions) SetID(id string) *UpdateKeyOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateKeyOptions) SetName(name string) *UpdateKeyOptions { - options.Name = core.StringPtr(name) +// SetKeyPatch : Allow user to set KeyPatch +func (options *UpdateKeyOptions) SetKeyPatch(keyPatch map[string]interface{}) *UpdateKeyOptions { + options.KeyPatch = keyPatch return options } @@ -23404,44 +23995,24 @@ func (options *UpdateKeyOptions) SetHeaders(param map[string]string) *UpdateKeyO // UpdateLoadBalancerListenerOptions : The UpdateLoadBalancerListener options. type UpdateLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ID *string `json:"id" validate:"required"` - - // The connection limit of the listener. - ConnectionLimit *int64 `json:"connection_limit,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The listener port number. - Port *int64 `json:"port,omitempty"` - - // The listener protocol. - Protocol *string `json:"protocol,omitempty"` - - // The certificate instance used for SSL termination. It is applicable only to `https` - // protocol. - CertificateInstance CertificateInstanceIdentityIntf `json:"certificate_instance,omitempty"` - - // The default pool associated with the listener. - DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"` + // The load balancer listener patch. + LoadBalancerListenerPatch map[string]interface{} `json:"LoadBalancerListener_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateLoadBalancerListenerOptions.Protocol property. -// The listener protocol. -const ( - UpdateLoadBalancerListenerOptionsProtocolHTTPConst = "http" - UpdateLoadBalancerListenerOptionsProtocolHTTPSConst = "https" - UpdateLoadBalancerListenerOptionsProtocolTCPConst = "tcp" -) - // NewUpdateLoadBalancerListenerOptions : Instantiate UpdateLoadBalancerListenerOptions -func (*VpcClassicV1) NewUpdateLoadBalancerListenerOptions(loadBalancerID string, id string) *UpdateLoadBalancerListenerOptions { +func (*VpcClassicV1) NewUpdateLoadBalancerListenerOptions(loadBalancerID string, id string, loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions { return &UpdateLoadBalancerListenerOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ID: core.StringPtr(id), + LoadBalancerListenerPatch: loadBalancerListenerPatch, } } @@ -23457,33 +24028,9 @@ func (options *UpdateLoadBalancerListenerOptions) SetID(id string) *UpdateLoadBa return options } -// SetConnectionLimit : Allow user to set ConnectionLimit -func (options *UpdateLoadBalancerListenerOptions) SetConnectionLimit(connectionLimit int64) *UpdateLoadBalancerListenerOptions { - options.ConnectionLimit = core.Int64Ptr(connectionLimit) - return options -} - -// SetPort : Allow user to set Port -func (options *UpdateLoadBalancerListenerOptions) SetPort(port int64) *UpdateLoadBalancerListenerOptions { - options.Port = core.Int64Ptr(port) - return options -} - -// SetProtocol : Allow user to set Protocol -func (options *UpdateLoadBalancerListenerOptions) SetProtocol(protocol string) *UpdateLoadBalancerListenerOptions { - options.Protocol = core.StringPtr(protocol) - return options -} - -// SetCertificateInstance : Allow user to set CertificateInstance -func (options *UpdateLoadBalancerListenerOptions) SetCertificateInstance(certificateInstance CertificateInstanceIdentityIntf) *UpdateLoadBalancerListenerOptions { - options.CertificateInstance = certificateInstance - return options -} - -// SetDefaultPool : Allow user to set DefaultPool -func (options *UpdateLoadBalancerListenerOptions) SetDefaultPool(defaultPool LoadBalancerPoolIdentityIntf) *UpdateLoadBalancerListenerOptions { - options.DefaultPool = defaultPool +// SetLoadBalancerListenerPatch : Allow user to set LoadBalancerListenerPatch +func (options *UpdateLoadBalancerListenerOptions) SetLoadBalancerListenerPatch(loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions { + options.LoadBalancerListenerPatch = loadBalancerListenerPatch return options } @@ -23496,36 +24043,28 @@ func (options *UpdateLoadBalancerListenerOptions) SetHeaders(param map[string]st // UpdateLoadBalancerListenerPolicyOptions : The UpdateLoadBalancerListenerPolicy options. type UpdateLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in. - Name *string `json:"name,omitempty"` - - // Priority of the policy. Lower value indicates higher priority. - Priority *int64 `json:"priority,omitempty"` - - // When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load - // balancer forwards the traffic to. When `action` is `redirect`, - // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http - // status code used in the redirect response. - Target LoadBalancerListenerPolicyPatchTargetIntf `json:"target,omitempty"` + // The listener policy patch. + LoadBalancerListenerPolicyPatch map[string]interface{} `json:"LoadBalancerListenerPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateLoadBalancerListenerPolicyOptions : Instantiate UpdateLoadBalancerListenerPolicyOptions -func (*VpcClassicV1) NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string) *UpdateLoadBalancerListenerPolicyOptions { +func (*VpcClassicV1) NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string, loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions { return &UpdateLoadBalancerListenerPolicyOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ListenerID: core.StringPtr(listenerID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ListenerID: core.StringPtr(listenerID), + ID: core.StringPtr(id), + LoadBalancerListenerPolicyPatch: loadBalancerListenerPolicyPatch, } } @@ -23547,21 +24086,9 @@ func (options *UpdateLoadBalancerListenerPolicyOptions) SetID(id string) *Update return options } -// SetName : Allow user to set Name -func (options *UpdateLoadBalancerListenerPolicyOptions) SetName(name string) *UpdateLoadBalancerListenerPolicyOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetPriority : Allow user to set Priority -func (options *UpdateLoadBalancerListenerPolicyOptions) SetPriority(priority int64) *UpdateLoadBalancerListenerPolicyOptions { - options.Priority = core.Int64Ptr(priority) - return options -} - -// SetTarget : Allow user to set Target -func (options *UpdateLoadBalancerListenerPolicyOptions) SetTarget(target LoadBalancerListenerPolicyPatchTargetIntf) *UpdateLoadBalancerListenerPolicyOptions { - options.Target = target +// SetLoadBalancerListenerPolicyPatch : Allow user to set LoadBalancerListenerPolicyPatch +func (options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions { + options.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatch return options } @@ -23574,56 +24101,32 @@ func (options *UpdateLoadBalancerListenerPolicyOptions) SetHeaders(param map[str // UpdateLoadBalancerListenerPolicyRuleOptions : The UpdateLoadBalancerListenerPolicyRule options. type UpdateLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The condition of the rule. - Condition *string `json:"condition,omitempty"` - - // HTTP header field. This is only applicable to "header" rule type. - Field *string `json:"field,omitempty"` - - // The type of the rule. - Type *string `json:"type,omitempty"` - - // Value to be matched for rule condition. - Value *string `json:"value,omitempty"` + // The listener policy rule patch. + LoadBalancerListenerPolicyRulePatch map[string]interface{} `json:"LoadBalancerListenerPolicyRule_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateLoadBalancerListenerPolicyRuleOptions.Condition property. -// The condition of the rule. -const ( - UpdateLoadBalancerListenerPolicyRuleOptionsConditionContainsConst = "contains" - UpdateLoadBalancerListenerPolicyRuleOptionsConditionEqualsConst = "equals" - UpdateLoadBalancerListenerPolicyRuleOptionsConditionMatchesRegexConst = "matches_regex" -) - -// Constants associated with the UpdateLoadBalancerListenerPolicyRuleOptions.Type property. -// The type of the rule. -const ( - UpdateLoadBalancerListenerPolicyRuleOptionsTypeHeaderConst = "header" - UpdateLoadBalancerListenerPolicyRuleOptionsTypeHostnameConst = "hostname" - UpdateLoadBalancerListenerPolicyRuleOptionsTypePathConst = "path" -) - // NewUpdateLoadBalancerListenerPolicyRuleOptions : Instantiate UpdateLoadBalancerListenerPolicyRuleOptions -func (*VpcClassicV1) NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string) *UpdateLoadBalancerListenerPolicyRuleOptions { +func (*VpcClassicV1) NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string, loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions { return &UpdateLoadBalancerListenerPolicyRuleOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ListenerID: core.StringPtr(listenerID), - PolicyID: core.StringPtr(policyID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ListenerID: core.StringPtr(listenerID), + PolicyID: core.StringPtr(policyID), + ID: core.StringPtr(id), + LoadBalancerListenerPolicyRulePatch: loadBalancerListenerPolicyRulePatch, } } @@ -23651,27 +24154,9 @@ func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetID(id string) *Up return options } -// SetCondition : Allow user to set Condition -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetCondition(condition string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Condition = core.StringPtr(condition) - return options -} - -// SetField : Allow user to set Field -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetField(field string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Field = core.StringPtr(field) - return options -} - -// SetType : Allow user to set Type -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetType(typeVar string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Type = core.StringPtr(typeVar) - return options -} - -// SetValue : Allow user to set Value -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetValue(value string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Value = core.StringPtr(value) +// SetLoadBalancerListenerPolicyRulePatch : Allow user to set LoadBalancerListenerPolicyRulePatch +func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions { + options.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatch return options } @@ -23684,19 +24169,20 @@ func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map // UpdateLoadBalancerOptions : The UpdateLoadBalancer options. type UpdateLoadBalancerOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this load balancer. - Name *string `json:"name,omitempty"` + // The load balancer patch. + LoadBalancerPatch map[string]interface{} `json:"LoadBalancer_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateLoadBalancerOptions : Instantiate UpdateLoadBalancerOptions -func (*VpcClassicV1) NewUpdateLoadBalancerOptions(id string) *UpdateLoadBalancerOptions { +func (*VpcClassicV1) NewUpdateLoadBalancerOptions(id string, loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions { return &UpdateLoadBalancerOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + LoadBalancerPatch: loadBalancerPatch, } } @@ -23706,9 +24192,9 @@ func (options *UpdateLoadBalancerOptions) SetID(id string) *UpdateLoadBalancerOp return options } -// SetName : Allow user to set Name -func (options *UpdateLoadBalancerOptions) SetName(name string) *UpdateLoadBalancerOptions { - options.Name = core.StringPtr(name) +// SetLoadBalancerPatch : Allow user to set LoadBalancerPatch +func (options *UpdateLoadBalancerOptions) SetLoadBalancerPatch(loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions { + options.LoadBalancerPatch = loadBalancerPatch return options } @@ -23721,34 +24207,28 @@ func (options *UpdateLoadBalancerOptions) SetHeaders(param map[string]string) *U // UpdateLoadBalancerPoolMemberOptions : The UpdateLoadBalancerPoolMember options. type UpdateLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The member identifier. - ID *string `json:"id" validate:"required"` - - // The port number of the application running in the server member. - Port *int64 `json:"port,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // Weight of the server member. This takes effect only when the load balancing algorithm of its belonging pool is - // `weighted_round_robin`. - Weight *int64 `json:"weight,omitempty"` - - // The pool member target. - Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target,omitempty"` + // The load balancer pool member patch. + LoadBalancerPoolMemberPatch map[string]interface{} `json:"LoadBalancerPoolMember_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateLoadBalancerPoolMemberOptions : Instantiate UpdateLoadBalancerPoolMemberOptions -func (*VpcClassicV1) NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string) *UpdateLoadBalancerPoolMemberOptions { +func (*VpcClassicV1) NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string, loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions { return &UpdateLoadBalancerPoolMemberOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - PoolID: core.StringPtr(poolID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + PoolID: core.StringPtr(poolID), + ID: core.StringPtr(id), + LoadBalancerPoolMemberPatch: loadBalancerPoolMemberPatch, } } @@ -23770,21 +24250,9 @@ func (options *UpdateLoadBalancerPoolMemberOptions) SetID(id string) *UpdateLoad return options } -// SetPort : Allow user to set Port -func (options *UpdateLoadBalancerPoolMemberOptions) SetPort(port int64) *UpdateLoadBalancerPoolMemberOptions { - options.Port = core.Int64Ptr(port) - return options -} - -// SetWeight : Allow user to set Weight -func (options *UpdateLoadBalancerPoolMemberOptions) SetWeight(weight int64) *UpdateLoadBalancerPoolMemberOptions { - options.Weight = core.Int64Ptr(weight) - return options -} - -// SetTarget : Allow user to set Target -func (options *UpdateLoadBalancerPoolMemberOptions) SetTarget(target LoadBalancerPoolMemberTargetPrototypeIntf) *UpdateLoadBalancerPoolMemberOptions { - options.Target = target +// SetLoadBalancerPoolMemberPatch : Allow user to set LoadBalancerPoolMemberPatch +func (options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerPoolMemberPatch(loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions { + options.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatch return options } @@ -23797,59 +24265,24 @@ func (options *UpdateLoadBalancerPoolMemberOptions) SetHeaders(param map[string] // UpdateLoadBalancerPoolOptions : The UpdateLoadBalancerPool options. type UpdateLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - ID *string `json:"id" validate:"required"` - - // The user-defined name for this load balancer pool. - Name *string `json:"name,omitempty"` - - // The load balancing algorithm. - Algorithm *string `json:"algorithm,omitempty"` - - // The protocol used for this load balancer pool. - // - // 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 pool on which the - // unexpected property value was encountered. - Protocol *string `json:"protocol,omitempty"` - - // The health monitor of this pool. - HealthMonitor *LoadBalancerPoolHealthMonitorPatch `json:"health_monitor,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The session persistence of this pool. - SessionPersistence *LoadBalancerPoolSessionPersistencePatch `json:"session_persistence,omitempty"` + // The load balancer pool patch. + LoadBalancerPoolPatch map[string]interface{} `json:"LoadBalancerPool_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateLoadBalancerPoolOptions.Algorithm property. -// The load balancing algorithm. -const ( - UpdateLoadBalancerPoolOptionsAlgorithmLeastConnectionsConst = "least_connections" - UpdateLoadBalancerPoolOptionsAlgorithmRoundRobinConst = "round_robin" - UpdateLoadBalancerPoolOptionsAlgorithmWeightedRoundRobinConst = "weighted_round_robin" -) - -// Constants associated with the UpdateLoadBalancerPoolOptions.Protocol property. -// The protocol used for this load balancer pool. -// -// 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 pool on which the -// unexpected property value was encountered. -const ( - UpdateLoadBalancerPoolOptionsProtocolHTTPConst = "http" - UpdateLoadBalancerPoolOptionsProtocolHTTPSConst = "https" - UpdateLoadBalancerPoolOptionsProtocolTCPConst = "tcp" -) - // NewUpdateLoadBalancerPoolOptions : Instantiate UpdateLoadBalancerPoolOptions -func (*VpcClassicV1) NewUpdateLoadBalancerPoolOptions(loadBalancerID string, id string) *UpdateLoadBalancerPoolOptions { +func (*VpcClassicV1) NewUpdateLoadBalancerPoolOptions(loadBalancerID string, id string, loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions { return &UpdateLoadBalancerPoolOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ID: core.StringPtr(id), + LoadBalancerPoolPatch: loadBalancerPoolPatch, } } @@ -23865,33 +24298,9 @@ func (options *UpdateLoadBalancerPoolOptions) SetID(id string) *UpdateLoadBalanc return options } -// SetName : Allow user to set Name -func (options *UpdateLoadBalancerPoolOptions) SetName(name string) *UpdateLoadBalancerPoolOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetAlgorithm : Allow user to set Algorithm -func (options *UpdateLoadBalancerPoolOptions) SetAlgorithm(algorithm string) *UpdateLoadBalancerPoolOptions { - options.Algorithm = core.StringPtr(algorithm) - return options -} - -// SetProtocol : Allow user to set Protocol -func (options *UpdateLoadBalancerPoolOptions) SetProtocol(protocol string) *UpdateLoadBalancerPoolOptions { - options.Protocol = core.StringPtr(protocol) - return options -} - -// SetHealthMonitor : Allow user to set HealthMonitor -func (options *UpdateLoadBalancerPoolOptions) SetHealthMonitor(healthMonitor *LoadBalancerPoolHealthMonitorPatch) *UpdateLoadBalancerPoolOptions { - options.HealthMonitor = healthMonitor - return options -} - -// SetSessionPersistence : Allow user to set SessionPersistence -func (options *UpdateLoadBalancerPoolOptions) SetSessionPersistence(sessionPersistence *LoadBalancerPoolSessionPersistencePatch) *UpdateLoadBalancerPoolOptions { - options.SessionPersistence = sessionPersistence +// SetLoadBalancerPoolPatch : Allow user to set LoadBalancerPoolPatch +func (options *UpdateLoadBalancerPoolOptions) SetLoadBalancerPoolPatch(loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions { + options.LoadBalancerPoolPatch = loadBalancerPoolPatch return options } @@ -23904,19 +24313,20 @@ func (options *UpdateLoadBalancerPoolOptions) SetHeaders(param map[string]string // UpdateNetworkACLOptions : The UpdateNetworkACL options. type UpdateNetworkACLOptions struct { // The network ACL identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this network ACL. - Name *string `json:"name,omitempty"` + // The network ACL patch. + NetworkACLPatch map[string]interface{} `json:"NetworkACL_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateNetworkACLOptions : Instantiate UpdateNetworkACLOptions -func (*VpcClassicV1) NewUpdateNetworkACLOptions(id string) *UpdateNetworkACLOptions { +func (*VpcClassicV1) NewUpdateNetworkACLOptions(id string, networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions { return &UpdateNetworkACLOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + NetworkACLPatch: networkACLPatch, } } @@ -23926,9 +24336,9 @@ func (options *UpdateNetworkACLOptions) SetID(id string) *UpdateNetworkACLOption return options } -// SetName : Allow user to set Name -func (options *UpdateNetworkACLOptions) SetName(name string) *UpdateNetworkACLOptions { - options.Name = core.StringPtr(name) +// SetNetworkACLPatch : Allow user to set NetworkACLPatch +func (options *UpdateNetworkACLOptions) SetNetworkACLPatch(networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions { + options.NetworkACLPatch = networkACLPatch return options } @@ -23941,20 +24351,20 @@ func (options *UpdateNetworkACLOptions) SetHeaders(param map[string]string) *Upd // UpdateNetworkACLRuleOptions : The UpdateNetworkACLRule options. type UpdateNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The rule patch. - NetworkACLRulePatch NetworkACLRulePatchIntf `json:"NetworkACLRulePatch" validate:"required"` + // The network ACL rule patch. + NetworkACLRulePatch map[string]interface{} `json:"NetworkACLRule_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateNetworkACLRuleOptions : Instantiate UpdateNetworkACLRuleOptions -func (*VpcClassicV1) NewUpdateNetworkACLRuleOptions(networkACLID string, id string, networkACLRulePatch NetworkACLRulePatchIntf) *UpdateNetworkACLRuleOptions { +func (*VpcClassicV1) NewUpdateNetworkACLRuleOptions(networkACLID string, id string, networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions { return &UpdateNetworkACLRuleOptions{ NetworkACLID: core.StringPtr(networkACLID), ID: core.StringPtr(id), @@ -23975,7 +24385,7 @@ func (options *UpdateNetworkACLRuleOptions) SetID(id string) *UpdateNetworkACLRu } // SetNetworkACLRulePatch : Allow user to set NetworkACLRulePatch -func (options *UpdateNetworkACLRuleOptions) SetNetworkACLRulePatch(networkACLRulePatch NetworkACLRulePatchIntf) *UpdateNetworkACLRuleOptions { +func (options *UpdateNetworkACLRuleOptions) SetNetworkACLRulePatch(networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions { options.NetworkACLRulePatch = networkACLRulePatch return options } @@ -23989,19 +24399,20 @@ func (options *UpdateNetworkACLRuleOptions) SetHeaders(param map[string]string) // UpdatePublicGatewayOptions : The UpdatePublicGateway options. type UpdatePublicGatewayOptions struct { // The public gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. - Name *string `json:"name,omitempty"` + // The public gateway patch. + PublicGatewayPatch map[string]interface{} `json:"PublicGateway_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdatePublicGatewayOptions : Instantiate UpdatePublicGatewayOptions -func (*VpcClassicV1) NewUpdatePublicGatewayOptions(id string) *UpdatePublicGatewayOptions { +func (*VpcClassicV1) NewUpdatePublicGatewayOptions(id string, publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions { return &UpdatePublicGatewayOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + PublicGatewayPatch: publicGatewayPatch, } } @@ -24011,9 +24422,9 @@ func (options *UpdatePublicGatewayOptions) SetID(id string) *UpdatePublicGateway return options } -// SetName : Allow user to set Name -func (options *UpdatePublicGatewayOptions) SetName(name string) *UpdatePublicGatewayOptions { - options.Name = core.StringPtr(name) +// SetPublicGatewayPatch : Allow user to set PublicGatewayPatch +func (options *UpdatePublicGatewayOptions) SetPublicGatewayPatch(publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions { + options.PublicGatewayPatch = publicGatewayPatch return options } @@ -24026,19 +24437,20 @@ func (options *UpdatePublicGatewayOptions) SetHeaders(param map[string]string) * // UpdateSecurityGroupOptions : The UpdateSecurityGroup options. type UpdateSecurityGroupOptions struct { // The security group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this security group. Security group names must be unique, within the scope of an account. - Name *string `json:"name,omitempty"` + // The security group patch. + SecurityGroupPatch map[string]interface{} `json:"SecurityGroup_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateSecurityGroupOptions : Instantiate UpdateSecurityGroupOptions -func (*VpcClassicV1) NewUpdateSecurityGroupOptions(id string) *UpdateSecurityGroupOptions { +func (*VpcClassicV1) NewUpdateSecurityGroupOptions(id string, securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions { return &UpdateSecurityGroupOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + SecurityGroupPatch: securityGroupPatch, } } @@ -24048,9 +24460,9 @@ func (options *UpdateSecurityGroupOptions) SetID(id string) *UpdateSecurityGroup return options } -// SetName : Allow user to set Name -func (options *UpdateSecurityGroupOptions) SetName(name string) *UpdateSecurityGroupOptions { - options.Name = core.StringPtr(name) +// SetSecurityGroupPatch : Allow user to set SecurityGroupPatch +func (options *UpdateSecurityGroupOptions) SetSecurityGroupPatch(securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions { + options.SecurityGroupPatch = securityGroupPatch return options } @@ -24063,20 +24475,20 @@ func (options *UpdateSecurityGroupOptions) SetHeaders(param map[string]string) * // UpdateSecurityGroupRuleOptions : The UpdateSecurityGroupRule options. type UpdateSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The security group rule patch. - SecurityGroupRulePatch SecurityGroupRulePatchIntf `json:"SecurityGroupRulePatch" validate:"required"` + SecurityGroupRulePatch map[string]interface{} `json:"SecurityGroupRule_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateSecurityGroupRuleOptions : Instantiate UpdateSecurityGroupRuleOptions -func (*VpcClassicV1) NewUpdateSecurityGroupRuleOptions(securityGroupID string, id string, securityGroupRulePatch SecurityGroupRulePatchIntf) *UpdateSecurityGroupRuleOptions { +func (*VpcClassicV1) NewUpdateSecurityGroupRuleOptions(securityGroupID string, id string, securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions { return &UpdateSecurityGroupRuleOptions{ SecurityGroupID: core.StringPtr(securityGroupID), ID: core.StringPtr(id), @@ -24097,7 +24509,7 @@ func (options *UpdateSecurityGroupRuleOptions) SetID(id string) *UpdateSecurityG } // SetSecurityGroupRulePatch : Allow user to set SecurityGroupRulePatch -func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupRulePatch(securityGroupRulePatch SecurityGroupRulePatchIntf) *UpdateSecurityGroupRuleOptions { +func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupRulePatch(securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions { options.SecurityGroupRulePatch = securityGroupRulePatch return options } @@ -24111,25 +24523,20 @@ func (options *UpdateSecurityGroupRuleOptions) SetHeaders(param map[string]strin // UpdateSubnetOptions : The UpdateSubnet options. type UpdateSubnetOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. - Name *string `json:"name,omitempty"` - - // The network ACL to use for this subnet. - NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` - - // The public gateway to handle internet bound traffic for this subnet. - PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"` + // The subnet patch. + SubnetPatch map[string]interface{} `json:"Subnet_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateSubnetOptions : Instantiate UpdateSubnetOptions -func (*VpcClassicV1) NewUpdateSubnetOptions(id string) *UpdateSubnetOptions { +func (*VpcClassicV1) NewUpdateSubnetOptions(id string, subnetPatch map[string]interface{}) *UpdateSubnetOptions { return &UpdateSubnetOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + SubnetPatch: subnetPatch, } } @@ -24139,21 +24546,9 @@ func (options *UpdateSubnetOptions) SetID(id string) *UpdateSubnetOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateSubnetOptions) SetName(name string) *UpdateSubnetOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetNetworkACL : Allow user to set NetworkACL -func (options *UpdateSubnetOptions) SetNetworkACL(networkACL NetworkACLIdentityIntf) *UpdateSubnetOptions { - options.NetworkACL = networkACL - return options -} - -// SetPublicGateway : Allow user to set PublicGateway -func (options *UpdateSubnetOptions) SetPublicGateway(publicGateway PublicGatewayIdentityIntf) *UpdateSubnetOptions { - options.PublicGateway = publicGateway +// SetSubnetPatch : Allow user to set SubnetPatch +func (options *UpdateSubnetOptions) SetSubnetPatch(subnetPatch map[string]interface{}) *UpdateSubnetOptions { + options.SubnetPatch = subnetPatch return options } @@ -24166,19 +24561,20 @@ func (options *UpdateSubnetOptions) SetHeaders(param map[string]string) *UpdateS // UpdateVolumeOptions : The UpdateVolume options. type UpdateVolumeOptions struct { // The volume identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this volume. - Name *string `json:"name,omitempty"` + // The volume patch. + VolumePatch map[string]interface{} `json:"Volume_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVolumeOptions : Instantiate UpdateVolumeOptions -func (*VpcClassicV1) NewUpdateVolumeOptions(id string) *UpdateVolumeOptions { +func (*VpcClassicV1) NewUpdateVolumeOptions(id string, volumePatch map[string]interface{}) *UpdateVolumeOptions { return &UpdateVolumeOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + VolumePatch: volumePatch, } } @@ -24188,9 +24584,9 @@ func (options *UpdateVolumeOptions) SetID(id string) *UpdateVolumeOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateVolumeOptions) SetName(name string) *UpdateVolumeOptions { - options.Name = core.StringPtr(name) +// SetVolumePatch : Allow user to set VolumePatch +func (options *UpdateVolumeOptions) SetVolumePatch(volumePatch map[string]interface{}) *UpdateVolumeOptions { + options.VolumePatch = volumePatch return options } @@ -24203,28 +24599,24 @@ func (options *UpdateVolumeOptions) SetHeaders(param map[string]string) *UpdateV // UpdateVPCAddressPrefixOptions : The UpdateVPCAddressPrefix options. type UpdateVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The prefix identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in. - Name *string `json:"name,omitempty"` - - // Indicates whether this is the default prefix for this zone in this VPC. Updating to true makes this prefix the - // default prefix for this zone in this VPC, provided the VPC currently has no default address prefix for this zone. - // Updating to false removes the default prefix for this zone in this VPC. - IsDefault *bool `json:"is_default,omitempty"` + // The prefix patch. + AddressPrefixPatch map[string]interface{} `json:"AddressPrefix_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPCAddressPrefixOptions : Instantiate UpdateVPCAddressPrefixOptions -func (*VpcClassicV1) NewUpdateVPCAddressPrefixOptions(vpcID string, id string) *UpdateVPCAddressPrefixOptions { +func (*VpcClassicV1) NewUpdateVPCAddressPrefixOptions(vpcID string, id string, addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions { return &UpdateVPCAddressPrefixOptions{ - VPCID: core.StringPtr(vpcID), - ID: core.StringPtr(id), + VPCID: core.StringPtr(vpcID), + ID: core.StringPtr(id), + AddressPrefixPatch: addressPrefixPatch, } } @@ -24240,15 +24632,9 @@ func (options *UpdateVPCAddressPrefixOptions) SetID(id string) *UpdateVPCAddress return options } -// SetName : Allow user to set Name -func (options *UpdateVPCAddressPrefixOptions) SetName(name string) *UpdateVPCAddressPrefixOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetIsDefault : Allow user to set IsDefault -func (options *UpdateVPCAddressPrefixOptions) SetIsDefault(isDefault bool) *UpdateVPCAddressPrefixOptions { - options.IsDefault = core.BoolPtr(isDefault) +// SetAddressPrefixPatch : Allow user to set AddressPrefixPatch +func (options *UpdateVPCAddressPrefixOptions) SetAddressPrefixPatch(addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions { + options.AddressPrefixPatch = addressPrefixPatch return options } @@ -24261,19 +24647,20 @@ func (options *UpdateVPCAddressPrefixOptions) SetHeaders(param map[string]string // UpdateVPCOptions : The UpdateVPC options. type UpdateVPCOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this VPC. - Name *string `json:"name,omitempty"` + // The VPC patch. + VPCPatch map[string]interface{} `json:"VPC_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPCOptions : Instantiate UpdateVPCOptions -func (*VpcClassicV1) NewUpdateVPCOptions(id string) *UpdateVPCOptions { +func (*VpcClassicV1) NewUpdateVPCOptions(id string, vpcPatch map[string]interface{}) *UpdateVPCOptions { return &UpdateVPCOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + VPCPatch: vpcPatch, } } @@ -24283,9 +24670,9 @@ func (options *UpdateVPCOptions) SetID(id string) *UpdateVPCOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateVPCOptions) SetName(name string) *UpdateVPCOptions { - options.Name = core.StringPtr(name) +// SetVPCPatch : Allow user to set VPCPatch +func (options *UpdateVPCOptions) SetVPCPatch(vpcPatch map[string]interface{}) *UpdateVPCOptions { + options.VPCPatch = vpcPatch return options } @@ -24298,23 +24685,24 @@ func (options *UpdateVPCOptions) SetHeaders(param map[string]string) *UpdateVPCO // UpdateVPCRouteOptions : The UpdateVPCRoute options. type UpdateVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The route identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this route. Names must be unique within the VPC routing table the route resides in. - Name *string `json:"name,omitempty"` + // The route patch. + RoutePatch map[string]interface{} `json:"Route_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPCRouteOptions : Instantiate UpdateVPCRouteOptions -func (*VpcClassicV1) NewUpdateVPCRouteOptions(vpcID string, id string) *UpdateVPCRouteOptions { +func (*VpcClassicV1) NewUpdateVPCRouteOptions(vpcID string, id string, routePatch map[string]interface{}) *UpdateVPCRouteOptions { return &UpdateVPCRouteOptions{ - VPCID: core.StringPtr(vpcID), - ID: core.StringPtr(id), + VPCID: core.StringPtr(vpcID), + ID: core.StringPtr(id), + RoutePatch: routePatch, } } @@ -24330,9 +24718,9 @@ func (options *UpdateVPCRouteOptions) SetID(id string) *UpdateVPCRouteOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateVPCRouteOptions) SetName(name string) *UpdateVPCRouteOptions { - options.Name = core.StringPtr(name) +// SetRoutePatch : Allow user to set RoutePatch +func (options *UpdateVPCRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRouteOptions { + options.RoutePatch = routePatch return options } @@ -24345,42 +24733,24 @@ func (options *UpdateVPCRouteOptions) SetHeaders(param map[string]string) *Updat // UpdateVPNGatewayConnectionOptions : The UpdateVPNGatewayConnection options. type UpdateVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` - - // If set to false, the VPN connection is shut down. - AdminStateUp *bool `json:"admin_state_up,omitempty"` - - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this VPN gateway connection. - Name *string `json:"name,omitempty"` - - // The preshared key. - Psk *string `json:"psk,omitempty"` - - // The Dead Peer Detection settings. - DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` - - // Optional IKE policy configuration. The absence of a policy indicates autonegotiation. - IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"` - - // Optional IPsec policy configuration. The absence of a policy indicates - // autonegotiation. - IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` + // The VPN gateway connection patch. + VPNGatewayConnectionPatch map[string]interface{} `json:"VPNGatewayConnection_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPNGatewayConnectionOptions : Instantiate UpdateVPNGatewayConnectionOptions -func (*VpcClassicV1) NewUpdateVPNGatewayConnectionOptions(vpnGatewayID string, id string) *UpdateVPNGatewayConnectionOptions { +func (*VpcClassicV1) NewUpdateVPNGatewayConnectionOptions(vpnGatewayID string, id string, vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions { return &UpdateVPNGatewayConnectionOptions{ - VPNGatewayID: core.StringPtr(vpnGatewayID), - ID: core.StringPtr(id), + VPNGatewayID: core.StringPtr(vpnGatewayID), + ID: core.StringPtr(id), + VPNGatewayConnectionPatch: vpnGatewayConnectionPatch, } } @@ -24396,45 +24766,9 @@ func (options *UpdateVPNGatewayConnectionOptions) SetID(id string) *UpdateVPNGat return options } -// SetAdminStateUp : Allow user to set AdminStateUp -func (options *UpdateVPNGatewayConnectionOptions) SetAdminStateUp(adminStateUp bool) *UpdateVPNGatewayConnectionOptions { - options.AdminStateUp = core.BoolPtr(adminStateUp) - return options -} - -// SetPeerAddress : Allow user to set PeerAddress -func (options *UpdateVPNGatewayConnectionOptions) SetPeerAddress(peerAddress string) *UpdateVPNGatewayConnectionOptions { - options.PeerAddress = core.StringPtr(peerAddress) - return options -} - -// SetName : Allow user to set Name -func (options *UpdateVPNGatewayConnectionOptions) SetName(name string) *UpdateVPNGatewayConnectionOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetPsk : Allow user to set Psk -func (options *UpdateVPNGatewayConnectionOptions) SetPsk(psk string) *UpdateVPNGatewayConnectionOptions { - options.Psk = core.StringPtr(psk) - return options -} - -// SetDeadPeerDetection : Allow user to set DeadPeerDetection -func (options *UpdateVPNGatewayConnectionOptions) SetDeadPeerDetection(deadPeerDetection *VPNGatewayConnectionDpdPrototype) *UpdateVPNGatewayConnectionOptions { - options.DeadPeerDetection = deadPeerDetection - return options -} - -// SetIkePolicy : Allow user to set IkePolicy -func (options *UpdateVPNGatewayConnectionOptions) SetIkePolicy(ikePolicy IkePolicyIdentityIntf) *UpdateVPNGatewayConnectionOptions { - options.IkePolicy = ikePolicy - return options -} - -// SetIpsecPolicy : Allow user to set IpsecPolicy -func (options *UpdateVPNGatewayConnectionOptions) SetIpsecPolicy(ipsecPolicy IPsecPolicyIdentityIntf) *UpdateVPNGatewayConnectionOptions { - options.IpsecPolicy = ipsecPolicy +// SetVPNGatewayConnectionPatch : Allow user to set VPNGatewayConnectionPatch +func (options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPatch(vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions { + options.VPNGatewayConnectionPatch = vpnGatewayConnectionPatch return options } @@ -24447,19 +24781,20 @@ func (options *UpdateVPNGatewayConnectionOptions) SetHeaders(param map[string]st // UpdateVPNGatewayOptions : The UpdateVPNGateway options. type UpdateVPNGatewayOptions struct { // The VPN gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this VPN gateway. - Name *string `json:"name,omitempty"` + // The VPN gateway patch. + VPNGatewayPatch map[string]interface{} `json:"VPNGateway_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPNGatewayOptions : Instantiate UpdateVPNGatewayOptions -func (*VpcClassicV1) NewUpdateVPNGatewayOptions(id string) *UpdateVPNGatewayOptions { +func (*VpcClassicV1) NewUpdateVPNGatewayOptions(id string, vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions { return &UpdateVPNGatewayOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + VPNGatewayPatch: vpnGatewayPatch, } } @@ -24469,9 +24804,9 @@ func (options *UpdateVPNGatewayOptions) SetID(id string) *UpdateVPNGatewayOption return options } -// SetName : Allow user to set Name -func (options *UpdateVPNGatewayOptions) SetName(name string) *UpdateVPNGatewayOptions { - options.Name = core.StringPtr(name) +// SetVPNGatewayPatch : Allow user to set VPNGatewayPatch +func (options *UpdateVPNGatewayOptions) SetVPNGatewayPatch(vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions { + options.VPNGatewayPatch = vpnGatewayPatch return options } @@ -24716,7 +25051,34 @@ func UnmarshalVPCIdentity(m map[string]json.RawMessage, result interface{}) (err if err != nil { return } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// VPCPatch : VPCPatch struct +type VPCPatch struct { + // The unique user-defined name for this VPC. + Name *string `json:"name,omitempty"` +} + +// UnmarshalVPCPatch unmarshals an instance of VPCPatch from the specified map of raw messages. +func UnmarshalVPCPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPCPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VPCPatch +func (vpcPatch *VPCPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(vpcPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } return } @@ -25201,6 +25563,76 @@ func UnmarshalVPNGatewayConnectionLocalCIDRs(m map[string]json.RawMessage, resul return } +// VPNGatewayConnectionPatch : VPNGatewayConnectionPatch struct +type VPNGatewayConnectionPatch struct { + // If set to false, the VPN connection is shut down. + AdminStateUp *bool `json:"admin_state_up,omitempty"` + + // The IP address of the peer VPN gateway. + PeerAddress *string `json:"peer_address,omitempty"` + + // The user-defined name for this VPN gateway connection. + Name *string `json:"name,omitempty"` + + // The preshared key. + Psk *string `json:"psk,omitempty"` + + // The Dead Peer Detection settings. + DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + + // Optional IKE policy configuration. The absence of a policy indicates autonegotiation. + IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"` + + // Optional IPsec policy configuration. The absence of a policy indicates + // autonegotiation. + IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` +} + +// UnmarshalVPNGatewayConnectionPatch unmarshals an instance of VPNGatewayConnectionPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPatch) + err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + if err != nil { + return + } + err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) + if err != nil { + return + } + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VPNGatewayConnectionPatch +func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(vpnGatewayConnectionPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct type VPNGatewayConnectionPeerCIDRs struct { // A collection of peer CIDRs for this resource. @@ -25262,6 +25694,33 @@ func UnmarshalVPNGatewayConnectionReference(m map[string]json.RawMessage, result return } +// VPNGatewayPatch : VPNGatewayPatch struct +type VPNGatewayPatch struct { + // The user-defined name for this VPN gateway. + Name *string `json:"name,omitempty"` +} + +// UnmarshalVPNGatewayPatch unmarshals an instance of VPNGatewayPatch from the specified map of raw messages. +func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VPNGatewayPatch +func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(vpnGatewayPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VPNGatewayPublicIP : The public IP address assigned to this VPN gateway. type VPNGatewayPublicIP struct { // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this @@ -25411,12 +25870,12 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro // VolumeAttachment : VolumeAttachment struct type VolumeAttachment struct { - // The user-defined name for this volume attachment. - Name *string `json:"name" validate:"required"` - // If set to true, when deleting the instance the volume will also be deleted. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. + Name *string `json:"name" validate:"required"` + // The unique identifier for this volume attachment. ID *string `json:"id" validate:"required"` @@ -25459,11 +25918,11 @@ const ( // UnmarshalVolumeAttachment unmarshals an instance of VolumeAttachment from the specified map of raw messages. func UnmarshalVolumeAttachment(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachment) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } - err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -25533,16 +25992,49 @@ func UnmarshalVolumeAttachmentDevice(m map[string]json.RawMessage, result interf return } -// VolumeAttachmentPrototypeInstanceByImageContext : VolumeAttachmentPrototypeInstanceByImageContext struct -type VolumeAttachmentPrototypeInstanceByImageContext struct { +// VolumeAttachmentPatch : VolumeAttachmentPatch struct +type VolumeAttachmentPatch struct { + // If set to true, when deleting the instance the volume will also be deleted. + DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. Name *string `json:"name,omitempty"` +} + +// UnmarshalVolumeAttachmentPatch unmarshals an instance of VolumeAttachmentPatch from the specified map of raw messages. +func UnmarshalVolumeAttachmentPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VolumeAttachmentPatch) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VolumeAttachmentPatch +func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(volumeAttachmentPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} +// VolumeAttachmentPrototypeInstanceByImageContext : VolumeAttachmentPrototypeInstanceByImageContext struct +type VolumeAttachmentPrototypeInstanceByImageContext struct { // If set to true, when deleting the instance the volume will also be deleted. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` - // The identity of the volume to attach to the instance, or a prototype object for a - // new volume. + // The user-defined name for this volume attachment. + Name *string `json:"name,omitempty"` + + // A prototype object for a new volume. Volume *VolumePrototypeInstanceByImageContext `json:"volume" validate:"required"` } @@ -25558,11 +26050,11 @@ func (*VpcClassicV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume * // UnmarshalVolumeAttachmentPrototypeInstanceByImageContext unmarshals an instance of VolumeAttachmentPrototypeInstanceByImageContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceByImageContext) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } - err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -25576,12 +26068,12 @@ func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json. // VolumeAttachmentPrototypeInstanceContext : VolumeAttachmentPrototypeInstanceContext struct type VolumeAttachmentPrototypeInstanceContext struct { - // The user-defined name for this volume attachment. - Name *string `json:"name,omitempty"` - // If set to true, when deleting the instance the volume will also be deleted. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. + Name *string `json:"name,omitempty"` + // The identity of the volume to attach to the instance, or a prototype object for a new // volume. Volume VolumeAttachmentPrototypeInstanceContextVolumeIntf `json:"volume" validate:"required"` @@ -25599,11 +26091,11 @@ func (*VpcClassicV1) NewVolumeAttachmentPrototypeInstanceContext(volume VolumeAt // UnmarshalVolumeAttachmentPrototypeInstanceContext unmarshals an instance of VolumeAttachmentPrototypeInstanceContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceContext) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } - err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -25898,6 +26390,33 @@ func UnmarshalVolumeIdentity(m map[string]json.RawMessage, result interface{}) ( return } +// VolumePatch : VolumePatch struct +type VolumePatch struct { + // The unique user-defined name for this volume. + Name *string `json:"name,omitempty"` +} + +// UnmarshalVolumePatch unmarshals an instance of VolumePatch from the specified map of raw messages. +func UnmarshalVolumePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VolumePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VolumePatch +func (volumePatch *VolumePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(volumePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VolumeProfile : VolumeProfile struct type VolumeProfile struct { // The name for this volume profile. @@ -26962,8 +27481,6 @@ type ImagePrototypeImageByFile struct { // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The file from which to create the image. @@ -27359,12 +27876,10 @@ type InstancePrototypeInstanceByImage struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Primary network interface. @@ -27799,9 +28314,9 @@ func UnmarshalLoadBalancerListenerPolicyPrototypeTargetLoadBalancerPoolIdentity( return } -// LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL struct -// This model "extends" LoadBalancerListenerPolicyTargetReference -type LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL struct { +// LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct +// This model "extends" LoadBalancerListenerPolicyTarget +type LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct { // The http status code in the redirect response. HTTPStatusCode *int64 `json:"http_status_code" validate:"required"` @@ -27809,13 +28324,13 @@ type LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirect URL *string `json:"url" validate:"required"` } -func (*LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL) isaLoadBalancerListenerPolicyTargetReference() bool { +func (*LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) isaLoadBalancerListenerPolicyTarget() bool { return true } -// UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL unmarshals an instance of LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL from the specified map of raw messages. -func UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL) +// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return @@ -27828,9 +28343,9 @@ func UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolic return } -// LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference : LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference struct -// This model "extends" LoadBalancerListenerPolicyTargetReference -type LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference struct { +// LoadBalancerListenerPolicyTargetLoadBalancerPoolReference : LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct +// This model "extends" LoadBalancerListenerPolicyTarget +type LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct { // The unique identifier for this load balancer pool. ID *string `json:"id" validate:"required"` @@ -27841,13 +28356,13 @@ type LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference struct { Name *string `json:"name" validate:"required"` } -func (*LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference) isaLoadBalancerListenerPolicyTargetReference() bool { +func (*LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) isaLoadBalancerListenerPolicyTarget() bool { return true } -// UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference unmarshals an instance of LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference from the specified map of raw messages. -func UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference) +// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerPoolReference from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return @@ -28205,8 +28720,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol" 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. + // 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. @@ -28329,8 +28844,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol" 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. + // 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. @@ -28468,8 +28983,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol" 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. + // 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. @@ -28613,8 +29128,7 @@ type NetworkACLRulePatchNetworkACLRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The rule to move this rule immediately before. Specify `null` to move this rule after - // all existing rules. + // The rule to move this rule immediately before. Specify `null` to move this rule after all existing rules. Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` } @@ -28701,8 +29215,7 @@ type NetworkACLRulePatchNetworkACLRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The rule to move this rule immediately before. Specify `null` to move this rule after - // all existing rules. + // The rule to move this rule immediately before. Specify `null` to move this rule after all existing rules. Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` // The ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -28804,8 +29317,7 @@ type NetworkACLRulePatchNetworkACLRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol,omitempty"` - // The rule to move this rule immediately before. Specify `null` to move this rule after - // all existing rules. + // The rule to move this rule immediately before. Specify `null` to move this rule after all existing rules. Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` // The inclusive upper bound of TCP/UDP destination port range. @@ -28945,19 +29457,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -29046,19 +29545,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -29160,19 +29646,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -29246,8 +29719,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` - // The rule to insert this rule immediately before. If omitted, this rule will be - // inserted after all existing rules. + // The rule to insert this rule immediately before. If omitted, this rule will be inserted after all existing rules. Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` } @@ -29274,19 +29746,6 @@ const ( NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool { return true } @@ -29348,8 +29807,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` - // The rule to insert this rule immediately before. If omitted, this rule will be - // inserted after all existing rules. + // 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 ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -29383,19 +29841,6 @@ const ( NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool { return true } @@ -29465,8 +29910,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` - // The rule to insert this rule immediately before. If omitted, this rule will be - // inserted after all existing rules. + // 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 inclusive upper bound of TCP/UDP destination port range. @@ -29505,19 +29949,6 @@ const ( NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcClassicV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool { return true } @@ -30520,10 +30951,6 @@ func UnmarshalSecurityGroupRulePatchRemoteSecurityGroupIdentity(m map[string]jso // `code`. // This model "extends" SecurityGroupRulePatch type SecurityGroupRulePatchSecurityGroupRuleProtocolAll struct { - // 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). Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` // The direction of traffic to enforce, either `inbound` or `outbound`. @@ -30595,10 +31022,6 @@ func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolAll(m map[string]js // codes. // This model "extends" SecurityGroupRulePatch type SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp struct { - // 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). Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` // The direction of traffic to enforce, either `inbound` or `outbound`. @@ -30683,10 +31106,6 @@ func UnmarshalSecurityGroupRulePatchSecurityGroupRuleProtocolIcmp(m map[string]j // single port, set both to the same value. // This model "extends" SecurityGroupRulePatch type SecurityGroupRulePatchSecurityGroupRuleProtocolTcpudp struct { - // 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). Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` // The direction of traffic to enforce, either `inbound` or `outbound`. @@ -30896,10 +31315,6 @@ 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, then traffic will be allowed from any source (or to any - // source, for outbound rules). Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` } @@ -30927,15 +31342,6 @@ const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolUDPConst = "udp" ) -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolAll (Generic Model Constructor) -func (*VpcClassicV1) 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 } @@ -30980,10 +31386,6 @@ 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, then traffic will be allowed from any source (or to any - // source, for outbound rules). Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The ICMP traffic code to allow. @@ -31017,15 +31419,6 @@ const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp (Generic Model Constructor) -func (*VpcClassicV1) 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 } @@ -31077,10 +31470,6 @@ 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, then traffic will be allowed from any source (or to any - // source, for outbound rules). Remote SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The inclusive upper bound of TCP/UDP port range. @@ -31114,15 +31503,6 @@ const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp : Instantiate SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcClassicV1) 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 } @@ -31267,10 +31647,6 @@ type SecurityGroupRuleSecurityGroupRuleProtocolAll 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. If omitted, then traffic is allowed from any source (or to any - // source, for outbound rules). Remote SecurityGroupRuleRemoteIntf `json:"remote,omitempty"` } @@ -31349,10 +31725,6 @@ type SecurityGroupRuleSecurityGroupRuleProtocolIcmp 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. 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. @@ -31444,10 +31816,6 @@ type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp 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. 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. @@ -31620,7 +31988,7 @@ type SubnetPrototypeSubnetByCIDR struct { // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The network ACL to use for this subnet. + // The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used. NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` // The public gateway to handle internet bound traffic for this subnet. @@ -31691,7 +32059,7 @@ type SubnetPrototypeSubnetByTotalCount struct { // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The network ACL to use for this subnet. + // The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used. NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` // The public gateway to handle internet bound traffic for this subnet. @@ -32085,8 +32453,6 @@ type VolumePrototypeVolumeByCapacity struct { // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The location of the volume. diff --git a/vpcclassicv1/vpc_classic_v1_integration_utils_test.go b/vpcclassicv1/vpc_classic_v1_integration_utils_test.go index 4694a05..b147214 100644 --- a/vpcclassicv1/vpc_classic_v1_integration_utils_test.go +++ b/vpcclassicv1/vpc_classic_v1_integration_utils_test.go @@ -134,13 +134,14 @@ func DeleteFloatingIp(vpcService *vpcclassicv1.VpcClassicV1, id string) (respons // /floating_ips/{id} // Update the specified floating IP func UpdateFloatingIp(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (floatingIP *vpcclassicv1.FloatingIP, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateFloatingIPOptions{ - ID: core.StringPtr(id), + body := &vpcclassicv1.FloatingIPPatch{ Name: core.StringPtr(name), } - // options.SetTarget(&vpcclassicv1.NetworkInterfaceIdentity{ - // ID: core.StringPtr(targetId), - // }) + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateFloatingIPOptions{ + ID: core.StringPtr(id), + FloatingIPPatch: patchBody, + } floatingIP, response, err = vpcService.UpdateFloatingIP(options) return } @@ -187,9 +188,13 @@ func GetKey(vpcService *vpcclassicv1.VpcClassicV1, id string) (key *vpcclassicv1 // /keys/{id} // Update specified key func UpdateKey(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (key *vpcclassicv1.Key, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.FloatingIPPatch{ + Name: core.StringPtr(name), + } + patchBody, _ := body.AsPatch() updateKeyOptions := &vpcclassicv1.UpdateKeyOptions{} updateKeyOptions.SetID(id) - updateKeyOptions.SetName(name) + updateKeyOptions.SetKeyPatch(patchBody) key, response, err = vpcService.UpdateKey(updateKeyOptions) return } @@ -253,10 +258,14 @@ func DeleteVPC(vpcService *vpcclassicv1.VpcClassicV1, id string) (response *core // /vpcs/{id} // Update specified VPC func UpdateVPC(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (vpc *vpcclassicv1.VPC, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.VPCPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateVPCOptions{ - Name: core.StringPtr(name), + VPCPatch: patchBody, + ID: &id, } - options.SetID(id) vpc, response, err = vpcService.UpdateVPC(options) return } @@ -345,10 +354,15 @@ func DeleteVpcAddressPrefix(vpcService *vpcclassicv1.VpcClassicV1, vpcID, addres // /vpcs/{vpc_id}/address_prefixes/{id} // Update an address pool prefix func UpdateVpcAddressPrefix(vpcService *vpcclassicv1.VpcClassicV1, vpcID, addressPrefixID, name string) (addrPrefix *vpcclassicv1.AddressPrefix, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateVPCAddressPrefixOptions{} - options.SetVPCID(vpcID) - options.SetID(addressPrefixID) - options.SetName(name) + body := &vpcclassicv1.AddressPrefixPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateVPCAddressPrefixOptions{ + AddressPrefixPatch: patchBody, + VPCID: &vpcID, + ID: &addressPrefixID, + } addrPrefix, response, err = vpcService.UpdateVPCAddressPrefix(options) return } @@ -412,11 +426,14 @@ func DeleteVpcRoute(vpcService *vpcclassicv1.VpcClassicV1, vpcID, routeID string // /vpcs/{vpc_id}/routes/{id} // Update a route func UpdateVpcRoute(vpcService *vpcclassicv1.VpcClassicV1, vpcID, routeID, name string) (route *vpcclassicv1.Route, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.RoutePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateVPCRouteOptions{} - options.SetVPCID(vpcID) options.SetID(routeID) - options.SetName(name) + options.SetRoutePatch(patchBody) route, response, err = vpcService.UpdateVPCRoute(options) return } @@ -478,9 +495,14 @@ func DeleteVolume(vpcService *vpcclassicv1.VpcClassicV1, id string) (response *c // /volumes/{id} // Update specified volume func UpdateVolume(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (volume *vpcclassicv1.Volume, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateVolumeOptions{} + body := &vpcclassicv1.VolumePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateVolumeOptions{ + VolumePatch: patchBody, + } options.SetID(id) - options.SetName(name) volume, response, err = vpcService.UpdateVolume(options) return } @@ -542,9 +564,13 @@ func DeleteSubnet(vpcService *vpcclassicv1.VpcClassicV1, id string) (response *c // /subnets/{id} // Update specified subnet func UpdateSubnet(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (subnet *vpcclassicv1.Subnet, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.SubnetPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateSubnetOptions{} options.SetID(id) - options.SetName(name) + options.SetSubnetPatch(patchBody) subnet, response, err = vpcService.UpdateSubnet(options) return } @@ -672,9 +698,13 @@ func DeleteImage(vpcService *vpcclassicv1.VpcClassicV1, id string) (response *co // /images/{id} // Update specified image func UpdateImage(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (image *vpcclassicv1.Image, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.ImagePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateImageOptions{} options.SetID(id) - options.SetName(name) + options.SetImagePatch(patchBody) image, response, err = vpcService.UpdateImage(options) return } @@ -762,9 +792,13 @@ func DeleteInstance(vpcService *vpcclassicv1.VpcClassicV1, id string) (response // /instances/{id} // Update specified instance func UpdateInstance(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (instance *vpcclassicv1.Instance, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.InstancePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateInstanceOptions{} options.SetID(id) - options.SetName(name) + options.SetInstancePatch(patchBody) instance, response, err = vpcService.UpdateInstance(options) return } @@ -942,10 +976,14 @@ func GetVolumeAttachment(vpcService *vpcclassicv1.VpcClassicV1, instanceID, volu // /instances/{instance_id}/volume_attachments/{id} // Update a volume attachment func UpdateVolumeAttachment(vpcService *vpcclassicv1.VpcClassicV1, instanceID, volumeID, name string) (volume *vpcclassicv1.VolumeAttachment, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.VolumeAttachmentPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateInstanceVolumeAttachmentOptions{} options.SetInstanceID(instanceID) options.SetID(volumeID) - options.SetName(name) + options.SetVolumeAttachmentPatch(patchBody) volume, response, err = vpcService.UpdateInstanceVolumeAttachment(options) return } @@ -1003,9 +1041,13 @@ func GetPublicGateway(vpcService *vpcclassicv1.VpcClassicV1, id string) (pgw *vp // /public_gateways/{id} // Update a public gateway's name func UpdatePublicGateway(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (pgw *vpcclassicv1.PublicGateway, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.PublicGatewayPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdatePublicGatewayOptions{} options.SetID(id) - options.SetName(name) + options.SetPublicGatewayPatch(patchBody) pgw, response, err = vpcService.UpdatePublicGateway(options) return } @@ -1063,9 +1105,13 @@ func GetNetworkAcl(vpcService *vpcclassicv1.VpcClassicV1, ID string) (nacl *vpcc // /network_acls/{id} // Update a network ACL func UpdateNetworkAcl(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (nacl *vpcclassicv1.NetworkACL, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.NetworkACLPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateNetworkACLOptions{} options.SetID(id) - options.SetName(name) + options.SetNetworkACLPatch(patchBody) nacl, response, err = vpcService.UpdateNetworkACL(options) return } @@ -1124,12 +1170,14 @@ func GetNetworkAclRule(vpcService *vpcclassicv1.VpcClassicV1, aclID, ruleID stri // /network_acls/{network_acl_id}/rules/{id} // Update a rule func UpdateNetworkAclRule(vpcService *vpcclassicv1.VpcClassicV1, aclID, ruleID, name string) (naclRule vpcclassicv1.NetworkACLRuleIntf, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.NetworkACLRulePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateNetworkACLRuleOptions{} options.SetID(ruleID) options.SetNetworkACLID(aclID) - options.SetNetworkACLRulePatch(&vpcclassicv1.NetworkACLRulePatch{ - Name: core.StringPtr(name), - }) + options.SetNetworkACLRulePatch(patchBody) naclRule, response, err = vpcService.UpdateNetworkACLRule(options) return } @@ -1187,9 +1235,13 @@ func GetSecurityGroup(vpcService *vpcclassicv1.VpcClassicV1, id string) (sg *vpc // /security_groups/{id} // Update a security group func UpdateSecurityGroup(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (sg *vpcclassicv1.SecurityGroup, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.SecurityGroupPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateSecurityGroupOptions{} options.SetID(id) - options.SetName(name) + options.SetSecurityGroupPatch(patchBody) sg, response, err = vpcService.UpdateSecurityGroup(options) return } @@ -1293,14 +1345,16 @@ func GetSecurityGroupRule(vpcService *vpcclassicv1.VpcClassicV1, sgID, sgRuleID // /security_groups/{security_group_id}/rules/{id} // Update a security group rule func UpdateSecurityGroupRule(vpcService *vpcclassicv1.VpcClassicV1, sgID, sgRuleID string) (rule vpcclassicv1.SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { + securityGroupRulePatchRemoteModel := new(vpcclassicv1.SecurityGroupRulePatchRemoteIP) + securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") + securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatch) + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel + patchBody, _ := securityGroupRulePatchModel.AsPatch() options := &vpcclassicv1.UpdateSecurityGroupRuleOptions{} options.SetSecurityGroupID(sgID) options.SetID(sgRuleID) - options.SetSecurityGroupRulePatch(&vpcclassicv1.SecurityGroupRulePatch{ - Remote: &vpcclassicv1.SecurityGroupRulePatchRemote{ - Address: core.StringPtr("1.1.1.11"), - }, - }) + options.SetSecurityGroupRulePatch(patchBody) + rule, response, err = vpcService.UpdateSecurityGroupRule(options) rule, response, err = vpcService.UpdateSecurityGroupRule(options) return } @@ -1360,10 +1414,14 @@ func GetLoadBalancer(vpcService *vpcclassicv1.VpcClassicV1, id string) (lb *vpcc // /load_balancers/{id} // Update a load balancer func UpdateLoadBalancer(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (lb *vpcclassicv1.LoadBalancer, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.AddressPrefixPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateLoadBalancerOptions{ - Name: core.StringPtr(name), + LoadBalancerPatch: patchBody, + ID: &id, } - options.SetID(id) lb, response, err = vpcService.UpdateLoadBalancer(options) return } @@ -1426,11 +1484,15 @@ func GetLoadBalancerListener(vpcService *vpcclassicv1.VpcClassicV1, lbID, listen // /load_balancers/{load_balancer_id}/listeners/{id} // Update a listener func UpdateLoadBalancerListener(vpcService *vpcclassicv1.VpcClassicV1, lbID, listenerID string) (listener *vpcclassicv1.LoadBalancerListener, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateLoadBalancerListenerOptions{} - + body := &vpcclassicv1.LoadBalancerListenerPatch{ + Protocol: core.StringPtr("tcp"), + } + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateLoadBalancerListenerOptions{ + LoadBalancerListenerPatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetID(listenerID) - options.SetProtocol("tcp") listener, response, err = vpcService.UpdateLoadBalancerListener(options) return } @@ -1486,17 +1548,20 @@ func GetLoadBalancerListenerPolicy(vpcService *vpcclassicv1.VpcClassicV1, lbID, // /load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id} // Update a policy of the load balancer listener func UpdateLoadBalancerListenerPolicy(vpcService *vpcclassicv1.VpcClassicV1, lbID, listenerID, policyID, targetPoolID string) (policy *vpcclassicv1.LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateLoadBalancerListenerPolicyOptions{} + target := &vpcclassicv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentity{ + ID: core.StringPtr(targetPoolID), + } + model := new(vpcclassicv1.LoadBalancerListenerPolicyPatch) + model.Name = core.StringPtr("my-policy") + model.Target = target + model.Priority = core.Int64Ptr(4) + patchBody, _ := model.AsPatch() + options := &vpcclassicv1.UpdateLoadBalancerListenerPolicyOptions{ + LoadBalancerListenerPolicyPatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetListenerID(listenerID) options.SetID(policyID) - - options.SetPriority(4) - options.SetName("some-name") - target := &vpcclassicv1.LoadBalancerListenerPolicyPatchTarget{ - ID: core.StringPtr(targetPoolID), - } - options.SetTarget(target) policy, response, err = vpcService.UpdateLoadBalancerListenerPolicy(options) return } @@ -1558,15 +1623,19 @@ func GetLoadBalancerListenerPolicyRule(vpcService *vpcclassicv1.VpcClassicV1, lb // /load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id} // Update a rule of the load balancer listener policy func UpdateLoadBalancerListenerPolicyRule(vpcService *vpcclassicv1.VpcClassicV1, lbID, listenerID, policyID, ruleID string) (rule *vpcclassicv1.LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.LoadBalancerListenerPolicyRulePatch{ + Condition: core.StringPtr("equals"), + Type: core.StringPtr("header"), + Value: core.StringPtr("1"), + Field: core.StringPtr("some-field"), + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateLoadBalancerListenerPolicyRuleOptions{} options.SetLoadBalancerID(lbID) options.SetListenerID(listenerID) options.SetPolicyID(policyID) options.SetID(ruleID) - options.SetCondition("equals") - options.SetType("header") - options.SetValue("1") - options.SetField("some-name") + options.SetLoadBalancerListenerPolicyRulePatch(patchBody) rule, response, err = vpcService.UpdateLoadBalancerListenerPolicyRule(options) return } @@ -1626,10 +1695,15 @@ func GetLoadBalancerPool(vpcService *vpcclassicv1.VpcClassicV1, lbID, poolID str // /load_balancers/{load_balancer_id}/pools/{id} // Update a load balancer pool func UpdateLoadBalancerPool(vpcService *vpcclassicv1.VpcClassicV1, lbID, poolID string) (pool *vpcclassicv1.LoadBalancerPool, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateLoadBalancerPoolOptions{} + body := &vpcclassicv1.LoadBalancerPoolPatch{ + Protocol: core.StringPtr("tcp"), + } + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateLoadBalancerPoolOptions{ + LoadBalancerPoolPatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetID(poolID) - options.SetProtocol("tcp") pool, response, err = vpcService.UpdateLoadBalancerPool(options) return } @@ -1668,7 +1742,7 @@ func UpdateLoadBalancerPoolMembers(vpcService *vpcclassicv1.VpcClassicV1, lbID, options.SetLoadBalancerID(lbID) options.SetPoolID(poolID) options.SetMembers([]vpcclassicv1.LoadBalancerPoolMemberPrototype{ - vpcclassicv1.LoadBalancerPoolMemberPrototype{ + { Port: core.Int64Ptr(2345), Target: &vpcclassicv1.LoadBalancerPoolMemberTargetPrototype{ Address: core.StringPtr("13.13.0.0"), @@ -1706,11 +1780,16 @@ func GetLoadBalancerPoolMember(vpcService *vpcclassicv1.VpcClassicV1, lbID, pool // UpdateLoadBalancerPoolMember PATCH // /load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id} func UpdateLoadBalancerPoolMember(vpcService *vpcclassicv1.VpcClassicV1, lbID, poolID, memberID string) (member *vpcclassicv1.LoadBalancerPoolMember, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateLoadBalancerPoolMemberOptions{} + body := &vpcclassicv1.LoadBalancerPoolMemberPatch{ + Port: core.Int64Ptr(3434), + } + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateLoadBalancerPoolMemberOptions{ + LoadBalancerPoolMemberPatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetPoolID(poolID) options.SetID(memberID) - options.SetPort(3434) member, response, err = vpcService.UpdateLoadBalancerPoolMember(options) return } @@ -1765,10 +1844,14 @@ func GetIkePolicy(vpcService *vpcclassicv1.VpcClassicV1, id string) (policy *vpc // /ike_policies/{id} // Update an Ike policy func UpdateIkePolicy(vpcService *vpcclassicv1.VpcClassicV1, id string) (policy *vpcclassicv1.IkePolicy, response *core.DetailedResponse, err error) { - options := &vpcclassicv1.UpdateIkePolicyOptions{ - ID: core.StringPtr(id), - DhGroup: core.Int64Ptr(5), + body := &vpcclassicv1.IkePolicyPatch{ Name: core.StringPtr("go-ike-policy-2"), + DhGroup: core.Int64Ptr(5), + } + patchBody, _ := body.AsPatch() + options := &vpcclassicv1.UpdateIkePolicyOptions{ + ID: core.StringPtr(id), + IkePolicyPatch: patchBody, } policy, response, err = vpcService.UpdateIkePolicy(options) return @@ -1829,10 +1912,14 @@ func GetIpsecPolicy(vpcService *vpcclassicv1.VpcClassicV1, id string) (policy *v // /ipsec_policies/{id} // Update an IPsec policy func UpdateIpsecPolicy(vpcService *vpcclassicv1.VpcClassicV1, id string) (policy *vpcclassicv1.IPsecPolicy, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.IPsecPolicyPatch{ + EncryptionAlgorithm: core.StringPtr("3des"), + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateIpsecPolicyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + IPsecPolicyPatch: patchBody, } - options.SetEncryptionAlgorithm("3des") policy, response, err = vpcService.UpdateIpsecPolicy(options) return } @@ -1892,9 +1979,13 @@ func GetVPNGateway(vpcService *vpcclassicv1.VpcClassicV1, id string) (gateway *v // /vpn_gateways/{id} // Update a VPN gateway func UpdateVPNGateway(vpcService *vpcclassicv1.VpcClassicV1, id, name string) (gateway *vpcclassicv1.VPNGateway, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.VPNGatewayPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateVPNGatewayOptions{ - ID: core.StringPtr(id), - Name: core.StringPtr(name), + ID: core.StringPtr(id), + VPNGatewayPatch: patchBody, } gateway, response, err = vpcService.UpdateVPNGateway(options) return @@ -1953,10 +2044,14 @@ func GetVPNGatewayConnection(vpcService *vpcclassicv1.VpcClassicV1, gatewayID, c // /vpn_gateways/{vpn_gateway_id}/connections/{id} // Update a VPN connection func UpdateVPNGatewayConnection(vpcService *vpcclassicv1.VpcClassicV1, gatewayID, connID, name string) (connection *vpcclassicv1.VPNGatewayConnection, response *core.DetailedResponse, err error) { + body := &vpcclassicv1.VPNGatewayConnectionPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcclassicv1.UpdateVPNGatewayConnectionOptions{ - ID: core.StringPtr(connID), - VPNGatewayID: core.StringPtr(gatewayID), - Name: core.StringPtr(name), + ID: core.StringPtr(connID), + VPNGatewayID: core.StringPtr(gatewayID), + VPNGatewayConnectionPatch: patchBody, } connection, response, err = vpcService.UpdateVPNGatewayConnection(options) return diff --git a/vpcclassicv1/vpc_classic_v1_test.go b/vpcclassicv1/vpc_classic_v1_test.go index 237a026..5e48010 100644 --- a/vpcclassicv1/vpc_classic_v1_test.go +++ b/vpcclassicv1/vpc_classic_v1_test.go @@ -40,14 +40,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -55,7 +55,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -76,7 +76,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -92,7 +92,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -116,7 +116,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -134,12 +134,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -159,7 +159,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVpcsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVpcsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -169,7 +169,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // TODO: Add check for classic_access query parameter res.Header().Set("Content-type", "application/json") @@ -181,7 +180,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -213,7 +212,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVpcsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVpcsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -223,7 +222,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1))})) - // TODO: Add check for classic_access query parameter res.Header().Set("Content-type", "application/json") @@ -235,7 +233,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -263,7 +261,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -297,7 +295,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -312,7 +310,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -349,7 +347,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -364,7 +362,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -397,7 +395,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -437,7 +435,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPCPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -450,7 +448,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -474,7 +472,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -511,7 +509,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -526,7 +524,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -556,7 +554,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -571,7 +569,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -597,7 +595,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -636,7 +634,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -651,15 +649,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VPCPatch model + vpcPatchModel := new(vpcclassicv1.VPCPatch) + vpcPatchModel.Name = core.StringPtr("my-vpc") + vpcPatchModelAsPatch, asPatchErr := vpcPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCOptions model updateVPCOptionsModel := new(vpcclassicv1.UpdateVPCOptions) updateVPCOptionsModel.ID = core.StringPtr("testString") - updateVPCOptionsModel.Name = core.StringPtr("my-vpc") + updateVPCOptionsModel.VPCPatch = vpcPatchModelAsPatch updateVPCOptionsModel.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 := vpcClassicService.UpdateVPC(updateVPCOptionsModel) @@ -682,7 +686,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -697,7 +701,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -708,10 +712,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VPCPatch model + vpcPatchModel := new(vpcclassicv1.VPCPatch) + vpcPatchModel.Name = core.StringPtr("my-vpc") + vpcPatchModelAsPatch, asPatchErr := vpcPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCOptions model updateVPCOptionsModel := new(vpcclassicv1.UpdateVPCOptions) updateVPCOptionsModel.ID = core.StringPtr("testString") - updateVPCOptionsModel.Name = core.StringPtr("my-vpc") + updateVPCOptionsModel.VPCPatch = vpcPatchModelAsPatch updateVPCOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -724,15 +734,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VPCPatch model + vpcPatchModel := new(vpcclassicv1.VPCPatch) + vpcPatchModel.Name = core.StringPtr("my-vpc") + vpcPatchModelAsPatch, asPatchErr := vpcPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCOptions model updateVPCOptionsModel := new(vpcclassicv1.UpdateVPCOptions) updateVPCOptionsModel.ID = core.StringPtr("testString") - updateVPCOptionsModel.Name = core.StringPtr("my-vpc") + updateVPCOptionsModel.VPCPatch = vpcPatchModelAsPatch updateVPCOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -764,7 +780,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCDefaultSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -779,7 +795,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -809,7 +825,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCDefaultSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -824,7 +840,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -850,7 +866,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -889,7 +905,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCAddressPrefixesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCAddressPrefixesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -908,7 +924,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -940,7 +956,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCAddressPrefixesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCAddressPrefixesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -959,7 +975,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -987,7 +1003,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1028,7 +1044,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCAddressPrefixPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1043,7 +1059,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1081,7 +1097,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCAddressPrefixPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1096,7 +1112,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1130,7 +1146,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1178,7 +1194,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPCAddressPrefixPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1191,7 +1207,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1216,7 +1232,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1254,7 +1270,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCAddressPrefixPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1269,7 +1285,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1300,7 +1316,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCAddressPrefixPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1315,7 +1331,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1342,7 +1358,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1382,7 +1398,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCAddressPrefixPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1397,17 +1413,23 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the AddressPrefixPatch model + addressPrefixPatchModel := new(vpcclassicv1.AddressPrefixPatch) + addressPrefixPatchModel.Name = core.StringPtr("my-address-prefix-2") + addressPrefixPatchModel.IsDefault = core.BoolPtr(false) + addressPrefixPatchModelAsPatch, asPatchErr := addressPrefixPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCAddressPrefixOptions model updateVPCAddressPrefixOptionsModel := new(vpcclassicv1.UpdateVPCAddressPrefixOptions) updateVPCAddressPrefixOptionsModel.VPCID = core.StringPtr("testString") updateVPCAddressPrefixOptionsModel.ID = core.StringPtr("testString") - updateVPCAddressPrefixOptionsModel.Name = core.StringPtr("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.IsDefault = core.BoolPtr(false) + updateVPCAddressPrefixOptionsModel.AddressPrefixPatch = addressPrefixPatchModelAsPatch updateVPCAddressPrefixOptionsModel.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 := vpcClassicService.UpdateVPCAddressPrefix(updateVPCAddressPrefixOptionsModel) @@ -1430,7 +1452,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCAddressPrefixPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1445,7 +1467,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1456,12 +1478,18 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the AddressPrefixPatch model + addressPrefixPatchModel := new(vpcclassicv1.AddressPrefixPatch) + addressPrefixPatchModel.Name = core.StringPtr("my-address-prefix-2") + addressPrefixPatchModel.IsDefault = core.BoolPtr(false) + addressPrefixPatchModelAsPatch, asPatchErr := addressPrefixPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCAddressPrefixOptions model updateVPCAddressPrefixOptionsModel := new(vpcclassicv1.UpdateVPCAddressPrefixOptions) updateVPCAddressPrefixOptionsModel.VPCID = core.StringPtr("testString") updateVPCAddressPrefixOptionsModel.ID = core.StringPtr("testString") - updateVPCAddressPrefixOptionsModel.Name = core.StringPtr("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.IsDefault = core.BoolPtr(false) + updateVPCAddressPrefixOptionsModel.AddressPrefixPatch = addressPrefixPatchModelAsPatch updateVPCAddressPrefixOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -1474,17 +1502,23 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the AddressPrefixPatch model + addressPrefixPatchModel := new(vpcclassicv1.AddressPrefixPatch) + addressPrefixPatchModel.Name = core.StringPtr("my-address-prefix-2") + addressPrefixPatchModel.IsDefault = core.BoolPtr(false) + addressPrefixPatchModelAsPatch, asPatchErr := addressPrefixPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCAddressPrefixOptions model updateVPCAddressPrefixOptionsModel := new(vpcclassicv1.UpdateVPCAddressPrefixOptions) updateVPCAddressPrefixOptionsModel.VPCID = core.StringPtr("testString") updateVPCAddressPrefixOptionsModel.ID = core.StringPtr("testString") - updateVPCAddressPrefixOptionsModel.Name = core.StringPtr("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.IsDefault = core.BoolPtr(false) + updateVPCAddressPrefixOptionsModel.AddressPrefixPatch = addressPrefixPatchModelAsPatch updateVPCAddressPrefixOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -1516,7 +1550,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCRoutesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1533,7 +1567,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1564,7 +1598,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCRoutesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1581,7 +1615,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1608,7 +1642,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1648,7 +1682,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1663,7 +1697,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1705,7 +1739,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1720,7 +1754,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1758,7 +1792,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1810,7 +1844,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPCRoutePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1823,7 +1857,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1848,7 +1882,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1886,7 +1920,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1901,7 +1935,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1932,7 +1966,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1947,7 +1981,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -1974,7 +2008,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2014,7 +2048,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2029,16 +2063,22 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the RoutePatch model + routePatchModel := new(vpcclassicv1.RoutePatch) + routePatchModel.Name = core.StringPtr("my-route-2") + routePatchModelAsPatch, asPatchErr := routePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCRouteOptions model updateVPCRouteOptionsModel := new(vpcclassicv1.UpdateVPCRouteOptions) updateVPCRouteOptionsModel.VPCID = core.StringPtr("testString") updateVPCRouteOptionsModel.ID = core.StringPtr("testString") - updateVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + updateVPCRouteOptionsModel.RoutePatch = routePatchModelAsPatch updateVPCRouteOptionsModel.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 := vpcClassicService.UpdateVPCRoute(updateVPCRouteOptionsModel) @@ -2061,7 +2101,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2076,7 +2116,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2087,11 +2127,17 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the RoutePatch model + routePatchModel := new(vpcclassicv1.RoutePatch) + routePatchModel.Name = core.StringPtr("my-route-2") + routePatchModelAsPatch, asPatchErr := routePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCRouteOptions model updateVPCRouteOptionsModel := new(vpcclassicv1.UpdateVPCRouteOptions) updateVPCRouteOptionsModel.VPCID = core.StringPtr("testString") updateVPCRouteOptionsModel.ID = core.StringPtr("testString") - updateVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + updateVPCRouteOptionsModel.RoutePatch = routePatchModelAsPatch updateVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -2104,16 +2150,22 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the RoutePatch model + routePatchModel := new(vpcclassicv1.RoutePatch) + routePatchModel.Name = core.StringPtr("my-route-2") + routePatchModelAsPatch, asPatchErr := routePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCRouteOptions model updateVPCRouteOptionsModel := new(vpcclassicv1.UpdateVPCRouteOptions) updateVPCRouteOptionsModel.VPCID = core.StringPtr("testString") updateVPCRouteOptionsModel.ID = core.StringPtr("testString") - updateVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + updateVPCRouteOptionsModel.RoutePatch = routePatchModelAsPatch updateVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -2141,14 +2193,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -2156,7 +2208,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -2177,7 +2229,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -2193,7 +2245,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -2217,7 +2269,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -2235,12 +2287,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -2260,7 +2312,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSubnetsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSubnetsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2279,7 +2331,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2310,7 +2362,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSubnetsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSubnetsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2329,7 +2381,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2356,7 +2408,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2389,7 +2441,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSubnetPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2404,7 +2456,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2459,7 +2511,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSubnetPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2474,7 +2526,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2525,7 +2577,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2590,7 +2642,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteSubnetPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2603,7 +2655,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2627,7 +2679,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2664,7 +2716,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2679,7 +2731,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2709,7 +2761,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2724,7 +2776,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2750,7 +2802,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2789,7 +2841,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSubnetPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2804,7 +2856,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2817,12 +2869,18 @@ var _ = Describe(`VpcClassicV1`, func() { publicGatewayIdentityModel := new(vpcclassicv1.PublicGatewayIdentityByID) publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the SubnetPatch model + subnetPatchModel := new(vpcclassicv1.SubnetPatch) + subnetPatchModel.Name = core.StringPtr("my-subnet") + subnetPatchModel.NetworkACL = networkACLIdentityModel + subnetPatchModel.PublicGateway = publicGatewayIdentityModel + subnetPatchModelAsPatch, asPatchErr := subnetPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSubnetOptions model updateSubnetOptionsModel := new(vpcclassicv1.UpdateSubnetOptions) updateSubnetOptionsModel.ID = core.StringPtr("testString") - updateSubnetOptionsModel.Name = core.StringPtr("my-subnet") - updateSubnetOptionsModel.NetworkACL = networkACLIdentityModel - updateSubnetOptionsModel.PublicGateway = publicGatewayIdentityModel + updateSubnetOptionsModel.SubnetPatch = subnetPatchModelAsPatch updateSubnetOptionsModel.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 := vpcClassicService.UpdateSubnet(updateSubnetOptionsModel) @@ -2845,7 +2903,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSubnetPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2860,7 +2918,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2879,12 +2937,18 @@ var _ = Describe(`VpcClassicV1`, func() { publicGatewayIdentityModel := new(vpcclassicv1.PublicGatewayIdentityByID) publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the SubnetPatch model + subnetPatchModel := new(vpcclassicv1.SubnetPatch) + subnetPatchModel.Name = core.StringPtr("my-subnet") + subnetPatchModel.NetworkACL = networkACLIdentityModel + subnetPatchModel.PublicGateway = publicGatewayIdentityModel + subnetPatchModelAsPatch, asPatchErr := subnetPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSubnetOptions model updateSubnetOptionsModel := new(vpcclassicv1.UpdateSubnetOptions) updateSubnetOptionsModel.ID = core.StringPtr("testString") - updateSubnetOptionsModel.Name = core.StringPtr("my-subnet") - updateSubnetOptionsModel.NetworkACL = networkACLIdentityModel - updateSubnetOptionsModel.PublicGateway = publicGatewayIdentityModel + updateSubnetOptionsModel.SubnetPatch = subnetPatchModelAsPatch updateSubnetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -2897,7 +2961,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2910,12 +2974,18 @@ var _ = Describe(`VpcClassicV1`, func() { publicGatewayIdentityModel := new(vpcclassicv1.PublicGatewayIdentityByID) publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the SubnetPatch model + subnetPatchModel := new(vpcclassicv1.SubnetPatch) + subnetPatchModel.Name = core.StringPtr("my-subnet") + subnetPatchModel.NetworkACL = networkACLIdentityModel + subnetPatchModel.PublicGateway = publicGatewayIdentityModel + subnetPatchModelAsPatch, asPatchErr := subnetPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSubnetOptions model updateSubnetOptionsModel := new(vpcclassicv1.UpdateSubnetOptions) updateSubnetOptionsModel.ID = core.StringPtr("testString") - updateSubnetOptionsModel.Name = core.StringPtr("my-subnet") - updateSubnetOptionsModel.NetworkACL = networkACLIdentityModel - updateSubnetOptionsModel.PublicGateway = publicGatewayIdentityModel + updateSubnetOptionsModel.SubnetPatch = subnetPatchModelAsPatch updateSubnetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -2947,7 +3017,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2962,7 +3032,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -2992,7 +3062,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3007,7 +3077,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3033,7 +3103,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3072,7 +3142,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceSubnetNetworkACLPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3087,7 +3157,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3122,7 +3192,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceSubnetNetworkACLPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3137,7 +3207,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3168,7 +3238,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3213,7 +3283,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(unsetSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(unsetSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3226,7 +3296,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3250,7 +3320,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3287,7 +3357,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3302,7 +3372,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3332,7 +3402,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3347,7 +3417,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3373,7 +3443,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3412,7 +3482,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(setSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(setSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3427,7 +3497,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3462,7 +3532,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(setSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(setSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3477,7 +3547,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3508,7 +3578,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3548,14 +3618,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -3563,7 +3633,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -3584,7 +3654,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -3600,7 +3670,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -3624,7 +3694,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -3642,12 +3712,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -3667,7 +3737,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listImagesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listImagesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3692,7 +3762,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3726,7 +3796,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listImagesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listImagesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3751,7 +3821,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3781,7 +3851,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3817,7 +3887,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(createImagePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3832,7 +3902,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3843,11 +3913,11 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcclassicv1.ImageFilePrototype) - imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/my-bucket/my-image.qcow2") // Construct an instance of the OperatingSystemIdentityByName model operatingSystemIdentityModel := new(vpcclassicv1.OperatingSystemIdentityByName) - operatingSystemIdentityModel.Name = core.StringPtr("ubuntu-16-amd64") + operatingSystemIdentityModel.Name = core.StringPtr("debian-9-amd64") // Construct an instance of the ImagePrototypeImageByFile model imagePrototypeModel := new(vpcclassicv1.ImagePrototypeImageByFile) @@ -3881,7 +3951,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(createImagePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3896,7 +3966,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3913,11 +3983,11 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcclassicv1.ImageFilePrototype) - imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/my-bucket/my-image.qcow2") // Construct an instance of the OperatingSystemIdentityByName model operatingSystemIdentityModel := new(vpcclassicv1.OperatingSystemIdentityByName) - operatingSystemIdentityModel.Name = core.StringPtr("ubuntu-16-amd64") + operatingSystemIdentityModel.Name = core.StringPtr("debian-9-amd64") // Construct an instance of the ImagePrototypeImageByFile model imagePrototypeModel := new(vpcclassicv1.ImagePrototypeImageByFile) @@ -3941,7 +4011,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -3952,11 +4022,11 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcclassicv1.ImageFilePrototype) - imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/my-bucket/my-image.qcow2") // Construct an instance of the OperatingSystemIdentityByName model operatingSystemIdentityModel := new(vpcclassicv1.OperatingSystemIdentityByName) - operatingSystemIdentityModel.Name = core.StringPtr("ubuntu-16-amd64") + operatingSystemIdentityModel.Name = core.StringPtr("debian-9-amd64") // Construct an instance of the ImagePrototypeImageByFile model imagePrototypeModel := new(vpcclassicv1.ImagePrototypeImageByFile) @@ -4000,7 +4070,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteImagePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4013,7 +4083,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4037,7 +4107,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4074,7 +4144,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(getImagePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4089,7 +4159,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4119,7 +4189,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(getImagePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4134,7 +4204,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4160,7 +4230,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4199,7 +4269,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateImagePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4214,15 +4284,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the ImagePatch model + imagePatchModel := new(vpcclassicv1.ImagePatch) + imagePatchModel.Name = core.StringPtr("my-image") + imagePatchModelAsPatch, asPatchErr := imagePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateImageOptions model updateImageOptionsModel := new(vpcclassicv1.UpdateImageOptions) updateImageOptionsModel.ID = core.StringPtr("testString") - updateImageOptionsModel.Name = core.StringPtr("my-image") + updateImageOptionsModel.ImagePatch = imagePatchModelAsPatch updateImageOptionsModel.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 := vpcClassicService.UpdateImage(updateImageOptionsModel) @@ -4245,7 +4321,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateImagePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4260,7 +4336,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4271,10 +4347,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the ImagePatch model + imagePatchModel := new(vpcclassicv1.ImagePatch) + imagePatchModel.Name = core.StringPtr("my-image") + imagePatchModelAsPatch, asPatchErr := imagePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateImageOptions model updateImageOptionsModel := new(vpcclassicv1.UpdateImageOptions) updateImageOptionsModel.ID = core.StringPtr("testString") - updateImageOptionsModel.Name = core.StringPtr("my-image") + updateImageOptionsModel.ImagePatch = imagePatchModelAsPatch updateImageOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -4287,15 +4369,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the ImagePatch model + imagePatchModel := new(vpcclassicv1.ImagePatch) + imagePatchModel.Name = core.StringPtr("my-image") + imagePatchModelAsPatch, asPatchErr := imagePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateImageOptions model updateImageOptionsModel := new(vpcclassicv1.UpdateImageOptions) updateImageOptionsModel.ID = core.StringPtr("testString") - updateImageOptionsModel.Name = core.StringPtr("my-image") + updateImageOptionsModel.ImagePatch = imagePatchModelAsPatch updateImageOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -4327,7 +4415,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listOperatingSystemsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listOperatingSystemsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4346,7 +4434,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4377,7 +4465,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listOperatingSystemsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listOperatingSystemsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4396,7 +4484,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4423,7 +4511,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4456,7 +4544,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getOperatingSystemPath)) + Expect(req.URL.EscapedPath()).To(Equal(getOperatingSystemPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4471,7 +4559,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4501,7 +4589,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getOperatingSystemPath)) + Expect(req.URL.EscapedPath()).To(Equal(getOperatingSystemPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4516,7 +4604,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4542,7 +4630,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4577,14 +4665,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -4592,7 +4680,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -4613,7 +4701,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -4629,7 +4717,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -4653,7 +4741,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -4671,12 +4759,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -4696,7 +4784,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listKeysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listKeysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4715,7 +4803,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4746,7 +4834,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listKeysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listKeysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4765,7 +4853,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4792,7 +4880,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4825,7 +4913,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createKeyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4840,7 +4928,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4877,7 +4965,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createKeyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4892,7 +4980,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4925,7 +5013,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -4972,7 +5060,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteKeyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4985,7 +5073,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5009,7 +5097,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5046,7 +5134,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getKeyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5061,7 +5149,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5091,7 +5179,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getKeyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5106,7 +5194,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5132,7 +5220,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5171,7 +5259,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateKeyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5186,15 +5274,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the KeyPatch model + keyPatchModel := new(vpcclassicv1.KeyPatch) + keyPatchModel.Name = core.StringPtr("my-key") + keyPatchModelAsPatch, asPatchErr := keyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateKeyOptions model updateKeyOptionsModel := new(vpcclassicv1.UpdateKeyOptions) updateKeyOptionsModel.ID = core.StringPtr("testString") - updateKeyOptionsModel.Name = core.StringPtr("my-key") + updateKeyOptionsModel.KeyPatch = keyPatchModelAsPatch updateKeyOptionsModel.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 := vpcClassicService.UpdateKey(updateKeyOptionsModel) @@ -5217,7 +5311,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateKeyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5232,7 +5326,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5243,10 +5337,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the KeyPatch model + keyPatchModel := new(vpcclassicv1.KeyPatch) + keyPatchModel.Name = core.StringPtr("my-key") + keyPatchModelAsPatch, asPatchErr := keyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateKeyOptions model updateKeyOptionsModel := new(vpcclassicv1.UpdateKeyOptions) updateKeyOptionsModel.ID = core.StringPtr("testString") - updateKeyOptionsModel.Name = core.StringPtr("my-key") + updateKeyOptionsModel.KeyPatch = keyPatchModelAsPatch updateKeyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -5259,15 +5359,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the KeyPatch model + keyPatchModel := new(vpcclassicv1.KeyPatch) + keyPatchModel.Name = core.StringPtr("my-key") + keyPatchModelAsPatch, asPatchErr := keyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateKeyOptions model updateKeyOptionsModel := new(vpcclassicv1.UpdateKeyOptions) updateKeyOptionsModel.ID = core.StringPtr("testString") - updateKeyOptionsModel.Name = core.StringPtr("my-key") + updateKeyOptionsModel.KeyPatch = keyPatchModelAsPatch updateKeyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -5295,14 +5401,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -5310,7 +5416,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -5331,7 +5437,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -5347,7 +5453,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -5371,7 +5477,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -5389,12 +5495,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -5414,7 +5520,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5433,7 +5539,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5464,7 +5570,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5483,7 +5589,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5510,7 +5616,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5543,7 +5649,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5558,7 +5664,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5588,7 +5694,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5603,7 +5709,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5629,7 +5735,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5668,7 +5774,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstancesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstancesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5693,7 +5799,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5727,7 +5833,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstancesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstancesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5752,7 +5858,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5782,7 +5888,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5818,7 +5924,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstancePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5833,14 +5939,14 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcclassicv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcclassicv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcclassicv1.SecurityGroupIdentityByID) @@ -5859,7 +5965,7 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcclassicv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcclassicv1.VolumeProfileIdentityByName) @@ -5879,8 +5985,8 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -5905,8 +6011,8 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -5953,7 +6059,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstancePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5968,7 +6074,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -5979,9 +6085,9 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcclassicv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcclassicv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcclassicv1.SecurityGroupIdentityByID) @@ -6000,7 +6106,7 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcclassicv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcclassicv1.VolumeProfileIdentityByName) @@ -6020,8 +6126,8 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -6046,8 +6152,8 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -6084,14 +6190,14 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcclassicv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcclassicv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcclassicv1.SecurityGroupIdentityByID) @@ -6110,7 +6216,7 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcclassicv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeProfileIdentityByName model volumeProfileIdentityModel := new(vpcclassicv1.VolumeProfileIdentityByName) @@ -6130,8 +6236,8 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -6156,8 +6262,8 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -6214,7 +6320,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstancePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6227,7 +6333,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6251,7 +6357,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6288,7 +6394,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstancePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6303,7 +6409,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6333,7 +6439,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstancePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6348,7 +6454,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6374,7 +6480,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6413,7 +6519,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstancePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6428,15 +6534,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the InstancePatch model + instancePatchModel := new(vpcclassicv1.InstancePatch) + instancePatchModel.Name = core.StringPtr("my-instance") + instancePatchModelAsPatch, asPatchErr := instancePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceOptions model updateInstanceOptionsModel := new(vpcclassicv1.UpdateInstanceOptions) updateInstanceOptionsModel.ID = core.StringPtr("testString") - updateInstanceOptionsModel.Name = core.StringPtr("my-instance") + updateInstanceOptionsModel.InstancePatch = instancePatchModelAsPatch updateInstanceOptionsModel.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 := vpcClassicService.UpdateInstance(updateInstanceOptionsModel) @@ -6459,7 +6571,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstancePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6474,7 +6586,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6485,10 +6597,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the InstancePatch model + instancePatchModel := new(vpcclassicv1.InstancePatch) + instancePatchModel.Name = core.StringPtr("my-instance") + instancePatchModelAsPatch, asPatchErr := instancePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceOptions model updateInstanceOptionsModel := new(vpcclassicv1.UpdateInstanceOptions) updateInstanceOptionsModel.ID = core.StringPtr("testString") - updateInstanceOptionsModel.Name = core.StringPtr("my-instance") + updateInstanceOptionsModel.InstancePatch = instancePatchModelAsPatch updateInstanceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -6501,15 +6619,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the InstancePatch model + instancePatchModel := new(vpcclassicv1.InstancePatch) + instancePatchModel.Name = core.StringPtr("my-instance") + instancePatchModelAsPatch, asPatchErr := instancePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceOptions model updateInstanceOptionsModel := new(vpcclassicv1.UpdateInstanceOptions) updateInstanceOptionsModel.ID = core.StringPtr("testString") - updateInstanceOptionsModel.Name = core.StringPtr("my-instance") + updateInstanceOptionsModel.InstancePatch = instancePatchModelAsPatch updateInstanceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -6541,7 +6665,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceInitializationPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceInitializationPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6556,7 +6680,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6586,7 +6710,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceInitializationPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceInitializationPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6601,7 +6725,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6627,7 +6751,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6666,7 +6790,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceActionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceActionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6681,7 +6805,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6712,7 +6836,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceActionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceActionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6727,7 +6851,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6754,7 +6878,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6794,7 +6918,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6809,7 +6933,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6839,7 +6963,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6854,7 +6978,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6880,7 +7004,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6919,7 +7043,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6934,7 +7058,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -6965,7 +7089,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6980,7 +7104,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7007,7 +7131,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7047,7 +7171,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7062,7 +7186,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7093,7 +7217,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7108,7 +7232,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7135,7 +7259,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7176,7 +7300,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(removeInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7189,7 +7313,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7215,7 +7339,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7254,7 +7378,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7269,7 +7393,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7301,7 +7425,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7316,7 +7440,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7344,7 +7468,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7385,7 +7509,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7400,7 +7524,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7432,7 +7556,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7447,7 +7571,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7475,7 +7599,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7516,7 +7640,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceVolumeAttachmentsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceVolumeAttachmentsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7531,7 +7655,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7561,7 +7685,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceVolumeAttachmentsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceVolumeAttachmentsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7569,14 +7693,14 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"volume_attachments": [{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}]}`) + fmt.Fprintf(res, "%s", `{"volume_attachments": [{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}]}`) })) }) It(`Invoke ListInstanceVolumeAttachments successfully`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7602,7 +7726,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7641,7 +7765,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7656,7 +7780,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7669,8 +7793,8 @@ var _ = Describe(`VpcClassicV1`, func() { createInstanceVolumeAttachmentOptionsModel := new(vpcclassicv1.CreateInstanceVolumeAttachmentOptions) createInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") createInstanceVolumeAttachmentOptionsModel.Volume = volumeIdentityModel - createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.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 := vpcClassicService.CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentOptionsModel) @@ -7693,7 +7817,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7701,14 +7825,14 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) + fmt.Fprintf(res, "%s", `{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) })) }) It(`Invoke CreateInstanceVolumeAttachment successfully`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7727,8 +7851,8 @@ var _ = Describe(`VpcClassicV1`, func() { createInstanceVolumeAttachmentOptionsModel := new(vpcclassicv1.CreateInstanceVolumeAttachmentOptions) createInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") createInstanceVolumeAttachmentOptionsModel.Volume = volumeIdentityModel - createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -7741,7 +7865,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7754,8 +7878,8 @@ var _ = Describe(`VpcClassicV1`, func() { createInstanceVolumeAttachmentOptionsModel := new(vpcclassicv1.CreateInstanceVolumeAttachmentOptions) createInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") createInstanceVolumeAttachmentOptionsModel.Volume = volumeIdentityModel - createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -7788,7 +7912,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7801,7 +7925,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7826,7 +7950,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7864,7 +7988,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7879,7 +8003,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7910,7 +8034,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7918,14 +8042,14 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) + fmt.Fprintf(res, "%s", `{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) })) }) It(`Invoke GetInstanceVolumeAttachment successfully`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7952,7 +8076,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -7992,7 +8116,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8007,17 +8131,23 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VolumeAttachmentPatch model + volumeAttachmentPatchModel := new(vpcclassicv1.VolumeAttachmentPatch) + volumeAttachmentPatchModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPatchModel.Name = core.StringPtr("my-volume-attachment") + volumeAttachmentPatchModelAsPatch, asPatchErr := volumeAttachmentPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model updateInstanceVolumeAttachmentOptionsModel := new(vpcclassicv1.UpdateInstanceVolumeAttachmentOptions) updateInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceVolumeAttachmentOptionsModel.ID = core.StringPtr("testString") - updateInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch = volumeAttachmentPatchModelAsPatch updateInstanceVolumeAttachmentOptionsModel.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 := vpcClassicService.UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptionsModel) @@ -8040,7 +8170,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8048,14 +8178,14 @@ var _ = Describe(`VpcClassicV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) + fmt.Fprintf(res, "%s", `{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) })) }) It(`Invoke UpdateInstanceVolumeAttachment successfully`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8066,12 +8196,18 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VolumeAttachmentPatch model + volumeAttachmentPatchModel := new(vpcclassicv1.VolumeAttachmentPatch) + volumeAttachmentPatchModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPatchModel.Name = core.StringPtr("my-volume-attachment") + volumeAttachmentPatchModelAsPatch, asPatchErr := volumeAttachmentPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model updateInstanceVolumeAttachmentOptionsModel := new(vpcclassicv1.UpdateInstanceVolumeAttachmentOptions) updateInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceVolumeAttachmentOptionsModel.ID = core.StringPtr("testString") - updateInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch = volumeAttachmentPatchModelAsPatch updateInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -8084,17 +8220,23 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VolumeAttachmentPatch model + volumeAttachmentPatchModel := new(vpcclassicv1.VolumeAttachmentPatch) + volumeAttachmentPatchModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPatchModel.Name = core.StringPtr("my-volume-attachment") + volumeAttachmentPatchModelAsPatch, asPatchErr := volumeAttachmentPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model updateInstanceVolumeAttachmentOptionsModel := new(vpcclassicv1.UpdateInstanceVolumeAttachmentOptions) updateInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceVolumeAttachmentOptionsModel.ID = core.StringPtr("testString") - updateInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch = volumeAttachmentPatchModelAsPatch updateInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -8122,14 +8264,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -8137,7 +8279,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -8158,7 +8300,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -8174,7 +8316,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -8198,7 +8340,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -8216,12 +8358,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -8241,7 +8383,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumeProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumeProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8260,7 +8402,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8291,7 +8433,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumeProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumeProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8310,7 +8452,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8337,7 +8479,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8370,7 +8512,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumeProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumeProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8385,7 +8527,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8415,7 +8557,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumeProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumeProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8430,7 +8572,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8456,7 +8598,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8495,7 +8637,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8518,7 +8660,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8551,7 +8693,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8574,7 +8716,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8603,7 +8745,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8638,7 +8780,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVolumePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8653,7 +8795,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8709,7 +8851,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVolumePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8724,7 +8866,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8776,7 +8918,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8842,7 +8984,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVolumePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8855,7 +8997,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8879,7 +9021,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8916,7 +9058,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8931,7 +9073,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -8961,7 +9103,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8976,7 +9118,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9002,7 +9144,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9041,7 +9183,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVolumePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9056,15 +9198,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VolumePatch model + volumePatchModel := new(vpcclassicv1.VolumePatch) + volumePatchModel.Name = core.StringPtr("my-volume") + volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVolumeOptions model updateVolumeOptionsModel := new(vpcclassicv1.UpdateVolumeOptions) updateVolumeOptionsModel.ID = core.StringPtr("testString") - updateVolumeOptionsModel.Name = core.StringPtr("my-volume") + updateVolumeOptionsModel.VolumePatch = volumePatchModelAsPatch updateVolumeOptionsModel.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 := vpcClassicService.UpdateVolume(updateVolumeOptionsModel) @@ -9087,7 +9235,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVolumePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9102,7 +9250,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9113,10 +9261,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VolumePatch model + volumePatchModel := new(vpcclassicv1.VolumePatch) + volumePatchModel.Name = core.StringPtr("my-volume") + volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVolumeOptions model updateVolumeOptionsModel := new(vpcclassicv1.UpdateVolumeOptions) updateVolumeOptionsModel.ID = core.StringPtr("testString") - updateVolumeOptionsModel.Name = core.StringPtr("my-volume") + updateVolumeOptionsModel.VolumePatch = volumePatchModelAsPatch updateVolumeOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -9129,15 +9283,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VolumePatch model + volumePatchModel := new(vpcclassicv1.VolumePatch) + volumePatchModel.Name = core.StringPtr("my-volume") + volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVolumeOptions model updateVolumeOptionsModel := new(vpcclassicv1.UpdateVolumeOptions) updateVolumeOptionsModel.ID = core.StringPtr("testString") - updateVolumeOptionsModel.Name = core.StringPtr("my-volume") + updateVolumeOptionsModel.VolumePatch = volumePatchModelAsPatch updateVolumeOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -9165,14 +9325,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -9180,7 +9340,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -9201,7 +9361,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -9217,7 +9377,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -9241,7 +9401,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -9259,12 +9419,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -9284,7 +9444,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9299,7 +9459,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9328,7 +9488,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9343,7 +9503,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9368,7 +9528,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9399,7 +9559,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9414,7 +9574,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9444,7 +9604,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9459,7 +9619,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9485,7 +9645,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9524,7 +9684,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionZonesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionZonesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9539,7 +9699,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9569,7 +9729,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionZonesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionZonesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9584,7 +9744,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9610,7 +9770,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9649,7 +9809,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionZonePath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionZonePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9664,7 +9824,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9695,7 +9855,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionZonePath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionZonePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9710,7 +9870,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9737,7 +9897,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9773,14 +9933,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -9788,7 +9948,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -9809,7 +9969,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -9825,7 +9985,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -9849,7 +10009,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -9867,12 +10027,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -9892,7 +10052,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listPublicGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listPublicGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9911,7 +10071,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9942,7 +10102,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listPublicGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listPublicGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9961,7 +10121,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -9988,7 +10148,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10021,7 +10181,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createPublicGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10036,7 +10196,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10081,7 +10241,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createPublicGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10096,7 +10256,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10137,7 +10297,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10192,7 +10352,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deletePublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(deletePublicGatewayPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10205,7 +10365,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10229,7 +10389,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10266,7 +10426,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10281,7 +10441,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10311,7 +10471,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10326,7 +10486,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10352,7 +10512,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10391,7 +10551,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updatePublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updatePublicGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10406,15 +10566,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the PublicGatewayPatch model + publicGatewayPatchModel := new(vpcclassicv1.PublicGatewayPatch) + publicGatewayPatchModel.Name = core.StringPtr("my-public-gateway") + publicGatewayPatchModelAsPatch, asPatchErr := publicGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdatePublicGatewayOptions model updatePublicGatewayOptionsModel := new(vpcclassicv1.UpdatePublicGatewayOptions) updatePublicGatewayOptionsModel.ID = core.StringPtr("testString") - updatePublicGatewayOptionsModel.Name = core.StringPtr("my-public-gateway") + updatePublicGatewayOptionsModel.PublicGatewayPatch = publicGatewayPatchModelAsPatch updatePublicGatewayOptionsModel.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 := vpcClassicService.UpdatePublicGateway(updatePublicGatewayOptionsModel) @@ -10437,7 +10603,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updatePublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updatePublicGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10452,7 +10618,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10463,10 +10629,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the PublicGatewayPatch model + publicGatewayPatchModel := new(vpcclassicv1.PublicGatewayPatch) + publicGatewayPatchModel.Name = core.StringPtr("my-public-gateway") + publicGatewayPatchModelAsPatch, asPatchErr := publicGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdatePublicGatewayOptions model updatePublicGatewayOptionsModel := new(vpcclassicv1.UpdatePublicGatewayOptions) updatePublicGatewayOptionsModel.ID = core.StringPtr("testString") - updatePublicGatewayOptionsModel.Name = core.StringPtr("my-public-gateway") + updatePublicGatewayOptionsModel.PublicGatewayPatch = publicGatewayPatchModelAsPatch updatePublicGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -10479,15 +10651,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the PublicGatewayPatch model + publicGatewayPatchModel := new(vpcclassicv1.PublicGatewayPatch) + publicGatewayPatchModel.Name = core.StringPtr("my-public-gateway") + publicGatewayPatchModelAsPatch, asPatchErr := publicGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdatePublicGatewayOptions model updatePublicGatewayOptionsModel := new(vpcclassicv1.UpdatePublicGatewayOptions) updatePublicGatewayOptionsModel.ID = core.StringPtr("testString") - updatePublicGatewayOptionsModel.Name = core.StringPtr("my-public-gateway") + updatePublicGatewayOptionsModel.PublicGatewayPatch = publicGatewayPatchModelAsPatch updatePublicGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -10515,14 +10693,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -10530,7 +10708,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -10551,7 +10729,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -10567,7 +10745,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -10591,7 +10769,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -10609,12 +10787,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -10634,7 +10812,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10653,7 +10831,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10684,7 +10862,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10703,7 +10881,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10730,7 +10908,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10763,7 +10941,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(createFloatingIPPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10778,7 +10956,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10817,7 +10995,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(createFloatingIPPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10832,7 +11010,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10867,7 +11045,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10916,7 +11094,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteFloatingIPPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10929,7 +11107,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10953,7 +11131,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -10990,7 +11168,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11005,7 +11183,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11035,7 +11213,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11050,7 +11228,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11076,7 +11254,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11115,7 +11293,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateFloatingIPPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11130,20 +11308,26 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + + // Construct an instance of the FloatingIPPatch model + floatingIPPatchModel := new(vpcclassicv1.FloatingIPPatch) + floatingIPPatchModel.Name = core.StringPtr("my-floating-ip") + floatingIPPatchModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel + floatingIPPatchModelAsPatch, asPatchErr := floatingIPPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // 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 = floatingIPPatchTargetNetworkInterfaceIdentityModel + updateFloatingIPOptionsModel.FloatingIPPatch = floatingIPPatchModelAsPatch 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 := vpcClassicService.UpdateFloatingIP(updateFloatingIPOptionsModel) @@ -11166,7 +11350,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateFloatingIPPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11181,7 +11365,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11194,13 +11378,19 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + + // Construct an instance of the FloatingIPPatch model + floatingIPPatchModel := new(vpcclassicv1.FloatingIPPatch) + floatingIPPatchModel.Name = core.StringPtr("my-floating-ip") + floatingIPPatchModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel + floatingIPPatchModelAsPatch, asPatchErr := floatingIPPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // 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 = floatingIPPatchTargetNetworkInterfaceIdentityModel + updateFloatingIPOptionsModel.FloatingIPPatch = floatingIPPatchModelAsPatch updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -11213,20 +11403,26 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + + // Construct an instance of the FloatingIPPatch model + floatingIPPatchModel := new(vpcclassicv1.FloatingIPPatch) + floatingIPPatchModel.Name = core.StringPtr("my-floating-ip") + floatingIPPatchModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel + floatingIPPatchModelAsPatch, asPatchErr := floatingIPPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // 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 = floatingIPPatchTargetNetworkInterfaceIdentityModel + updateFloatingIPOptionsModel.FloatingIPPatch = floatingIPPatchModelAsPatch updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -11254,14 +11450,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -11269,7 +11465,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -11290,7 +11486,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -11306,7 +11502,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -11330,7 +11526,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -11348,12 +11544,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -11373,7 +11569,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkAclsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkAclsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11392,7 +11588,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11423,7 +11619,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkAclsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkAclsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11442,7 +11638,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11469,7 +11665,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11502,7 +11698,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11517,7 +11713,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11561,7 +11757,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11576,7 +11772,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11616,7 +11812,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11663,7 +11859,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteNetworkACLPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11676,7 +11872,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11700,7 +11896,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11737,7 +11933,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11752,7 +11948,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11782,7 +11978,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11797,7 +11993,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11823,7 +12019,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11862,7 +12058,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11877,15 +12073,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the NetworkACLPatch model + networkACLPatchModel := new(vpcclassicv1.NetworkACLPatch) + networkACLPatchModel.Name = core.StringPtr("my-network-acl") + networkACLPatchModelAsPatch, asPatchErr := networkACLPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLOptions model updateNetworkACLOptionsModel := new(vpcclassicv1.UpdateNetworkACLOptions) updateNetworkACLOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLOptionsModel.Name = core.StringPtr("my-network-acl") + updateNetworkACLOptionsModel.NetworkACLPatch = networkACLPatchModelAsPatch updateNetworkACLOptionsModel.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 := vpcClassicService.UpdateNetworkACL(updateNetworkACLOptionsModel) @@ -11908,7 +12110,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11923,7 +12125,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -11934,10 +12136,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the NetworkACLPatch model + networkACLPatchModel := new(vpcclassicv1.NetworkACLPatch) + networkACLPatchModel.Name = core.StringPtr("my-network-acl") + networkACLPatchModelAsPatch, asPatchErr := networkACLPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLOptions model updateNetworkACLOptionsModel := new(vpcclassicv1.UpdateNetworkACLOptions) updateNetworkACLOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLOptionsModel.Name = core.StringPtr("my-network-acl") + updateNetworkACLOptionsModel.NetworkACLPatch = networkACLPatchModelAsPatch updateNetworkACLOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -11950,15 +12158,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the NetworkACLPatch model + networkACLPatchModel := new(vpcclassicv1.NetworkACLPatch) + networkACLPatchModel.Name = core.StringPtr("my-network-acl") + networkACLPatchModelAsPatch, asPatchErr := networkACLPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLOptions model updateNetworkACLOptionsModel := new(vpcclassicv1.UpdateNetworkACLOptions) updateNetworkACLOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLOptionsModel.Name = core.StringPtr("my-network-acl") + updateNetworkACLOptionsModel.NetworkACLPatch = networkACLPatchModelAsPatch updateNetworkACLOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -11990,7 +12204,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkACLRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkACLRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12011,7 +12225,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12044,7 +12258,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkACLRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkACLRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12065,7 +12279,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12094,7 +12308,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12136,7 +12350,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12151,7 +12365,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12196,7 +12410,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12211,7 +12425,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12252,7 +12466,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12307,7 +12521,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteNetworkACLRulePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12320,7 +12534,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12345,7 +12559,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12383,7 +12597,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12398,7 +12612,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12429,7 +12643,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12444,7 +12658,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12471,7 +12685,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12511,7 +12725,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12526,7 +12740,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12536,7 +12750,7 @@ var _ = Describe(`VpcClassicV1`, func() { networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model - networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) + networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatch) networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Action = core.StringPtr("allow") networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") @@ -12546,12 +12760,14 @@ var _ = Describe(`VpcClassicV1`, func() { networkACLRulePatchModel.Before = networkACLRuleIdentityModel networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) + networkACLRulePatchModelAsPatch, asPatchErr := networkACLRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcclassicv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModel + updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModelAsPatch updateNetworkACLRuleOptionsModel.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 := vpcClassicService.UpdateNetworkACLRule(updateNetworkACLRuleOptionsModel) @@ -12574,7 +12790,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12589,7 +12805,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12605,7 +12821,7 @@ var _ = Describe(`VpcClassicV1`, func() { networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model - networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) + networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatch) networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Action = core.StringPtr("allow") networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") @@ -12615,12 +12831,14 @@ var _ = Describe(`VpcClassicV1`, func() { networkACLRulePatchModel.Before = networkACLRuleIdentityModel networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) + networkACLRulePatchModelAsPatch, asPatchErr := networkACLRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcclassicv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModel + updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModelAsPatch updateNetworkACLRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -12633,7 +12851,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12643,7 +12861,7 @@ var _ = Describe(`VpcClassicV1`, func() { networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") // Construct an instance of the NetworkACLRulePatchNetworkACLRuleProtocolIcmp model - networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatchNetworkACLRuleProtocolIcmp) + networkACLRulePatchModel := new(vpcclassicv1.NetworkACLRulePatch) networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") networkACLRulePatchModel.Action = core.StringPtr("allow") networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") @@ -12653,12 +12871,14 @@ var _ = Describe(`VpcClassicV1`, func() { networkACLRulePatchModel.Before = networkACLRuleIdentityModel networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) + networkACLRulePatchModelAsPatch, asPatchErr := networkACLRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcclassicv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModel + updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModelAsPatch updateNetworkACLRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -12686,14 +12906,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -12701,7 +12921,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -12722,7 +12942,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -12738,7 +12958,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -12762,7 +12982,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -12780,12 +13000,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -12805,7 +13025,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12826,7 +13046,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12858,7 +13078,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12879,7 +13099,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12907,7 +13127,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -12941,7 +13161,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12956,7 +13176,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13010,7 +13230,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13025,7 +13245,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13075,7 +13295,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13139,7 +13359,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteSecurityGroupPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13152,7 +13372,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13176,7 +13396,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13213,7 +13433,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13228,7 +13448,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13258,7 +13478,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13273,7 +13493,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13299,7 +13519,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13338,7 +13558,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13353,15 +13573,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the SecurityGroupPatch model + securityGroupPatchModel := new(vpcclassicv1.SecurityGroupPatch) + securityGroupPatchModel.Name = core.StringPtr("my-security-group") + securityGroupPatchModelAsPatch, asPatchErr := securityGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupOptions model updateSecurityGroupOptionsModel := new(vpcclassicv1.UpdateSecurityGroupOptions) updateSecurityGroupOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupOptionsModel.Name = core.StringPtr("my-security-group") + updateSecurityGroupOptionsModel.SecurityGroupPatch = securityGroupPatchModelAsPatch updateSecurityGroupOptionsModel.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 := vpcClassicService.UpdateSecurityGroup(updateSecurityGroupOptionsModel) @@ -13384,7 +13610,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13399,7 +13625,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13410,10 +13636,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the SecurityGroupPatch model + securityGroupPatchModel := new(vpcclassicv1.SecurityGroupPatch) + securityGroupPatchModel.Name = core.StringPtr("my-security-group") + securityGroupPatchModelAsPatch, asPatchErr := securityGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupOptions model updateSecurityGroupOptionsModel := new(vpcclassicv1.UpdateSecurityGroupOptions) updateSecurityGroupOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupOptionsModel.Name = core.StringPtr("my-security-group") + updateSecurityGroupOptionsModel.SecurityGroupPatch = securityGroupPatchModelAsPatch updateSecurityGroupOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -13426,15 +13658,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the SecurityGroupPatch model + securityGroupPatchModel := new(vpcclassicv1.SecurityGroupPatch) + securityGroupPatchModel.Name = core.StringPtr("my-security-group") + securityGroupPatchModelAsPatch, asPatchErr := securityGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupOptions model updateSecurityGroupOptionsModel := new(vpcclassicv1.UpdateSecurityGroupOptions) updateSecurityGroupOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupOptionsModel.Name = core.StringPtr("my-security-group") + updateSecurityGroupOptionsModel.SecurityGroupPatch = securityGroupPatchModelAsPatch updateSecurityGroupOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -13466,7 +13704,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13481,7 +13719,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13511,7 +13749,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13526,7 +13764,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13552,7 +13790,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13592,7 +13830,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(removeSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13605,7 +13843,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13630,7 +13868,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13668,7 +13906,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13683,7 +13921,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13714,7 +13952,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13729,7 +13967,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13756,7 +13994,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13796,7 +14034,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(addSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13811,7 +14049,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13842,7 +14080,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(addSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13857,7 +14095,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13884,7 +14122,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13924,7 +14162,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13939,7 +14177,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -13969,7 +14207,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13984,7 +14222,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14010,7 +14248,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14049,7 +14287,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14064,7 +14302,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14108,7 +14346,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14123,7 +14361,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14163,7 +14401,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14217,7 +14455,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteSecurityGroupRulePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14230,7 +14468,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14255,7 +14493,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14293,7 +14531,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14308,7 +14546,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14339,7 +14577,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14354,7 +14592,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14381,7 +14619,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14421,7 +14659,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14436,7 +14674,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14446,19 +14684,21 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model - securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) + securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatch) securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) + securityGroupRulePatchModelAsPatch, asPatchErr := securityGroupRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // Construct an instance of the UpdateSecurityGroupRuleOptions model updateSecurityGroupRuleOptionsModel := new(vpcclassicv1.UpdateSecurityGroupRuleOptions) updateSecurityGroupRuleOptionsModel.SecurityGroupID = core.StringPtr("testString") updateSecurityGroupRuleOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModel + updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModelAsPatch updateSecurityGroupRuleOptionsModel.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 := vpcClassicService.UpdateSecurityGroupRule(updateSecurityGroupRuleOptionsModel) @@ -14481,7 +14721,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14496,7 +14736,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14512,19 +14752,21 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model - securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) + securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatch) securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) + securityGroupRulePatchModelAsPatch, asPatchErr := securityGroupRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // Construct an instance of the UpdateSecurityGroupRuleOptions model updateSecurityGroupRuleOptionsModel := new(vpcclassicv1.UpdateSecurityGroupRuleOptions) updateSecurityGroupRuleOptionsModel.SecurityGroupID = core.StringPtr("testString") updateSecurityGroupRuleOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModel + updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModelAsPatch updateSecurityGroupRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -14537,7 +14779,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14547,19 +14789,21 @@ var _ = Describe(`VpcClassicV1`, func() { securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") // Construct an instance of the SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp model - securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatchSecurityGroupRuleProtocolIcmp) + securityGroupRulePatchModel := new(vpcclassicv1.SecurityGroupRulePatch) securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel securityGroupRulePatchModel.Direction = core.StringPtr("inbound") securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) + securityGroupRulePatchModelAsPatch, asPatchErr := securityGroupRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // Construct an instance of the UpdateSecurityGroupRuleOptions model updateSecurityGroupRuleOptionsModel := new(vpcclassicv1.UpdateSecurityGroupRuleOptions) updateSecurityGroupRuleOptionsModel.SecurityGroupID = core.StringPtr("testString") updateSecurityGroupRuleOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModel + updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModelAsPatch updateSecurityGroupRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -14587,14 +14831,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -14602,7 +14846,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -14623,7 +14867,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -14639,7 +14883,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -14663,7 +14907,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -14681,12 +14925,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -14706,7 +14950,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14725,7 +14969,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14756,7 +15000,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14775,7 +15019,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14802,7 +15046,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14835,7 +15079,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIkePolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14850,7 +15094,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14890,7 +15134,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIkePolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14905,7 +15149,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14941,7 +15185,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -14991,7 +15235,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteIkePolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15004,7 +15248,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15028,7 +15272,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15065,7 +15309,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIkePolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15080,7 +15324,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15110,7 +15354,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIkePolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15125,7 +15369,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15151,7 +15395,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15190,7 +15434,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIkePolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15205,7 +15449,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15213,12 +15457,7 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the UpdateIkePolicyOptions model updateIkePolicyOptionsModel := new(vpcclassicv1.UpdateIkePolicyOptions) updateIkePolicyOptionsModel.ID = core.StringPtr("testString") - updateIkePolicyOptionsModel.Name = core.StringPtr("my-ike-policy") - updateIkePolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIkePolicyOptionsModel.DhGroup = core.Int64Ptr(int64(2)) - updateIkePolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIkePolicyOptionsModel.IkeVersion = core.Int64Ptr(int64(1)) - updateIkePolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(28800)) + updateIkePolicyOptionsModel.IkePolicyPatch = make(map[string]interface{}) updateIkePolicyOptionsModel.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 := vpcClassicService.UpdateIkePolicy(updateIkePolicyOptionsModel) @@ -15241,7 +15480,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIkePolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15256,7 +15495,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15270,12 +15509,7 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the UpdateIkePolicyOptions model updateIkePolicyOptionsModel := new(vpcclassicv1.UpdateIkePolicyOptions) updateIkePolicyOptionsModel.ID = core.StringPtr("testString") - updateIkePolicyOptionsModel.Name = core.StringPtr("my-ike-policy") - updateIkePolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIkePolicyOptionsModel.DhGroup = core.Int64Ptr(int64(2)) - updateIkePolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIkePolicyOptionsModel.IkeVersion = core.Int64Ptr(int64(1)) - updateIkePolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(28800)) + updateIkePolicyOptionsModel.IkePolicyPatch = make(map[string]interface{}) updateIkePolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -15288,7 +15522,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15296,12 +15530,7 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the UpdateIkePolicyOptions model updateIkePolicyOptionsModel := new(vpcclassicv1.UpdateIkePolicyOptions) updateIkePolicyOptionsModel.ID = core.StringPtr("testString") - updateIkePolicyOptionsModel.Name = core.StringPtr("my-ike-policy") - updateIkePolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIkePolicyOptionsModel.DhGroup = core.Int64Ptr(int64(2)) - updateIkePolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIkePolicyOptionsModel.IkeVersion = core.Int64Ptr(int64(1)) - updateIkePolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(28800)) + updateIkePolicyOptionsModel.IkePolicyPatch = make(map[string]interface{}) updateIkePolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -15333,7 +15562,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15348,7 +15577,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15378,7 +15607,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15393,7 +15622,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15419,7 +15648,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15458,7 +15687,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15477,7 +15706,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15508,7 +15737,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15527,7 +15756,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15554,7 +15783,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15587,7 +15816,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIpsecPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15602,7 +15831,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15641,7 +15870,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIpsecPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15656,7 +15885,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15691,7 +15920,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15740,7 +15969,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteIpsecPolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15753,7 +15982,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15777,7 +16006,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15814,7 +16043,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIpsecPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15829,7 +16058,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15859,7 +16088,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIpsecPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15874,7 +16103,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15900,7 +16129,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -15939,7 +16168,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIpsecPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15954,19 +16183,25 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the IPsecPolicyPatch model + iPsecPolicyPatchModel := new(vpcclassicv1.IPsecPolicyPatch) + iPsecPolicyPatchModel.Name = core.StringPtr("my-ipsec-policy") + iPsecPolicyPatchModel.AuthenticationAlgorithm = core.StringPtr("md5") + iPsecPolicyPatchModel.EncryptionAlgorithm = core.StringPtr("triple_des") + iPsecPolicyPatchModel.KeyLifetime = core.Int64Ptr(int64(3600)) + iPsecPolicyPatchModel.Pfs = core.StringPtr("disabled") + iPsecPolicyPatchModelAsPatch, asPatchErr := iPsecPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateIpsecPolicyOptions model updateIpsecPolicyOptionsModel := new(vpcclassicv1.UpdateIpsecPolicyOptions) updateIpsecPolicyOptionsModel.ID = core.StringPtr("testString") - updateIpsecPolicyOptionsModel.Name = core.StringPtr("my-ipsec-policy") - updateIpsecPolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIpsecPolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIpsecPolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(3600)) - updateIpsecPolicyOptionsModel.Pfs = core.StringPtr("disabled") + updateIpsecPolicyOptionsModel.IPsecPolicyPatch = iPsecPolicyPatchModelAsPatch updateIpsecPolicyOptionsModel.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 := vpcClassicService.UpdateIpsecPolicy(updateIpsecPolicyOptionsModel) @@ -15989,7 +16224,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIpsecPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16004,7 +16239,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16015,14 +16250,20 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the IPsecPolicyPatch model + iPsecPolicyPatchModel := new(vpcclassicv1.IPsecPolicyPatch) + iPsecPolicyPatchModel.Name = core.StringPtr("my-ipsec-policy") + iPsecPolicyPatchModel.AuthenticationAlgorithm = core.StringPtr("md5") + iPsecPolicyPatchModel.EncryptionAlgorithm = core.StringPtr("triple_des") + iPsecPolicyPatchModel.KeyLifetime = core.Int64Ptr(int64(3600)) + iPsecPolicyPatchModel.Pfs = core.StringPtr("disabled") + iPsecPolicyPatchModelAsPatch, asPatchErr := iPsecPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateIpsecPolicyOptions model updateIpsecPolicyOptionsModel := new(vpcclassicv1.UpdateIpsecPolicyOptions) updateIpsecPolicyOptionsModel.ID = core.StringPtr("testString") - updateIpsecPolicyOptionsModel.Name = core.StringPtr("my-ipsec-policy") - updateIpsecPolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIpsecPolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIpsecPolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(3600)) - updateIpsecPolicyOptionsModel.Pfs = core.StringPtr("disabled") + updateIpsecPolicyOptionsModel.IPsecPolicyPatch = iPsecPolicyPatchModelAsPatch updateIpsecPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -16035,19 +16276,25 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the IPsecPolicyPatch model + iPsecPolicyPatchModel := new(vpcclassicv1.IPsecPolicyPatch) + iPsecPolicyPatchModel.Name = core.StringPtr("my-ipsec-policy") + iPsecPolicyPatchModel.AuthenticationAlgorithm = core.StringPtr("md5") + iPsecPolicyPatchModel.EncryptionAlgorithm = core.StringPtr("triple_des") + iPsecPolicyPatchModel.KeyLifetime = core.Int64Ptr(int64(3600)) + iPsecPolicyPatchModel.Pfs = core.StringPtr("disabled") + iPsecPolicyPatchModelAsPatch, asPatchErr := iPsecPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateIpsecPolicyOptions model updateIpsecPolicyOptionsModel := new(vpcclassicv1.UpdateIpsecPolicyOptions) updateIpsecPolicyOptionsModel.ID = core.StringPtr("testString") - updateIpsecPolicyOptionsModel.Name = core.StringPtr("my-ipsec-policy") - updateIpsecPolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIpsecPolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIpsecPolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(3600)) - updateIpsecPolicyOptionsModel.Pfs = core.StringPtr("disabled") + updateIpsecPolicyOptionsModel.IPsecPolicyPatch = iPsecPolicyPatchModelAsPatch updateIpsecPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -16079,7 +16326,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16094,7 +16341,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16124,7 +16371,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16139,7 +16386,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16165,7 +16412,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16204,7 +16451,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16225,7 +16472,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16257,7 +16504,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16278,7 +16525,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16306,7 +16553,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16340,7 +16587,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16355,7 +16602,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16395,7 +16642,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16410,7 +16657,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16446,7 +16693,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16496,7 +16743,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPNGatewayPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16509,7 +16756,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16533,7 +16780,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16570,7 +16817,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16585,7 +16832,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16615,7 +16862,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16630,7 +16877,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16656,7 +16903,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16695,7 +16942,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16710,15 +16957,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VPNGatewayPatch model + vpnGatewayPatchModel := new(vpcclassicv1.VPNGatewayPatch) + vpnGatewayPatchModel.Name = core.StringPtr("my-vpn-gateway") + vpnGatewayPatchModelAsPatch, asPatchErr := vpnGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayOptions model updateVPNGatewayOptionsModel := new(vpcclassicv1.UpdateVPNGatewayOptions) updateVPNGatewayOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayOptionsModel.Name = core.StringPtr("my-vpn-gateway") + updateVPNGatewayOptionsModel.VPNGatewayPatch = vpnGatewayPatchModelAsPatch updateVPNGatewayOptionsModel.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 := vpcClassicService.UpdateVPNGateway(updateVPNGatewayOptionsModel) @@ -16741,7 +16994,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16756,7 +17009,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16767,10 +17020,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VPNGatewayPatch model + vpnGatewayPatchModel := new(vpcclassicv1.VPNGatewayPatch) + vpnGatewayPatchModel.Name = core.StringPtr("my-vpn-gateway") + vpnGatewayPatchModelAsPatch, asPatchErr := vpnGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayOptions model updateVPNGatewayOptionsModel := new(vpcclassicv1.UpdateVPNGatewayOptions) updateVPNGatewayOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayOptionsModel.Name = core.StringPtr("my-vpn-gateway") + updateVPNGatewayOptionsModel.VPNGatewayPatch = vpnGatewayPatchModelAsPatch updateVPNGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -16783,15 +17042,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the VPNGatewayPatch model + vpnGatewayPatchModel := new(vpcclassicv1.VPNGatewayPatch) + vpnGatewayPatchModel.Name = core.StringPtr("my-vpn-gateway") + vpnGatewayPatchModelAsPatch, asPatchErr := vpnGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayOptions model updateVPNGatewayOptionsModel := new(vpcclassicv1.UpdateVPNGatewayOptions) updateVPNGatewayOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayOptionsModel.Name = core.StringPtr("my-vpn-gateway") + updateVPNGatewayOptionsModel.VPNGatewayPatch = vpnGatewayPatchModelAsPatch updateVPNGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -16823,7 +17088,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16840,7 +17105,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16871,7 +17136,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16888,7 +17153,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16915,7 +17180,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -16955,7 +17220,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16970,7 +17235,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17023,7 +17288,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17038,7 +17303,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17087,7 +17352,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17150,7 +17415,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17163,7 +17428,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17188,7 +17453,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17226,7 +17491,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17241,7 +17506,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17272,7 +17537,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17287,7 +17552,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17314,7 +17579,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17354,7 +17619,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17369,7 +17634,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17388,17 +17653,23 @@ var _ = Describe(`VpcClassicV1`, func() { iPsecPolicyIdentityModel := new(vpcclassicv1.IPsecPolicyIdentityByID) iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPatch model + vpnGatewayConnectionPatchModel := new(vpcclassicv1.VPNGatewayConnectionPatch) + vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) + vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") + vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPatchModel.IkePolicy = ikePolicyIdentityModel + vpnGatewayConnectionPatchModel.IpsecPolicy = iPsecPolicyIdentityModel + vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayConnectionOptions model updateVPNGatewayConnectionOptionsModel := new(vpcclassicv1.UpdateVPNGatewayConnectionOptions) updateVPNGatewayConnectionOptionsModel.VPNGatewayID = core.StringPtr("testString") updateVPNGatewayConnectionOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayConnectionOptionsModel.AdminStateUp = core.BoolPtr(true) - updateVPNGatewayConnectionOptionsModel.PeerAddress = core.StringPtr("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel - updateVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel - updateVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel + updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch = vpnGatewayConnectionPatchModelAsPatch updateVPNGatewayConnectionOptionsModel.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 := vpcClassicService.UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptionsModel) @@ -17421,7 +17692,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17436,7 +17707,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17461,17 +17732,23 @@ var _ = Describe(`VpcClassicV1`, func() { iPsecPolicyIdentityModel := new(vpcclassicv1.IPsecPolicyIdentityByID) iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPatch model + vpnGatewayConnectionPatchModel := new(vpcclassicv1.VPNGatewayConnectionPatch) + vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) + vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") + vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPatchModel.IkePolicy = ikePolicyIdentityModel + vpnGatewayConnectionPatchModel.IpsecPolicy = iPsecPolicyIdentityModel + vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayConnectionOptions model updateVPNGatewayConnectionOptionsModel := new(vpcclassicv1.UpdateVPNGatewayConnectionOptions) updateVPNGatewayConnectionOptionsModel.VPNGatewayID = core.StringPtr("testString") updateVPNGatewayConnectionOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayConnectionOptionsModel.AdminStateUp = core.BoolPtr(true) - updateVPNGatewayConnectionOptionsModel.PeerAddress = core.StringPtr("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel - updateVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel - updateVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel + updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch = vpnGatewayConnectionPatchModelAsPatch updateVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -17484,7 +17761,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17503,17 +17780,23 @@ var _ = Describe(`VpcClassicV1`, func() { iPsecPolicyIdentityModel := new(vpcclassicv1.IPsecPolicyIdentityByID) iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPatch model + vpnGatewayConnectionPatchModel := new(vpcclassicv1.VPNGatewayConnectionPatch) + vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) + vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") + vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPatchModel.IkePolicy = ikePolicyIdentityModel + vpnGatewayConnectionPatchModel.IpsecPolicy = iPsecPolicyIdentityModel + vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayConnectionOptions model updateVPNGatewayConnectionOptionsModel := new(vpcclassicv1.UpdateVPNGatewayConnectionOptions) updateVPNGatewayConnectionOptionsModel.VPNGatewayID = core.StringPtr("testString") updateVPNGatewayConnectionOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayConnectionOptionsModel.AdminStateUp = core.BoolPtr(true) - updateVPNGatewayConnectionOptionsModel.PeerAddress = core.StringPtr("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel - updateVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel - updateVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel + updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch = vpnGatewayConnectionPatchModelAsPatch updateVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -17545,7 +17828,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17560,7 +17843,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17591,7 +17874,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17606,7 +17889,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17633,7 +17916,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17674,7 +17957,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(removeVPNGatewayConnectionLocalCIDRPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17687,7 +17970,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17714,7 +17997,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17755,7 +18038,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(checkVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(checkVPNGatewayConnectionLocalCIDRPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17768,7 +18051,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17795,7 +18078,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17836,7 +18119,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(addVPNGatewayConnectionLocalCIDRPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17849,7 +18132,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17876,7 +18159,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17916,7 +18199,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17931,7 +18214,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -17962,7 +18245,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17977,7 +18260,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18004,7 +18287,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18045,7 +18328,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(removeVPNGatewayConnectionPeerCIDRPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18058,7 +18341,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18085,7 +18368,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18126,7 +18409,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(checkVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(checkVPNGatewayConnectionPeerCIDRPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18139,7 +18422,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18166,7 +18449,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18207,7 +18490,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(addVPNGatewayConnectionPeerCIDRPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18220,7 +18503,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18247,7 +18530,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18283,14 +18566,14 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Instantiate service client`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) Expect(serviceErr).To(BeNil()) }) It(`Instantiate service client with error: Invalid URL`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) Expect(vpcClassicService).To(BeNil()) @@ -18298,7 +18581,7 @@ var _ = Describe(`VpcClassicV1`, func() { }) It(`Instantiate service client with error: Invalid Auth`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://vpcclassicv1/api", + URL: "https://vpcclassicv1/api", Version: core.StringPtr(version), Authenticator: &core.BasicAuthenticator{ Username: "", @@ -18319,7 +18602,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "noauth", } @@ -18335,7 +18618,7 @@ var _ = Describe(`VpcClassicV1`, func() { It(`Create service client using external config and set url from constructor successfully`, func() { SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "https://testService/api", + URL: "https://testService/api", Version: core.StringPtr(version), }) Expect(vpcClassicService).ToNot(BeNil()) @@ -18359,7 +18642,7 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid Auth`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_URL": "https://vpcclassicv1/api", + "VPC_CLASSIC_URL": "https://vpcclassicv1/api", "VPC_CLASSIC_AUTH_TYPE": "someOtherAuth", } @@ -18377,12 +18660,12 @@ var _ = Describe(`VpcClassicV1`, func() { Context(`Using external config, construct service client instances with error: Invalid URL`, func() { // Map containing environment variables used in testing. var testEnvironment = map[string]string{ - "VPC_CLASSIC_AUTH_TYPE": "NOAuth", + "VPC_CLASSIC_AUTH_TYPE": "NOAuth", } SetTestEnvironment(testEnvironment) vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1UsingExternalConfig(&vpcclassicv1.VpcClassicV1Options{ - URL: "{BAD_URL_STRING", + URL: "{BAD_URL_STRING", Version: core.StringPtr(version), }) @@ -18402,7 +18685,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18417,7 +18700,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18446,7 +18729,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18461,7 +18744,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18486,7 +18769,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18517,7 +18800,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18532,7 +18815,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18618,7 +18901,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18633,7 +18916,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18715,7 +18998,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18811,7 +19094,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18824,7 +19107,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18848,7 +19131,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18885,7 +19168,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18900,7 +19183,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18930,7 +19213,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18945,7 +19228,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -18971,7 +19254,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19010,7 +19293,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19025,15 +19308,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerPatch model + loadBalancerPatchModel := new(vpcclassicv1.LoadBalancerPatch) + loadBalancerPatchModel.Name = core.StringPtr("my-load-balancer") + loadBalancerPatchModelAsPatch, asPatchErr := loadBalancerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerOptions model updateLoadBalancerOptionsModel := new(vpcclassicv1.UpdateLoadBalancerOptions) updateLoadBalancerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerOptionsModel.Name = core.StringPtr("my-load-balancer") + updateLoadBalancerOptionsModel.LoadBalancerPatch = loadBalancerPatchModelAsPatch updateLoadBalancerOptionsModel.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 := vpcClassicService.UpdateLoadBalancer(updateLoadBalancerOptionsModel) @@ -19056,7 +19345,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19071,7 +19360,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19082,10 +19371,16 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the LoadBalancerPatch model + loadBalancerPatchModel := new(vpcclassicv1.LoadBalancerPatch) + loadBalancerPatchModel.Name = core.StringPtr("my-load-balancer") + loadBalancerPatchModelAsPatch, asPatchErr := loadBalancerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerOptions model updateLoadBalancerOptionsModel := new(vpcclassicv1.UpdateLoadBalancerOptions) updateLoadBalancerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerOptionsModel.Name = core.StringPtr("my-load-balancer") + updateLoadBalancerOptionsModel.LoadBalancerPatch = loadBalancerPatchModelAsPatch updateLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -19098,15 +19393,21 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerPatch model + loadBalancerPatchModel := new(vpcclassicv1.LoadBalancerPatch) + loadBalancerPatchModel.Name = core.StringPtr("my-load-balancer") + loadBalancerPatchModelAsPatch, asPatchErr := loadBalancerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerOptions model updateLoadBalancerOptionsModel := new(vpcclassicv1.UpdateLoadBalancerOptions) updateLoadBalancerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerOptionsModel.Name = core.StringPtr("my-load-balancer") + updateLoadBalancerOptionsModel.LoadBalancerPatch = loadBalancerPatchModelAsPatch updateLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -19138,7 +19439,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerStatisticsPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerStatisticsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19153,7 +19454,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19183,7 +19484,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerStatisticsPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerStatisticsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19198,7 +19499,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19224,7 +19525,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19263,7 +19564,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19278,7 +19579,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19308,7 +19609,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19323,7 +19624,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19349,7 +19650,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19388,7 +19689,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19403,7 +19704,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19466,7 +19767,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19481,7 +19782,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19540,7 +19841,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19613,7 +19914,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerListenerPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19626,7 +19927,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19651,7 +19952,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19689,7 +19990,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19704,7 +20005,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19735,7 +20036,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19750,7 +20051,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19777,7 +20078,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19817,7 +20118,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19832,7 +20133,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19845,15 +20146,21 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolIdentityModel := new(vpcclassicv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPatch model + loadBalancerListenerPatchModel := new(vpcclassicv1.LoadBalancerListenerPatch) + loadBalancerListenerPatchModel.ConnectionLimit = core.Int64Ptr(int64(2000)) + loadBalancerListenerPatchModel.Port = core.Int64Ptr(int64(443)) + loadBalancerListenerPatchModel.Protocol = core.StringPtr("http") + loadBalancerListenerPatchModel.CertificateInstance = certificateInstanceIdentityModel + loadBalancerListenerPatchModel.DefaultPool = loadBalancerPoolIdentityModel + loadBalancerListenerPatchModelAsPatch, asPatchErr := loadBalancerListenerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerOptions model updateLoadBalancerListenerOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerOptions) updateLoadBalancerListenerOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerOptionsModel.ConnectionLimit = core.Int64Ptr(int64(2000)) - updateLoadBalancerListenerOptionsModel.Port = core.Int64Ptr(int64(443)) - updateLoadBalancerListenerOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerListenerOptionsModel.CertificateInstance = certificateInstanceIdentityModel - updateLoadBalancerListenerOptionsModel.DefaultPool = loadBalancerPoolIdentityModel + updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch = loadBalancerListenerPatchModelAsPatch updateLoadBalancerListenerOptionsModel.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 := vpcClassicService.UpdateLoadBalancerListener(updateLoadBalancerListenerOptionsModel) @@ -19876,7 +20183,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19891,7 +20198,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19910,15 +20217,21 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolIdentityModel := new(vpcclassicv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPatch model + loadBalancerListenerPatchModel := new(vpcclassicv1.LoadBalancerListenerPatch) + loadBalancerListenerPatchModel.ConnectionLimit = core.Int64Ptr(int64(2000)) + loadBalancerListenerPatchModel.Port = core.Int64Ptr(int64(443)) + loadBalancerListenerPatchModel.Protocol = core.StringPtr("http") + loadBalancerListenerPatchModel.CertificateInstance = certificateInstanceIdentityModel + loadBalancerListenerPatchModel.DefaultPool = loadBalancerPoolIdentityModel + loadBalancerListenerPatchModelAsPatch, asPatchErr := loadBalancerListenerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerOptions model updateLoadBalancerListenerOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerOptions) updateLoadBalancerListenerOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerOptionsModel.ConnectionLimit = core.Int64Ptr(int64(2000)) - updateLoadBalancerListenerOptionsModel.Port = core.Int64Ptr(int64(443)) - updateLoadBalancerListenerOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerListenerOptionsModel.CertificateInstance = certificateInstanceIdentityModel - updateLoadBalancerListenerOptionsModel.DefaultPool = loadBalancerPoolIdentityModel + updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch = loadBalancerListenerPatchModelAsPatch updateLoadBalancerListenerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -19931,7 +20244,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -19944,15 +20257,21 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolIdentityModel := new(vpcclassicv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPatch model + loadBalancerListenerPatchModel := new(vpcclassicv1.LoadBalancerListenerPatch) + loadBalancerListenerPatchModel.ConnectionLimit = core.Int64Ptr(int64(2000)) + loadBalancerListenerPatchModel.Port = core.Int64Ptr(int64(443)) + loadBalancerListenerPatchModel.Protocol = core.StringPtr("http") + loadBalancerListenerPatchModel.CertificateInstance = certificateInstanceIdentityModel + loadBalancerListenerPatchModel.DefaultPool = loadBalancerPoolIdentityModel + loadBalancerListenerPatchModelAsPatch, asPatchErr := loadBalancerListenerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerOptions model updateLoadBalancerListenerOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerOptions) updateLoadBalancerListenerOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerOptionsModel.ConnectionLimit = core.Int64Ptr(int64(2000)) - updateLoadBalancerListenerOptionsModel.Port = core.Int64Ptr(int64(443)) - updateLoadBalancerListenerOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerListenerOptionsModel.CertificateInstance = certificateInstanceIdentityModel - updateLoadBalancerListenerOptionsModel.DefaultPool = loadBalancerPoolIdentityModel + updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch = loadBalancerListenerPatchModelAsPatch updateLoadBalancerListenerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -19984,7 +20303,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19999,7 +20318,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20030,7 +20349,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20045,7 +20364,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20072,7 +20391,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20112,7 +20431,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20127,7 +20446,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20174,7 +20493,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20189,7 +20508,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20232,7 +20551,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20289,7 +20608,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20302,7 +20621,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20328,7 +20647,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20367,7 +20686,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20382,7 +20701,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20414,7 +20733,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20429,7 +20748,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20457,7 +20776,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20498,7 +20817,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20513,7 +20832,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20522,14 +20841,20 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerListenerPolicyPatchTargetModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPolicyPatch model + loadBalancerListenerPolicyPatchModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatch) + loadBalancerListenerPolicyPatchModel.Name = core.StringPtr("my-policy") + loadBalancerListenerPolicyPatchModel.Priority = core.Int64Ptr(int64(5)) + loadBalancerListenerPolicyPatchModel.Target = loadBalancerListenerPolicyPatchTargetModel + loadBalancerListenerPolicyPatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model updateLoadBalancerListenerPolicyOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerPolicyOptions) updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyOptionsModel.Name = core.StringPtr("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.Priority = core.Int64Ptr(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.Target = loadBalancerListenerPolicyPatchTargetModel + updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatchModelAsPatch updateLoadBalancerListenerPolicyOptionsModel.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 := vpcClassicService.UpdateLoadBalancerListenerPolicy(updateLoadBalancerListenerPolicyOptionsModel) @@ -20552,7 +20877,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20567,7 +20892,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20582,14 +20907,20 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerListenerPolicyPatchTargetModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPolicyPatch model + loadBalancerListenerPolicyPatchModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatch) + loadBalancerListenerPolicyPatchModel.Name = core.StringPtr("my-policy") + loadBalancerListenerPolicyPatchModel.Priority = core.Int64Ptr(int64(5)) + loadBalancerListenerPolicyPatchModel.Target = loadBalancerListenerPolicyPatchTargetModel + loadBalancerListenerPolicyPatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model updateLoadBalancerListenerPolicyOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerPolicyOptions) updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyOptionsModel.Name = core.StringPtr("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.Priority = core.Int64Ptr(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.Target = loadBalancerListenerPolicyPatchTargetModel + updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatchModelAsPatch updateLoadBalancerListenerPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -20602,7 +20933,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20611,14 +20942,20 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerListenerPolicyPatchTargetModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPolicyPatch model + loadBalancerListenerPolicyPatchModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatch) + loadBalancerListenerPolicyPatchModel.Name = core.StringPtr("my-policy") + loadBalancerListenerPolicyPatchModel.Priority = core.Int64Ptr(int64(5)) + loadBalancerListenerPolicyPatchModel.Target = loadBalancerListenerPolicyPatchTargetModel + loadBalancerListenerPolicyPatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model updateLoadBalancerListenerPolicyOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerPolicyOptions) updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyOptionsModel.Name = core.StringPtr("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.Priority = core.Int64Ptr(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.Target = loadBalancerListenerPolicyPatchTargetModel + updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatchModelAsPatch updateLoadBalancerListenerPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -20650,7 +20987,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPolicyRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPolicyRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20665,7 +21002,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20697,7 +21034,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPolicyRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPolicyRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20712,7 +21049,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20740,7 +21077,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20781,7 +21118,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20796,7 +21133,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20832,7 +21169,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20847,7 +21184,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20879,7 +21216,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20925,7 +21262,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20938,7 +21275,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -20965,7 +21302,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21005,7 +21342,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21020,7 +21357,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21053,7 +21390,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21068,7 +21405,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21097,7 +21434,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21139,7 +21476,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21154,21 +21491,27 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + loadBalancerListenerPolicyRulePatchModel := new(vpcclassicv1.LoadBalancerListenerPolicyRulePatch) + loadBalancerListenerPolicyRulePatchModel.Condition = core.StringPtr("contains") + loadBalancerListenerPolicyRulePatchModel.Field = core.StringPtr("MY-APP-HEADER") + loadBalancerListenerPolicyRulePatchModel.Type = core.StringPtr("header") + loadBalancerListenerPolicyRulePatchModel.Value = core.StringPtr("testString") + loadBalancerListenerPolicyRulePatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model updateLoadBalancerListenerPolicyRuleOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerPolicyRuleOptions) updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.Condition = core.StringPtr("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.Field = core.StringPtr("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.Type = core.StringPtr("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.Value = core.StringPtr("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatchModelAsPatch updateLoadBalancerListenerPolicyRuleOptionsModel.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 := vpcClassicService.UpdateLoadBalancerListenerPolicyRule(updateLoadBalancerListenerPolicyRuleOptionsModel) @@ -21191,7 +21534,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21206,7 +21549,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21217,16 +21560,22 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + loadBalancerListenerPolicyRulePatchModel := new(vpcclassicv1.LoadBalancerListenerPolicyRulePatch) + loadBalancerListenerPolicyRulePatchModel.Condition = core.StringPtr("contains") + loadBalancerListenerPolicyRulePatchModel.Field = core.StringPtr("MY-APP-HEADER") + loadBalancerListenerPolicyRulePatchModel.Type = core.StringPtr("header") + loadBalancerListenerPolicyRulePatchModel.Value = core.StringPtr("testString") + loadBalancerListenerPolicyRulePatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model updateLoadBalancerListenerPolicyRuleOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerPolicyRuleOptions) updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.Condition = core.StringPtr("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.Field = core.StringPtr("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.Type = core.StringPtr("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.Value = core.StringPtr("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatchModelAsPatch updateLoadBalancerListenerPolicyRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -21239,21 +21588,27 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + loadBalancerListenerPolicyRulePatchModel := new(vpcclassicv1.LoadBalancerListenerPolicyRulePatch) + loadBalancerListenerPolicyRulePatchModel.Condition = core.StringPtr("contains") + loadBalancerListenerPolicyRulePatchModel.Field = core.StringPtr("MY-APP-HEADER") + loadBalancerListenerPolicyRulePatchModel.Type = core.StringPtr("header") + loadBalancerListenerPolicyRulePatchModel.Value = core.StringPtr("testString") + loadBalancerListenerPolicyRulePatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model updateLoadBalancerListenerPolicyRuleOptionsModel := new(vpcclassicv1.UpdateLoadBalancerListenerPolicyRuleOptions) updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.Condition = core.StringPtr("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.Field = core.StringPtr("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.Type = core.StringPtr("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.Value = core.StringPtr("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatchModelAsPatch updateLoadBalancerListenerPolicyRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -21285,7 +21640,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21300,7 +21655,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21330,7 +21685,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21345,7 +21700,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21371,7 +21726,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21410,7 +21765,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21425,7 +21780,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21484,7 +21839,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21499,7 +21854,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21554,7 +21909,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21623,7 +21978,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerPoolPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21636,7 +21991,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21661,7 +22016,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21699,7 +22054,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21714,7 +22069,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21745,7 +22100,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21760,7 +22115,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21787,7 +22142,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21827,7 +22182,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21842,7 +22197,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21860,15 +22215,21 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolSessionPersistencePatchModel := new(vpcclassicv1.LoadBalancerPoolSessionPersistencePatch) loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") + // Construct an instance of the LoadBalancerPoolPatch model + loadBalancerPoolPatchModel := new(vpcclassicv1.LoadBalancerPoolPatch) + loadBalancerPoolPatchModel.Name = core.StringPtr("my-load-balancer-pool") + loadBalancerPoolPatchModel.Algorithm = core.StringPtr("least_connections") + loadBalancerPoolPatchModel.Protocol = core.StringPtr("http") + loadBalancerPoolPatchModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel + loadBalancerPoolPatchModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + loadBalancerPoolPatchModelAsPatch, asPatchErr := loadBalancerPoolPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolOptions model updateLoadBalancerPoolOptionsModel := new(vpcclassicv1.UpdateLoadBalancerPoolOptions) updateLoadBalancerPoolOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolOptionsModel.Name = core.StringPtr("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.Algorithm = core.StringPtr("least_connections") - updateLoadBalancerPoolOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerPoolOptionsModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel - updateLoadBalancerPoolOptionsModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch = loadBalancerPoolPatchModelAsPatch updateLoadBalancerPoolOptionsModel.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 := vpcClassicService.UpdateLoadBalancerPool(updateLoadBalancerPoolOptionsModel) @@ -21891,7 +22252,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21906,7 +22267,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21930,15 +22291,21 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolSessionPersistencePatchModel := new(vpcclassicv1.LoadBalancerPoolSessionPersistencePatch) loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") + // Construct an instance of the LoadBalancerPoolPatch model + loadBalancerPoolPatchModel := new(vpcclassicv1.LoadBalancerPoolPatch) + loadBalancerPoolPatchModel.Name = core.StringPtr("my-load-balancer-pool") + loadBalancerPoolPatchModel.Algorithm = core.StringPtr("least_connections") + loadBalancerPoolPatchModel.Protocol = core.StringPtr("http") + loadBalancerPoolPatchModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel + loadBalancerPoolPatchModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + loadBalancerPoolPatchModelAsPatch, asPatchErr := loadBalancerPoolPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolOptions model updateLoadBalancerPoolOptionsModel := new(vpcclassicv1.UpdateLoadBalancerPoolOptions) updateLoadBalancerPoolOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolOptionsModel.Name = core.StringPtr("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.Algorithm = core.StringPtr("least_connections") - updateLoadBalancerPoolOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerPoolOptionsModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel - updateLoadBalancerPoolOptionsModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch = loadBalancerPoolPatchModelAsPatch updateLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -21951,7 +22318,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -21969,15 +22336,21 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolSessionPersistencePatchModel := new(vpcclassicv1.LoadBalancerPoolSessionPersistencePatch) loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") + // Construct an instance of the LoadBalancerPoolPatch model + loadBalancerPoolPatchModel := new(vpcclassicv1.LoadBalancerPoolPatch) + loadBalancerPoolPatchModel.Name = core.StringPtr("my-load-balancer-pool") + loadBalancerPoolPatchModel.Algorithm = core.StringPtr("least_connections") + loadBalancerPoolPatchModel.Protocol = core.StringPtr("http") + loadBalancerPoolPatchModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel + loadBalancerPoolPatchModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + loadBalancerPoolPatchModelAsPatch, asPatchErr := loadBalancerPoolPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolOptions model updateLoadBalancerPoolOptionsModel := new(vpcclassicv1.UpdateLoadBalancerPoolOptions) updateLoadBalancerPoolOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolOptionsModel.Name = core.StringPtr("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.Algorithm = core.StringPtr("least_connections") - updateLoadBalancerPoolOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerPoolOptionsModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel - updateLoadBalancerPoolOptionsModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch = loadBalancerPoolPatchModelAsPatch updateLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -22009,7 +22382,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22024,7 +22397,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22055,7 +22428,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22070,7 +22443,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22097,7 +22470,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22137,7 +22510,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22152,7 +22525,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22190,7 +22563,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22205,7 +22578,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22239,7 +22612,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22286,7 +22659,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22301,7 +22674,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22343,7 +22716,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22358,7 +22731,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22396,7 +22769,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22448,7 +22821,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22461,7 +22834,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22487,7 +22860,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22526,7 +22899,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22541,7 +22914,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22573,7 +22946,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22588,7 +22961,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22616,7 +22989,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22657,7 +23030,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22672,7 +23045,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22681,14 +23054,20 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolMemberTargetPrototypeModel := new(vpcclassicv1.LoadBalancerPoolMemberTargetPrototypeIP) loadBalancerPoolMemberTargetPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the LoadBalancerPoolMemberPatch model + loadBalancerPoolMemberPatchModel := new(vpcclassicv1.LoadBalancerPoolMemberPatch) + loadBalancerPoolMemberPatchModel.Port = core.Int64Ptr(int64(80)) + loadBalancerPoolMemberPatchModel.Weight = core.Int64Ptr(int64(50)) + loadBalancerPoolMemberPatchModel.Target = loadBalancerPoolMemberTargetPrototypeModel + loadBalancerPoolMemberPatchModelAsPatch, asPatchErr := loadBalancerPoolMemberPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model updateLoadBalancerPoolMemberOptionsModel := new(vpcclassicv1.UpdateLoadBalancerPoolMemberOptions) updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.PoolID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolMemberOptionsModel.Port = core.Int64Ptr(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.Weight = core.Int64Ptr(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.Target = loadBalancerPoolMemberTargetPrototypeModel + updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatchModelAsPatch updateLoadBalancerPoolMemberOptionsModel.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 := vpcClassicService.UpdateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptionsModel) @@ -22711,7 +23090,7 @@ var _ = Describe(`VpcClassicV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22726,7 +23105,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22741,14 +23120,20 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolMemberTargetPrototypeModel := new(vpcclassicv1.LoadBalancerPoolMemberTargetPrototypeIP) loadBalancerPoolMemberTargetPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the LoadBalancerPoolMemberPatch model + loadBalancerPoolMemberPatchModel := new(vpcclassicv1.LoadBalancerPoolMemberPatch) + loadBalancerPoolMemberPatchModel.Port = core.Int64Ptr(int64(80)) + loadBalancerPoolMemberPatchModel.Weight = core.Int64Ptr(int64(50)) + loadBalancerPoolMemberPatchModel.Target = loadBalancerPoolMemberTargetPrototypeModel + loadBalancerPoolMemberPatchModelAsPatch, asPatchErr := loadBalancerPoolMemberPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model updateLoadBalancerPoolMemberOptionsModel := new(vpcclassicv1.UpdateLoadBalancerPoolMemberOptions) updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.PoolID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolMemberOptionsModel.Port = core.Int64Ptr(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.Weight = core.Int64Ptr(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.Target = loadBalancerPoolMemberTargetPrototypeModel + updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatchModelAsPatch updateLoadBalancerPoolMemberOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -22761,7 +23146,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, serviceErr := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) Expect(serviceErr).To(BeNil()) Expect(vpcClassicService).ToNot(BeNil()) @@ -22770,14 +23155,20 @@ var _ = Describe(`VpcClassicV1`, func() { loadBalancerPoolMemberTargetPrototypeModel := new(vpcclassicv1.LoadBalancerPoolMemberTargetPrototypeIP) loadBalancerPoolMemberTargetPrototypeModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the LoadBalancerPoolMemberPatch model + loadBalancerPoolMemberPatchModel := new(vpcclassicv1.LoadBalancerPoolMemberPatch) + loadBalancerPoolMemberPatchModel.Port = core.Int64Ptr(int64(80)) + loadBalancerPoolMemberPatchModel.Weight = core.Int64Ptr(int64(50)) + loadBalancerPoolMemberPatchModel.Target = loadBalancerPoolMemberTargetPrototypeModel + loadBalancerPoolMemberPatchModelAsPatch, asPatchErr := loadBalancerPoolMemberPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model updateLoadBalancerPoolMemberOptionsModel := new(vpcclassicv1.UpdateLoadBalancerPoolMemberOptions) updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.PoolID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolMemberOptionsModel.Port = core.Int64Ptr(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.Weight = core.Int64Ptr(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.Target = loadBalancerPoolMemberTargetPrototypeModel + updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatchModelAsPatch updateLoadBalancerPoolMemberOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcClassicService.SetServiceURL("") @@ -22806,7 +23197,7 @@ var _ = Describe(`VpcClassicV1`, func() { vpcClassicService, _ := vpcclassicv1.NewVpcClassicV1(&vpcclassicv1.VpcClassicV1Options{ URL: "http://vpcclassicv1modelgenerator.com", Authenticator: &core.NoAuthAuthenticator{}, - Version: core.StringPtr(version), + Version: core.StringPtr(version), }) It(`Invoke NewAddInstanceNetworkInterfaceFloatingIPOptions successfully`, func() { // Construct an instance of the AddInstanceNetworkInterfaceFloatingIPOptions model @@ -22914,19 +23305,19 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(checkVPNGatewayConnectionPeerCIDROptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateFloatingIPOptions successfully`, func() { - // Construct an instance of the ZoneIdentityByName model - zoneIdentityModel := new(vpcclassicv1.ZoneIdentityByName) - Expect(zoneIdentityModel).ToNot(BeNil()) - zoneIdentityModel.Name = core.StringPtr("us-south-1") - Expect(zoneIdentityModel.Name).To(Equal(core.StringPtr("us-south-1"))) - - // Construct an instance of the FloatingIPPrototypeFloatingIPByZone model - floatingIPPrototypeModel := new(vpcclassicv1.FloatingIPPrototypeFloatingIPByZone) + // Construct an instance of the FloatingIPByTargetTargetNetworkInterfaceIdentityByID model + floatingIPByTargetTargetModel := new(vpcclassicv1.FloatingIPByTargetTargetNetworkInterfaceIdentityByID) + Expect(floatingIPByTargetTargetModel).ToNot(BeNil()) + floatingIPByTargetTargetModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + Expect(floatingIPByTargetTargetModel.ID).To(Equal(core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793"))) + + // Construct an instance of the FloatingIPPrototypeFloatingIPByTarget model + floatingIPPrototypeModel := new(vpcclassicv1.FloatingIPPrototypeFloatingIPByTarget) Expect(floatingIPPrototypeModel).ToNot(BeNil()) floatingIPPrototypeModel.Name = core.StringPtr("my-new-floating-ip") - floatingIPPrototypeModel.Zone = zoneIdentityModel + floatingIPPrototypeModel.Target = floatingIPByTargetTargetModel Expect(floatingIPPrototypeModel.Name).To(Equal(core.StringPtr("my-new-floating-ip"))) - Expect(floatingIPPrototypeModel.Zone).To(Equal(zoneIdentityModel)) + Expect(floatingIPPrototypeModel.Target).To(Equal(floatingIPByTargetTargetModel)) // Construct an instance of the CreateFloatingIPOptions model var floatingIPPrototype vpcclassicv1.FloatingIPPrototypeIntf = nil @@ -23087,11 +23478,11 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceContext) Expect(volumeAttachmentPrototypeInstanceContextModel).ToNot(BeNil()) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel - Expect(volumeAttachmentPrototypeInstanceContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(volumeAttachmentPrototypeInstanceContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceContextModel.Volume).To(Equal(volumeAttachmentPrototypeInstanceContextVolumeModel)) // Construct an instance of the VPCIdentityByID model @@ -23129,11 +23520,11 @@ var _ = Describe(`VpcClassicV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcclassicv1.VolumeAttachmentPrototypeInstanceByImageContext) Expect(volumeAttachmentPrototypeInstanceByImageContextModel).ToNot(BeNil()) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel - Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Volume).To(Equal(volumePrototypeInstanceByImageContextModel)) // Construct an instance of the ImageIdentityByID model @@ -23192,14 +23583,14 @@ var _ = Describe(`VpcClassicV1`, func() { createInstanceVolumeAttachmentOptionsModel := vpcClassicService.NewCreateInstanceVolumeAttachmentOptions(instanceID, createInstanceVolumeAttachmentOptionsVolume) createInstanceVolumeAttachmentOptionsModel.SetInstanceID("testString") createInstanceVolumeAttachmentOptionsModel.SetVolume(volumeIdentityModel) - createInstanceVolumeAttachmentOptionsModel.SetName("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.SetDeleteVolumeOnInstanceDelete(true) + createInstanceVolumeAttachmentOptionsModel.SetName("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createInstanceVolumeAttachmentOptionsModel).ToNot(BeNil()) Expect(createInstanceVolumeAttachmentOptionsModel.InstanceID).To(Equal(core.StringPtr("testString"))) Expect(createInstanceVolumeAttachmentOptionsModel.Volume).To(Equal(volumeIdentityModel)) - Expect(createInstanceVolumeAttachmentOptionsModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(createInstanceVolumeAttachmentOptionsModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(createInstanceVolumeAttachmentOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateIpsecPolicyOptions successfully`, func() { @@ -25437,181 +25828,132 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(unsetSubnetPublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateFloatingIPOptions successfully`, func() { - // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model - floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcclassicv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel).ToNot(BeNil()) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") - Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel.ID).To(Equal(core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793"))) - // Construct an instance of the UpdateFloatingIPOptions model id := "testString" - updateFloatingIPOptionsModel := vpcClassicService.NewUpdateFloatingIPOptions(id) + floatingIPPatch := make(map[string]interface{}) + updateFloatingIPOptionsModel := vpcClassicService.NewUpdateFloatingIPOptions(id, floatingIPPatch) updateFloatingIPOptionsModel.SetID("testString") - updateFloatingIPOptionsModel.SetName("my-floating-ip") - updateFloatingIPOptionsModel.SetTarget(floatingIPPatchTargetNetworkInterfaceIdentityModel) + updateFloatingIPOptionsModel.SetFloatingIPPatch(make(map[string]interface{})) 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(floatingIPPatchTargetNetworkInterfaceIdentityModel)) + Expect(updateFloatingIPOptionsModel.FloatingIPPatch).To(Equal(make(map[string]interface{}))) Expect(updateFloatingIPOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateIkePolicyOptions successfully`, func() { // Construct an instance of the UpdateIkePolicyOptions model id := "testString" - updateIkePolicyOptionsModel := vpcClassicService.NewUpdateIkePolicyOptions(id) + ikePolicyPatch := make(map[string]interface{}) + updateIkePolicyOptionsModel := vpcClassicService.NewUpdateIkePolicyOptions(id, ikePolicyPatch) updateIkePolicyOptionsModel.SetID("testString") - updateIkePolicyOptionsModel.SetName("my-ike-policy") - updateIkePolicyOptionsModel.SetAuthenticationAlgorithm("md5") - updateIkePolicyOptionsModel.SetDhGroup(int64(2)) - updateIkePolicyOptionsModel.SetEncryptionAlgorithm("triple_des") - updateIkePolicyOptionsModel.SetIkeVersion(int64(1)) - updateIkePolicyOptionsModel.SetKeyLifetime(int64(28800)) + updateIkePolicyOptionsModel.SetIkePolicyPatch(make(map[string]interface{})) updateIkePolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateIkePolicyOptionsModel).ToNot(BeNil()) Expect(updateIkePolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateIkePolicyOptionsModel.Name).To(Equal(core.StringPtr("my-ike-policy"))) - Expect(updateIkePolicyOptionsModel.AuthenticationAlgorithm).To(Equal(core.StringPtr("md5"))) - Expect(updateIkePolicyOptionsModel.DhGroup).To(Equal(core.Int64Ptr(int64(2)))) - Expect(updateIkePolicyOptionsModel.EncryptionAlgorithm).To(Equal(core.StringPtr("triple_des"))) - Expect(updateIkePolicyOptionsModel.IkeVersion).To(Equal(core.Int64Ptr(int64(1)))) - Expect(updateIkePolicyOptionsModel.KeyLifetime).To(Equal(core.Int64Ptr(int64(28800)))) + Expect(updateIkePolicyOptionsModel.IkePolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateIkePolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateImageOptions successfully`, func() { // Construct an instance of the UpdateImageOptions model id := "testString" - updateImageOptionsModel := vpcClassicService.NewUpdateImageOptions(id) + imagePatch := make(map[string]interface{}) + updateImageOptionsModel := vpcClassicService.NewUpdateImageOptions(id, imagePatch) updateImageOptionsModel.SetID("testString") - updateImageOptionsModel.SetName("my-image") + updateImageOptionsModel.SetImagePatch(make(map[string]interface{})) updateImageOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateImageOptionsModel).ToNot(BeNil()) Expect(updateImageOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateImageOptionsModel.Name).To(Equal(core.StringPtr("my-image"))) + Expect(updateImageOptionsModel.ImagePatch).To(Equal(make(map[string]interface{}))) Expect(updateImageOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceOptions successfully`, func() { // Construct an instance of the UpdateInstanceOptions model id := "testString" - updateInstanceOptionsModel := vpcClassicService.NewUpdateInstanceOptions(id) + instancePatch := make(map[string]interface{}) + updateInstanceOptionsModel := vpcClassicService.NewUpdateInstanceOptions(id, instancePatch) updateInstanceOptionsModel.SetID("testString") - updateInstanceOptionsModel.SetName("my-instance") + updateInstanceOptionsModel.SetInstancePatch(make(map[string]interface{})) updateInstanceOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceOptionsModel).ToNot(BeNil()) Expect(updateInstanceOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceOptionsModel.Name).To(Equal(core.StringPtr("my-instance"))) + Expect(updateInstanceOptionsModel.InstancePatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceVolumeAttachmentOptions successfully`, func() { // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model instanceID := "testString" id := "testString" - updateInstanceVolumeAttachmentOptionsModel := vpcClassicService.NewUpdateInstanceVolumeAttachmentOptions(instanceID, id) + volumeAttachmentPatch := make(map[string]interface{}) + updateInstanceVolumeAttachmentOptionsModel := vpcClassicService.NewUpdateInstanceVolumeAttachmentOptions(instanceID, id, volumeAttachmentPatch) updateInstanceVolumeAttachmentOptionsModel.SetInstanceID("testString") updateInstanceVolumeAttachmentOptionsModel.SetID("testString") - updateInstanceVolumeAttachmentOptionsModel.SetName("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.SetDeleteVolumeOnInstanceDelete(true) + updateInstanceVolumeAttachmentOptionsModel.SetVolumeAttachmentPatch(make(map[string]interface{})) updateInstanceVolumeAttachmentOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceVolumeAttachmentOptionsModel).ToNot(BeNil()) Expect(updateInstanceVolumeAttachmentOptionsModel.InstanceID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceVolumeAttachmentOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceVolumeAttachmentOptionsModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) - Expect(updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceVolumeAttachmentOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateIpsecPolicyOptions successfully`, func() { // Construct an instance of the UpdateIpsecPolicyOptions model id := "testString" - updateIpsecPolicyOptionsModel := vpcClassicService.NewUpdateIpsecPolicyOptions(id) + iPsecPolicyPatch := make(map[string]interface{}) + updateIpsecPolicyOptionsModel := vpcClassicService.NewUpdateIpsecPolicyOptions(id, iPsecPolicyPatch) updateIpsecPolicyOptionsModel.SetID("testString") - updateIpsecPolicyOptionsModel.SetName("my-ipsec-policy") - updateIpsecPolicyOptionsModel.SetAuthenticationAlgorithm("md5") - updateIpsecPolicyOptionsModel.SetEncryptionAlgorithm("triple_des") - updateIpsecPolicyOptionsModel.SetKeyLifetime(int64(3600)) - updateIpsecPolicyOptionsModel.SetPfs("disabled") + updateIpsecPolicyOptionsModel.SetIPsecPolicyPatch(make(map[string]interface{})) updateIpsecPolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateIpsecPolicyOptionsModel).ToNot(BeNil()) Expect(updateIpsecPolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateIpsecPolicyOptionsModel.Name).To(Equal(core.StringPtr("my-ipsec-policy"))) - Expect(updateIpsecPolicyOptionsModel.AuthenticationAlgorithm).To(Equal(core.StringPtr("md5"))) - Expect(updateIpsecPolicyOptionsModel.EncryptionAlgorithm).To(Equal(core.StringPtr("triple_des"))) - Expect(updateIpsecPolicyOptionsModel.KeyLifetime).To(Equal(core.Int64Ptr(int64(3600)))) - Expect(updateIpsecPolicyOptionsModel.Pfs).To(Equal(core.StringPtr("disabled"))) + Expect(updateIpsecPolicyOptionsModel.IPsecPolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateIpsecPolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateKeyOptions successfully`, func() { // Construct an instance of the UpdateKeyOptions model id := "testString" - updateKeyOptionsModel := vpcClassicService.NewUpdateKeyOptions(id) + keyPatch := make(map[string]interface{}) + updateKeyOptionsModel := vpcClassicService.NewUpdateKeyOptions(id, keyPatch) updateKeyOptionsModel.SetID("testString") - updateKeyOptionsModel.SetName("my-key") + updateKeyOptionsModel.SetKeyPatch(make(map[string]interface{})) updateKeyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateKeyOptionsModel).ToNot(BeNil()) Expect(updateKeyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateKeyOptionsModel.Name).To(Equal(core.StringPtr("my-key"))) + Expect(updateKeyOptionsModel.KeyPatch).To(Equal(make(map[string]interface{}))) Expect(updateKeyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerListenerOptions successfully`, func() { - // Construct an instance of the CertificateInstanceIdentityByCRN model - certificateInstanceIdentityModel := new(vpcclassicv1.CertificateInstanceIdentityByCRN) - Expect(certificateInstanceIdentityModel).ToNot(BeNil()) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:cloudcerts:us-south:a/123456:b8866ea4-b8df-467e-801a-da1db7e020bf:certificate:78ff9c4c97d013fb2a95b21dddde7758") - Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:cloudcerts:us-south:a/123456:b8866ea4-b8df-467e-801a-da1db7e020bf:certificate:78ff9c4c97d013fb2a95b21dddde7758"))) - - // Construct an instance of the LoadBalancerPoolIdentityByID model - loadBalancerPoolIdentityModel := new(vpcclassicv1.LoadBalancerPoolIdentityByID) - Expect(loadBalancerPoolIdentityModel).ToNot(BeNil()) - loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") - Expect(loadBalancerPoolIdentityModel.ID).To(Equal(core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004"))) - // Construct an instance of the UpdateLoadBalancerListenerOptions model loadBalancerID := "testString" id := "testString" - updateLoadBalancerListenerOptionsModel := vpcClassicService.NewUpdateLoadBalancerListenerOptions(loadBalancerID, id) + loadBalancerListenerPatch := make(map[string]interface{}) + updateLoadBalancerListenerOptionsModel := vpcClassicService.NewUpdateLoadBalancerListenerOptions(loadBalancerID, id, loadBalancerListenerPatch) updateLoadBalancerListenerOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerListenerOptionsModel.SetID("testString") - updateLoadBalancerListenerOptionsModel.SetConnectionLimit(int64(2000)) - updateLoadBalancerListenerOptionsModel.SetPort(int64(443)) - updateLoadBalancerListenerOptionsModel.SetProtocol("http") - updateLoadBalancerListenerOptionsModel.SetCertificateInstance(certificateInstanceIdentityModel) - updateLoadBalancerListenerOptionsModel.SetDefaultPool(loadBalancerPoolIdentityModel) + updateLoadBalancerListenerOptionsModel.SetLoadBalancerListenerPatch(make(map[string]interface{})) updateLoadBalancerListenerOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerListenerOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerListenerOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerListenerOptionsModel.ConnectionLimit).To(Equal(core.Int64Ptr(int64(2000)))) - Expect(updateLoadBalancerListenerOptionsModel.Port).To(Equal(core.Int64Ptr(int64(443)))) - Expect(updateLoadBalancerListenerOptionsModel.Protocol).To(Equal(core.StringPtr("http"))) - Expect(updateLoadBalancerListenerOptionsModel.CertificateInstance).To(Equal(certificateInstanceIdentityModel)) - Expect(updateLoadBalancerListenerOptionsModel.DefaultPool).To(Equal(loadBalancerPoolIdentityModel)) + Expect(updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerListenerOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerListenerPolicyOptions successfully`, func() { - // Construct an instance of the LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model - loadBalancerListenerPolicyPatchTargetModel := new(vpcclassicv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) - Expect(loadBalancerListenerPolicyPatchTargetModel).ToNot(BeNil()) - loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") - Expect(loadBalancerListenerPolicyPatchTargetModel.ID).To(Equal(core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004"))) - // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model loadBalancerID := "testString" listenerID := "testString" id := "testString" - updateLoadBalancerListenerPolicyOptionsModel := vpcClassicService.NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID, listenerID, id) + loadBalancerListenerPolicyPatch := make(map[string]interface{}) + updateLoadBalancerListenerPolicyOptionsModel := vpcClassicService.NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID, listenerID, id, loadBalancerListenerPolicyPatch) updateLoadBalancerListenerPolicyOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerListenerPolicyOptionsModel.SetListenerID("testString") updateLoadBalancerListenerPolicyOptionsModel.SetID("testString") - updateLoadBalancerListenerPolicyOptionsModel.SetName("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.SetPriority(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.SetTarget(loadBalancerListenerPolicyPatchTargetModel) + updateLoadBalancerListenerPolicyOptionsModel.SetLoadBalancerListenerPolicyPatch(make(map[string]interface{})) updateLoadBalancerListenerPolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerListenerPolicyOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyOptionsModel.ListenerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerListenerPolicyOptionsModel.Name).To(Equal(core.StringPtr("my-policy"))) - Expect(updateLoadBalancerListenerPolicyOptionsModel.Priority).To(Equal(core.Int64Ptr(int64(5)))) - Expect(updateLoadBalancerListenerPolicyOptionsModel.Target).To(Equal(loadBalancerListenerPolicyPatchTargetModel)) + Expect(updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerListenerPolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerListenerPolicyRuleOptions successfully`, func() { @@ -25620,373 +25962,239 @@ var _ = Describe(`VpcClassicV1`, func() { listenerID := "testString" policyID := "testString" id := "testString" - updateLoadBalancerListenerPolicyRuleOptionsModel := vpcClassicService.NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID, listenerID, policyID, id) + loadBalancerListenerPolicyRulePatch := make(map[string]interface{}) + updateLoadBalancerListenerPolicyRuleOptionsModel := vpcClassicService.NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID, listenerID, policyID, id, loadBalancerListenerPolicyRulePatch) updateLoadBalancerListenerPolicyRuleOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.SetListenerID("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.SetPolicyID("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.SetID("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetCondition("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetField("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetType("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetValue("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.SetLoadBalancerListenerPolicyRulePatch(make(map[string]interface{})) updateLoadBalancerListenerPolicyRuleOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Condition).To(Equal(core.StringPtr("contains"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Field).To(Equal(core.StringPtr("MY-APP-HEADER"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Type).To(Equal(core.StringPtr("header"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Value).To(Equal(core.StringPtr("testString"))) + Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerOptions successfully`, func() { // Construct an instance of the UpdateLoadBalancerOptions model id := "testString" - updateLoadBalancerOptionsModel := vpcClassicService.NewUpdateLoadBalancerOptions(id) + loadBalancerPatch := make(map[string]interface{}) + updateLoadBalancerOptionsModel := vpcClassicService.NewUpdateLoadBalancerOptions(id, loadBalancerPatch) updateLoadBalancerOptionsModel.SetID("testString") - updateLoadBalancerOptionsModel.SetName("my-load-balancer") + updateLoadBalancerOptionsModel.SetLoadBalancerPatch(make(map[string]interface{})) updateLoadBalancerOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerOptionsModel.Name).To(Equal(core.StringPtr("my-load-balancer"))) + Expect(updateLoadBalancerOptionsModel.LoadBalancerPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerPoolMemberOptions successfully`, func() { - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeIP model - loadBalancerPoolMemberTargetPrototypeModel := new(vpcclassicv1.LoadBalancerPoolMemberTargetPrototypeIP) - Expect(loadBalancerPoolMemberTargetPrototypeModel).ToNot(BeNil()) - loadBalancerPoolMemberTargetPrototypeModel.Address = core.StringPtr("192.168.3.4") - Expect(loadBalancerPoolMemberTargetPrototypeModel.Address).To(Equal(core.StringPtr("192.168.3.4"))) - // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model loadBalancerID := "testString" poolID := "testString" id := "testString" - updateLoadBalancerPoolMemberOptionsModel := vpcClassicService.NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID, poolID, id) + loadBalancerPoolMemberPatch := make(map[string]interface{}) + updateLoadBalancerPoolMemberOptionsModel := vpcClassicService.NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID, poolID, id, loadBalancerPoolMemberPatch) updateLoadBalancerPoolMemberOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerPoolMemberOptionsModel.SetPoolID("testString") updateLoadBalancerPoolMemberOptionsModel.SetID("testString") - updateLoadBalancerPoolMemberOptionsModel.SetPort(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.SetWeight(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.SetTarget(loadBalancerPoolMemberTargetPrototypeModel) + updateLoadBalancerPoolMemberOptionsModel.SetLoadBalancerPoolMemberPatch(make(map[string]interface{})) updateLoadBalancerPoolMemberOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerPoolMemberOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerPoolMemberOptionsModel.PoolID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerPoolMemberOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerPoolMemberOptionsModel.Port).To(Equal(core.Int64Ptr(int64(80)))) - Expect(updateLoadBalancerPoolMemberOptionsModel.Weight).To(Equal(core.Int64Ptr(int64(50)))) - Expect(updateLoadBalancerPoolMemberOptionsModel.Target).To(Equal(loadBalancerPoolMemberTargetPrototypeModel)) + Expect(updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerPoolMemberOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerPoolOptions successfully`, func() { - // Construct an instance of the LoadBalancerPoolHealthMonitorPatch model - loadBalancerPoolHealthMonitorPatchModel := new(vpcclassicv1.LoadBalancerPoolHealthMonitorPatch) - Expect(loadBalancerPoolHealthMonitorPatchModel).ToNot(BeNil()) - loadBalancerPoolHealthMonitorPatchModel.Delay = core.Int64Ptr(int64(5)) - loadBalancerPoolHealthMonitorPatchModel.MaxRetries = core.Int64Ptr(int64(2)) - loadBalancerPoolHealthMonitorPatchModel.Port = core.Int64Ptr(int64(22)) - loadBalancerPoolHealthMonitorPatchModel.Timeout = core.Int64Ptr(int64(2)) - loadBalancerPoolHealthMonitorPatchModel.Type = core.StringPtr("http") - loadBalancerPoolHealthMonitorPatchModel.URLPath = core.StringPtr("/") - Expect(loadBalancerPoolHealthMonitorPatchModel.Delay).To(Equal(core.Int64Ptr(int64(5)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.MaxRetries).To(Equal(core.Int64Ptr(int64(2)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.Port).To(Equal(core.Int64Ptr(int64(22)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.Timeout).To(Equal(core.Int64Ptr(int64(2)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.Type).To(Equal(core.StringPtr("http"))) - Expect(loadBalancerPoolHealthMonitorPatchModel.URLPath).To(Equal(core.StringPtr("/"))) - - // Construct an instance of the LoadBalancerPoolSessionPersistencePatch model - loadBalancerPoolSessionPersistencePatchModel := new(vpcclassicv1.LoadBalancerPoolSessionPersistencePatch) - Expect(loadBalancerPoolSessionPersistencePatchModel).ToNot(BeNil()) - loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") - Expect(loadBalancerPoolSessionPersistencePatchModel.Type).To(Equal(core.StringPtr("source_ip"))) - // Construct an instance of the UpdateLoadBalancerPoolOptions model loadBalancerID := "testString" id := "testString" - updateLoadBalancerPoolOptionsModel := vpcClassicService.NewUpdateLoadBalancerPoolOptions(loadBalancerID, id) + loadBalancerPoolPatch := make(map[string]interface{}) + updateLoadBalancerPoolOptionsModel := vpcClassicService.NewUpdateLoadBalancerPoolOptions(loadBalancerID, id, loadBalancerPoolPatch) updateLoadBalancerPoolOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerPoolOptionsModel.SetID("testString") - updateLoadBalancerPoolOptionsModel.SetName("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.SetAlgorithm("least_connections") - updateLoadBalancerPoolOptionsModel.SetProtocol("http") - updateLoadBalancerPoolOptionsModel.SetHealthMonitor(loadBalancerPoolHealthMonitorPatchModel) - updateLoadBalancerPoolOptionsModel.SetSessionPersistence(loadBalancerPoolSessionPersistencePatchModel) + updateLoadBalancerPoolOptionsModel.SetLoadBalancerPoolPatch(make(map[string]interface{})) updateLoadBalancerPoolOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerPoolOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerPoolOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerPoolOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerPoolOptionsModel.Name).To(Equal(core.StringPtr("my-load-balancer-pool"))) - Expect(updateLoadBalancerPoolOptionsModel.Algorithm).To(Equal(core.StringPtr("least_connections"))) - Expect(updateLoadBalancerPoolOptionsModel.Protocol).To(Equal(core.StringPtr("http"))) - Expect(updateLoadBalancerPoolOptionsModel.HealthMonitor).To(Equal(loadBalancerPoolHealthMonitorPatchModel)) - Expect(updateLoadBalancerPoolOptionsModel.SessionPersistence).To(Equal(loadBalancerPoolSessionPersistencePatchModel)) + Expect(updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerPoolOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateNetworkACLOptions successfully`, func() { // Construct an instance of the UpdateNetworkACLOptions model id := "testString" - updateNetworkACLOptionsModel := vpcClassicService.NewUpdateNetworkACLOptions(id) + networkACLPatch := make(map[string]interface{}) + updateNetworkACLOptionsModel := vpcClassicService.NewUpdateNetworkACLOptions(id, networkACLPatch) updateNetworkACLOptionsModel.SetID("testString") - updateNetworkACLOptionsModel.SetName("my-network-acl") + updateNetworkACLOptionsModel.SetNetworkACLPatch(make(map[string]interface{})) updateNetworkACLOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateNetworkACLOptionsModel).ToNot(BeNil()) Expect(updateNetworkACLOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateNetworkACLOptionsModel.Name).To(Equal(core.StringPtr("my-network-acl"))) + Expect(updateNetworkACLOptionsModel.NetworkACLPatch).To(Equal(make(map[string]interface{}))) Expect(updateNetworkACLOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateNetworkACLRuleOptions successfully`, func() { - // 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.Name = core.StringPtr("my-rule-2") - networkACLRulePatchModel.Action = core.StringPtr("allow") - networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") - networkACLRulePatchModel.Direction = core.StringPtr("inbound") - networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") - networkACLRulePatchModel.Protocol = core.StringPtr("icmp") - networkACLRulePatchModel.Before = networkACLRuleIdentityModel - networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) - networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) - Expect(networkACLRulePatchModel.Name).To(Equal(core.StringPtr("my-rule-2"))) - Expect(networkACLRulePatchModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(networkACLRulePatchModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) - Expect(networkACLRulePatchModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(networkACLRulePatchModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) - Expect(networkACLRulePatchModel.Protocol).To(Equal(core.StringPtr("icmp"))) - Expect(networkACLRulePatchModel.Before).To(Equal(networkACLRuleIdentityModel)) - Expect(networkACLRulePatchModel.Code).To(Equal(core.Int64Ptr(int64(0)))) - Expect(networkACLRulePatchModel.Type).To(Equal(core.Int64Ptr(int64(8)))) - // Construct an instance of the UpdateNetworkACLRuleOptions model networkACLID := "testString" id := "testString" - var networkACLRulePatch vpcclassicv1.NetworkACLRulePatchIntf = nil + networkACLRulePatch := make(map[string]interface{}) updateNetworkACLRuleOptionsModel := vpcClassicService.NewUpdateNetworkACLRuleOptions(networkACLID, id, networkACLRulePatch) updateNetworkACLRuleOptionsModel.SetNetworkACLID("testString") updateNetworkACLRuleOptionsModel.SetID("testString") - updateNetworkACLRuleOptionsModel.SetNetworkACLRulePatch(networkACLRulePatchModel) + updateNetworkACLRuleOptionsModel.SetNetworkACLRulePatch(make(map[string]interface{})) updateNetworkACLRuleOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateNetworkACLRuleOptionsModel).ToNot(BeNil()) Expect(updateNetworkACLRuleOptionsModel.NetworkACLID).To(Equal(core.StringPtr("testString"))) Expect(updateNetworkACLRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateNetworkACLRuleOptionsModel.NetworkACLRulePatch).To(Equal(networkACLRulePatchModel)) + Expect(updateNetworkACLRuleOptionsModel.NetworkACLRulePatch).To(Equal(make(map[string]interface{}))) Expect(updateNetworkACLRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdatePublicGatewayOptions successfully`, func() { // Construct an instance of the UpdatePublicGatewayOptions model id := "testString" - updatePublicGatewayOptionsModel := vpcClassicService.NewUpdatePublicGatewayOptions(id) + publicGatewayPatch := make(map[string]interface{}) + updatePublicGatewayOptionsModel := vpcClassicService.NewUpdatePublicGatewayOptions(id, publicGatewayPatch) updatePublicGatewayOptionsModel.SetID("testString") - updatePublicGatewayOptionsModel.SetName("my-public-gateway") + updatePublicGatewayOptionsModel.SetPublicGatewayPatch(make(map[string]interface{})) updatePublicGatewayOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updatePublicGatewayOptionsModel).ToNot(BeNil()) Expect(updatePublicGatewayOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updatePublicGatewayOptionsModel.Name).To(Equal(core.StringPtr("my-public-gateway"))) + Expect(updatePublicGatewayOptionsModel.PublicGatewayPatch).To(Equal(make(map[string]interface{}))) Expect(updatePublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSecurityGroupOptions successfully`, func() { // Construct an instance of the UpdateSecurityGroupOptions model id := "testString" - updateSecurityGroupOptionsModel := vpcClassicService.NewUpdateSecurityGroupOptions(id) + securityGroupPatch := make(map[string]interface{}) + updateSecurityGroupOptionsModel := vpcClassicService.NewUpdateSecurityGroupOptions(id, securityGroupPatch) updateSecurityGroupOptionsModel.SetID("testString") - updateSecurityGroupOptionsModel.SetName("my-security-group") + updateSecurityGroupOptionsModel.SetSecurityGroupPatch(make(map[string]interface{})) updateSecurityGroupOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateSecurityGroupOptionsModel).ToNot(BeNil()) Expect(updateSecurityGroupOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateSecurityGroupOptionsModel.Name).To(Equal(core.StringPtr("my-security-group"))) + Expect(updateSecurityGroupOptionsModel.SecurityGroupPatch).To(Equal(make(map[string]interface{}))) Expect(updateSecurityGroupOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSecurityGroupRuleOptions successfully`, func() { - // 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) - Expect(securityGroupRulePatchModel).ToNot(BeNil()) - securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel - securityGroupRulePatchModel.Direction = core.StringPtr("inbound") - securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") - securityGroupRulePatchModel.Protocol = core.StringPtr("icmp") - securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) - securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) - Expect(securityGroupRulePatchModel.Remote).To(Equal(securityGroupRulePatchRemoteModel)) - 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.Code).To(Equal(core.Int64Ptr(int64(0)))) - Expect(securityGroupRulePatchModel.Type).To(Equal(core.Int64Ptr(int64(8)))) - // Construct an instance of the UpdateSecurityGroupRuleOptions model securityGroupID := "testString" id := "testString" - var securityGroupRulePatch vpcclassicv1.SecurityGroupRulePatchIntf = nil + securityGroupRulePatch := make(map[string]interface{}) updateSecurityGroupRuleOptionsModel := vpcClassicService.NewUpdateSecurityGroupRuleOptions(securityGroupID, id, securityGroupRulePatch) updateSecurityGroupRuleOptionsModel.SetSecurityGroupID("testString") updateSecurityGroupRuleOptionsModel.SetID("testString") - updateSecurityGroupRuleOptionsModel.SetSecurityGroupRulePatch(securityGroupRulePatchModel) + updateSecurityGroupRuleOptionsModel.SetSecurityGroupRulePatch(make(map[string]interface{})) updateSecurityGroupRuleOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateSecurityGroupRuleOptionsModel).ToNot(BeNil()) Expect(updateSecurityGroupRuleOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) Expect(updateSecurityGroupRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch).To(Equal(securityGroupRulePatchModel)) + Expect(updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch).To(Equal(make(map[string]interface{}))) Expect(updateSecurityGroupRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSubnetOptions successfully`, func() { - // Construct an instance of the NetworkACLIdentityByID model - networkACLIdentityModel := new(vpcclassicv1.NetworkACLIdentityByID) - Expect(networkACLIdentityModel).ToNot(BeNil()) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") - Expect(networkACLIdentityModel.ID).To(Equal(core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf"))) - - // Construct an instance of the PublicGatewayIdentityByID model - publicGatewayIdentityModel := new(vpcclassicv1.PublicGatewayIdentityByID) - Expect(publicGatewayIdentityModel).ToNot(BeNil()) - publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") - Expect(publicGatewayIdentityModel.ID).To(Equal(core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241"))) - // Construct an instance of the UpdateSubnetOptions model id := "testString" - updateSubnetOptionsModel := vpcClassicService.NewUpdateSubnetOptions(id) + subnetPatch := make(map[string]interface{}) + updateSubnetOptionsModel := vpcClassicService.NewUpdateSubnetOptions(id, subnetPatch) updateSubnetOptionsModel.SetID("testString") - updateSubnetOptionsModel.SetName("my-subnet") - updateSubnetOptionsModel.SetNetworkACL(networkACLIdentityModel) - updateSubnetOptionsModel.SetPublicGateway(publicGatewayIdentityModel) + updateSubnetOptionsModel.SetSubnetPatch(make(map[string]interface{})) updateSubnetOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateSubnetOptionsModel).ToNot(BeNil()) Expect(updateSubnetOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateSubnetOptionsModel.Name).To(Equal(core.StringPtr("my-subnet"))) - Expect(updateSubnetOptionsModel.NetworkACL).To(Equal(networkACLIdentityModel)) - Expect(updateSubnetOptionsModel.PublicGateway).To(Equal(publicGatewayIdentityModel)) + Expect(updateSubnetOptionsModel.SubnetPatch).To(Equal(make(map[string]interface{}))) Expect(updateSubnetOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVolumeOptions successfully`, func() { // Construct an instance of the UpdateVolumeOptions model id := "testString" - updateVolumeOptionsModel := vpcClassicService.NewUpdateVolumeOptions(id) + volumePatch := make(map[string]interface{}) + updateVolumeOptionsModel := vpcClassicService.NewUpdateVolumeOptions(id, volumePatch) updateVolumeOptionsModel.SetID("testString") - updateVolumeOptionsModel.SetName("my-volume") + updateVolumeOptionsModel.SetVolumePatch(make(map[string]interface{})) updateVolumeOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVolumeOptionsModel).ToNot(BeNil()) Expect(updateVolumeOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVolumeOptionsModel.Name).To(Equal(core.StringPtr("my-volume"))) + Expect(updateVolumeOptionsModel.VolumePatch).To(Equal(make(map[string]interface{}))) Expect(updateVolumeOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPCAddressPrefixOptions successfully`, func() { // Construct an instance of the UpdateVPCAddressPrefixOptions model vpcID := "testString" id := "testString" - updateVPCAddressPrefixOptionsModel := vpcClassicService.NewUpdateVPCAddressPrefixOptions(vpcID, id) + addressPrefixPatch := make(map[string]interface{}) + updateVPCAddressPrefixOptionsModel := vpcClassicService.NewUpdateVPCAddressPrefixOptions(vpcID, id, addressPrefixPatch) updateVPCAddressPrefixOptionsModel.SetVPCID("testString") updateVPCAddressPrefixOptionsModel.SetID("testString") - updateVPCAddressPrefixOptionsModel.SetName("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.SetIsDefault(false) + updateVPCAddressPrefixOptionsModel.SetAddressPrefixPatch(make(map[string]interface{})) updateVPCAddressPrefixOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPCAddressPrefixOptionsModel).ToNot(BeNil()) Expect(updateVPCAddressPrefixOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(updateVPCAddressPrefixOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPCAddressPrefixOptionsModel.Name).To(Equal(core.StringPtr("my-address-prefix-2"))) - Expect(updateVPCAddressPrefixOptionsModel.IsDefault).To(Equal(core.BoolPtr(false))) + Expect(updateVPCAddressPrefixOptionsModel.AddressPrefixPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPCAddressPrefixOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPCOptions successfully`, func() { // Construct an instance of the UpdateVPCOptions model id := "testString" - updateVPCOptionsModel := vpcClassicService.NewUpdateVPCOptions(id) + vpcPatch := make(map[string]interface{}) + updateVPCOptionsModel := vpcClassicService.NewUpdateVPCOptions(id, vpcPatch) updateVPCOptionsModel.SetID("testString") - updateVPCOptionsModel.SetName("my-vpc") + updateVPCOptionsModel.SetVPCPatch(make(map[string]interface{})) updateVPCOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPCOptionsModel).ToNot(BeNil()) Expect(updateVPCOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPCOptionsModel.Name).To(Equal(core.StringPtr("my-vpc"))) + Expect(updateVPCOptionsModel.VPCPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPCOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPCRouteOptions successfully`, func() { // Construct an instance of the UpdateVPCRouteOptions model vpcID := "testString" id := "testString" - updateVPCRouteOptionsModel := vpcClassicService.NewUpdateVPCRouteOptions(vpcID, id) + routePatch := make(map[string]interface{}) + updateVPCRouteOptionsModel := vpcClassicService.NewUpdateVPCRouteOptions(vpcID, id, routePatch) updateVPCRouteOptionsModel.SetVPCID("testString") updateVPCRouteOptionsModel.SetID("testString") - updateVPCRouteOptionsModel.SetName("my-route-2") + updateVPCRouteOptionsModel.SetRoutePatch(make(map[string]interface{})) updateVPCRouteOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPCRouteOptionsModel).ToNot(BeNil()) Expect(updateVPCRouteOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(updateVPCRouteOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPCRouteOptionsModel.Name).To(Equal(core.StringPtr("my-route-2"))) + Expect(updateVPCRouteOptionsModel.RoutePatch).To(Equal(make(map[string]interface{}))) Expect(updateVPCRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPNGatewayConnectionOptions successfully`, func() { - // Construct an instance of the VPNGatewayConnectionDpdPrototype model - vpnGatewayConnectionDpdPrototypeModel := new(vpcclassicv1.VPNGatewayConnectionDpdPrototype) - Expect(vpnGatewayConnectionDpdPrototypeModel).ToNot(BeNil()) - vpnGatewayConnectionDpdPrototypeModel.Action = core.StringPtr("restart") - vpnGatewayConnectionDpdPrototypeModel.Interval = core.Int64Ptr(int64(30)) - vpnGatewayConnectionDpdPrototypeModel.Timeout = core.Int64Ptr(int64(120)) - Expect(vpnGatewayConnectionDpdPrototypeModel.Action).To(Equal(core.StringPtr("restart"))) - Expect(vpnGatewayConnectionDpdPrototypeModel.Interval).To(Equal(core.Int64Ptr(int64(30)))) - Expect(vpnGatewayConnectionDpdPrototypeModel.Timeout).To(Equal(core.Int64Ptr(int64(120)))) - - // Construct an instance of the IkePolicyIdentityByID model - ikePolicyIdentityModel := new(vpcclassicv1.IkePolicyIdentityByID) - Expect(ikePolicyIdentityModel).ToNot(BeNil()) - ikePolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") - Expect(ikePolicyIdentityModel.ID).To(Equal(core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b"))) - - // Construct an instance of the IPsecPolicyIdentityByID model - iPsecPolicyIdentityModel := new(vpcclassicv1.IPsecPolicyIdentityByID) - Expect(iPsecPolicyIdentityModel).ToNot(BeNil()) - iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") - Expect(iPsecPolicyIdentityModel.ID).To(Equal(core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b"))) - // Construct an instance of the UpdateVPNGatewayConnectionOptions model vpnGatewayID := "testString" id := "testString" - updateVPNGatewayConnectionOptionsModel := vpcClassicService.NewUpdateVPNGatewayConnectionOptions(vpnGatewayID, id) + vpnGatewayConnectionPatch := make(map[string]interface{}) + updateVPNGatewayConnectionOptionsModel := vpcClassicService.NewUpdateVPNGatewayConnectionOptions(vpnGatewayID, id, vpnGatewayConnectionPatch) updateVPNGatewayConnectionOptionsModel.SetVPNGatewayID("testString") updateVPNGatewayConnectionOptionsModel.SetID("testString") - updateVPNGatewayConnectionOptionsModel.SetAdminStateUp(true) - updateVPNGatewayConnectionOptionsModel.SetPeerAddress("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.SetName("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.SetPsk("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.SetDeadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) - updateVPNGatewayConnectionOptionsModel.SetIkePolicy(ikePolicyIdentityModel) - updateVPNGatewayConnectionOptionsModel.SetIpsecPolicy(iPsecPolicyIdentityModel) + updateVPNGatewayConnectionOptionsModel.SetVPNGatewayConnectionPatch(make(map[string]interface{})) updateVPNGatewayConnectionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPNGatewayConnectionOptionsModel).ToNot(BeNil()) Expect(updateVPNGatewayConnectionOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) Expect(updateVPNGatewayConnectionOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPNGatewayConnectionOptionsModel.AdminStateUp).To(Equal(core.BoolPtr(true))) - Expect(updateVPNGatewayConnectionOptionsModel.PeerAddress).To(Equal(core.StringPtr("169.21.50.5"))) - Expect(updateVPNGatewayConnectionOptionsModel.Name).To(Equal(core.StringPtr("my-vpn-connection"))) - Expect(updateVPNGatewayConnectionOptionsModel.Psk).To(Equal(core.StringPtr("lkj14b1oi0alcniejkso"))) - Expect(updateVPNGatewayConnectionOptionsModel.DeadPeerDetection).To(Equal(vpnGatewayConnectionDpdPrototypeModel)) - Expect(updateVPNGatewayConnectionOptionsModel.IkePolicy).To(Equal(ikePolicyIdentityModel)) - Expect(updateVPNGatewayConnectionOptionsModel.IpsecPolicy).To(Equal(iPsecPolicyIdentityModel)) + Expect(updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPNGatewayConnectionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPNGatewayOptions successfully`, func() { // Construct an instance of the UpdateVPNGatewayOptions model id := "testString" - updateVPNGatewayOptionsModel := vpcClassicService.NewUpdateVPNGatewayOptions(id) + vpnGatewayPatch := make(map[string]interface{}) + updateVPNGatewayOptionsModel := vpcClassicService.NewUpdateVPNGatewayOptions(id, vpnGatewayPatch) updateVPNGatewayOptionsModel.SetID("testString") - updateVPNGatewayOptionsModel.SetName("my-vpn-gateway") + updateVPNGatewayOptionsModel.SetVPNGatewayPatch(make(map[string]interface{})) updateVPNGatewayOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPNGatewayOptionsModel).ToNot(BeNil()) Expect(updateVPNGatewayOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPNGatewayOptionsModel.Name).To(Equal(core.StringPtr("my-vpn-gateway"))) + Expect(updateVPNGatewayOptionsModel.VPNGatewayPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPNGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewVolumeAttachmentPrototypeInstanceByImageContext successfully`, func() { @@ -26201,66 +26409,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "all" - model, err := vpcClassicService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "icmp" - model, err := vpcClassicService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "udp" - model, err := vpcClassicService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "all" - model, err := vpcClassicService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "icmp" - model, err := vpcClassicService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "udp" - model, err := vpcClassicService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewOperatingSystemIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64" model, err := vpcClassicService.NewOperatingSystemIdentityByHref(href) @@ -26345,24 +26493,6 @@ var _ = Describe(`VpcClassicV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll successfully`, func() { - direction := "inbound" - model, err := vpcClassicService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp successfully`, func() { - direction := "inbound" - model, err := vpcClassicService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp successfully`, func() { - direction := "inbound" - model, err := vpcClassicService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewSubnetIdentityByCRN successfully`, func() { crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e" model, err := vpcClassicService.NewSubnetIdentityByCRN(crn) diff --git a/vpcv1/vpc_v1.go b/vpcv1/vpc_v1.go index 6672bc9..d72d908 100644 --- a/vpcv1/vpc_v1.go +++ b/vpcv1/vpc_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.12.0-64fe8d3f-20200820-144050 + * IBM OpenAPI SDK Code Generator Version: 3.12.3-81ed37e0-20200929-215851 */ // Package vpcv1 : Operations and models for the VpcV1 service @@ -34,7 +34,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-08-25 +// Version: 2020-10-06 type VpcV1 struct { Service *core.BaseService @@ -110,10 +110,6 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { return } - if options.Version == nil { - options.Version = core.StringPtr("2020-08-25") - } - if options.URL != "" { err = baseService.SetServiceURL(options.URL) if err != nil { @@ -121,6 +117,10 @@ func NewVpcV1(options *VpcV1Options) (service *VpcV1, err error) { } } + if options.Version == nil { + options.Version = core.StringPtr("2020-10-06") + } + service = &VpcV1{ Service: baseService, Version: options.Version, @@ -145,11 +145,8 @@ func (vpc *VpcV1) ListVpcs(listVpcsOptions *ListVpcsOptions) (result *VPCCollect return } - pathSegments := []string{"vpcs"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs`, nil) if err != nil { return } @@ -207,11 +204,8 @@ func (vpc *VpcV1) CreateVPC(createVPCOptions *CreateVPCOptions) (result *VPC, re return } - pathSegments := []string{"vpcs"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs`, nil) if err != nil { return } @@ -282,11 +276,12 @@ func (vpc *VpcV1) DeleteVPC(deleteVPCOptions *DeleteVPCOptions) (response *core. return } - pathSegments := []string{"vpcs"} - pathParameters := []string{*deleteVPCOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteVPCOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { return } @@ -325,11 +320,12 @@ func (vpc *VpcV1) GetVPC(getVPCOptions *GetVPCOptions) (result *VPC, response *c return } - pathSegments := []string{"vpcs"} - pathParameters := []string{*getVPCOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPCOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { return } @@ -378,11 +374,12 @@ func (vpc *VpcV1) UpdateVPC(updateVPCOptions *UpdateVPCOptions) (result *VPC, re return } - pathSegments := []string{"vpcs"} - pathParameters := []string{*updateVPCOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateVPCOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}`, pathParamsMap) if err != nil { return } @@ -396,16 +393,12 @@ func (vpc *VpcV1) UpdateVPC(updateVPCOptions *UpdateVPCOptions) (result *VPC, re builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateVPCOptions.Name != nil { - body["name"] = updateVPCOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPCOptions.VPCPatch) if err != nil { return } @@ -442,11 +435,12 @@ func (vpc *VpcV1) GetVPCDefaultNetworkACL(getVPCDefaultNetworkACLOptions *GetVPC return } - pathSegments := []string{"vpcs", "default_network_acl"} - pathParameters := []string{*getVPCDefaultNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPCDefaultNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_network_acl`, pathParamsMap) if err != nil { return } @@ -496,11 +490,12 @@ func (vpc *VpcV1) GetVPCDefaultSecurityGroup(getVPCDefaultSecurityGroupOptions * return } - pathSegments := []string{"vpcs", "default_security_group"} - pathParameters := []string{*getVPCDefaultSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPCDefaultSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{id}/default_security_group`, pathParamsMap) if err != nil { return } @@ -549,11 +544,12 @@ func (vpc *VpcV1) ListVPCAddressPrefixes(listVPCAddressPrefixesOptions *ListVPCA return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*listVPCAddressPrefixesOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *listVPCAddressPrefixesOptions.VPCID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap) if err != nil { return } @@ -609,11 +605,12 @@ func (vpc *VpcV1) CreateVPCAddressPrefix(createVPCAddressPrefixOptions *CreateVP return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*createVPCAddressPrefixOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *createVPCAddressPrefixOptions.VPCID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes`, pathParamsMap) if err != nil { return } @@ -682,11 +679,13 @@ func (vpc *VpcV1) DeleteVPCAddressPrefix(deleteVPCAddressPrefixOptions *DeleteVP return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*deleteVPCAddressPrefixOptions.VPCID, *deleteVPCAddressPrefixOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *deleteVPCAddressPrefixOptions.VPCID, + "id": *deleteVPCAddressPrefixOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { return } @@ -725,11 +724,13 @@ func (vpc *VpcV1) GetVPCAddressPrefix(getVPCAddressPrefixOptions *GetVPCAddressP return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*getVPCAddressPrefixOptions.VPCID, *getVPCAddressPrefixOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *getVPCAddressPrefixOptions.VPCID, + "id": *getVPCAddressPrefixOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { return } @@ -779,11 +780,13 @@ func (vpc *VpcV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOptions *UpdateVP return } - pathSegments := []string{"vpcs", "address_prefixes"} - pathParameters := []string{*updateVPCAddressPrefixOptions.VPCID, *updateVPCAddressPrefixOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *updateVPCAddressPrefixOptions.VPCID, + "id": *updateVPCAddressPrefixOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/address_prefixes/{id}`, pathParamsMap) if err != nil { return } @@ -797,19 +800,12 @@ func (vpc *VpcV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOptions *UpdateVP builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateVPCAddressPrefixOptions.Name != nil { - body["name"] = updateVPCAddressPrefixOptions.Name - } - if updateVPCAddressPrefixOptions.IsDefault != nil { - body["is_default"] = updateVPCAddressPrefixOptions.IsDefault - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPCAddressPrefixOptions.AddressPrefixPatch) if err != nil { return } @@ -834,10 +830,9 @@ func (vpc *VpcV1) UpdateVPCAddressPrefix(updateVPCAddressPrefixOptions *UpdateVP } // ListVPCRoutes : List all routes in the VPC's default routing table -// This request retrieves routes in the VPC's default routing table. For compatibility, routes with `action` values -// other than `deliver` are omitted. Each route is zone-specific and directs any packets matching its destination CIDR -// block to a `next_hop` IP address. The most specific route matching a packet's destination will be used. If multiple -// equally-specific routes exist, traffic will be distributed across them. +// This request retrieves routes in the VPC's default routing table. Each route is zone-specific and directs any packets +// matching its destination CIDR block to a `next_hop` IP address. The most specific route matching a packet's +// destination will be used. If multiple equally-specific routes exist, traffic will be distributed across them. func (vpc *VpcV1) ListVPCRoutes(listVPCRoutesOptions *ListVPCRoutesOptions) (result *RouteCollection, response *core.DetailedResponse, err error) { err = core.ValidateNotNil(listVPCRoutesOptions, "listVPCRoutesOptions cannot be nil") if err != nil { @@ -848,11 +843,12 @@ func (vpc *VpcV1) ListVPCRoutes(listVPCRoutesOptions *ListVPCRoutesOptions) (res return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*listVPCRoutesOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *listVPCRoutesOptions.VPCID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap) if err != nil { return } @@ -906,11 +902,12 @@ func (vpc *VpcV1) CreateVPCRoute(createVPCRouteOptions *CreateVPCRouteOptions) ( return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*createVPCRouteOptions.VPCID} + pathParamsMap := map[string]string{ + "vpc_id": *createVPCRouteOptions.VPCID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes`, pathParamsMap) if err != nil { return } @@ -978,11 +975,13 @@ func (vpc *VpcV1) DeleteVPCRoute(deleteVPCRouteOptions *DeleteVPCRouteOptions) ( return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*deleteVPCRouteOptions.VPCID, *deleteVPCRouteOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *deleteVPCRouteOptions.VPCID, + "id": *deleteVPCRouteOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { return } @@ -1021,11 +1020,13 @@ func (vpc *VpcV1) GetVPCRoute(getVPCRouteOptions *GetVPCRouteOptions) (result *R return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*getVPCRouteOptions.VPCID, *getVPCRouteOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *getVPCRouteOptions.VPCID, + "id": *getVPCRouteOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { return } @@ -1075,11 +1076,13 @@ func (vpc *VpcV1) UpdateVPCRoute(updateVPCRouteOptions *UpdateVPCRouteOptions) ( return } - pathSegments := []string{"vpcs", "routes"} - pathParameters := []string{*updateVPCRouteOptions.VPCID, *updateVPCRouteOptions.ID} + pathParamsMap := map[string]string{ + "vpc_id": *updateVPCRouteOptions.VPCID, + "id": *updateVPCRouteOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpcs/{vpc_id}/routes/{id}`, pathParamsMap) if err != nil { return } @@ -1093,16 +1096,12 @@ func (vpc *VpcV1) UpdateVPCRoute(updateVPCRouteOptions *UpdateVPCRouteOptions) ( builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateVPCRouteOptions.Name != nil { - body["name"] = updateVPCRouteOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPCRouteOptions.RoutePatch) if err != nil { return } @@ -1135,11 +1134,8 @@ func (vpc *VpcV1) ListSubnets(listSubnetsOptions *ListSubnetsOptions) (result *S return } - pathSegments := []string{"subnets"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets`, nil) if err != nil { return } @@ -1199,11 +1195,8 @@ func (vpc *VpcV1) CreateSubnet(createSubnetOptions *CreateSubnetOptions) (result return } - pathSegments := []string{"subnets"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets`, nil) if err != nil { return } @@ -1262,11 +1255,12 @@ func (vpc *VpcV1) DeleteSubnet(deleteSubnetOptions *DeleteSubnetOptions) (respon return } - pathSegments := []string{"subnets"} - pathParameters := []string{*deleteSubnetOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteSubnetOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { return } @@ -1305,11 +1299,12 @@ func (vpc *VpcV1) GetSubnet(getSubnetOptions *GetSubnetOptions) (result *Subnet, return } - pathSegments := []string{"subnets"} - pathParameters := []string{*getSubnetOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSubnetOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { return } @@ -1359,11 +1354,12 @@ func (vpc *VpcV1) UpdateSubnet(updateSubnetOptions *UpdateSubnetOptions) (result return } - pathSegments := []string{"subnets"} - pathParameters := []string{*updateSubnetOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateSubnetOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}`, pathParamsMap) if err != nil { return } @@ -1377,22 +1373,12 @@ func (vpc *VpcV1) UpdateSubnet(updateSubnetOptions *UpdateSubnetOptions) (result builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateSubnetOptions.Name != nil { - body["name"] = updateSubnetOptions.Name - } - if updateSubnetOptions.NetworkACL != nil { - body["network_acl"] = updateSubnetOptions.NetworkACL - } - if updateSubnetOptions.PublicGateway != nil { - body["public_gateway"] = updateSubnetOptions.PublicGateway - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateSubnetOptions.SubnetPatch) if err != nil { return } @@ -1428,11 +1414,12 @@ func (vpc *VpcV1) GetSubnetNetworkACL(getSubnetNetworkACLOptions *GetSubnetNetwo return } - pathSegments := []string{"subnets", "network_acl"} - pathParameters := []string{*getSubnetNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSubnetNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap) if err != nil { return } @@ -1482,11 +1469,12 @@ func (vpc *VpcV1) ReplaceSubnetNetworkACL(replaceSubnetNetworkACLOptions *Replac return } - pathSegments := []string{"subnets", "network_acl"} - pathParameters := []string{*replaceSubnetNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *replaceSubnetNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/network_acl`, pathParamsMap) if err != nil { return } @@ -1541,11 +1529,12 @@ func (vpc *VpcV1) UnsetSubnetPublicGateway(unsetSubnetPublicGatewayOptions *Unse return } - pathSegments := []string{"subnets", "public_gateway"} - pathParameters := []string{*unsetSubnetPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *unsetSubnetPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { return } @@ -1584,11 +1573,12 @@ func (vpc *VpcV1) GetSubnetPublicGateway(getSubnetPublicGatewayOptions *GetSubne return } - pathSegments := []string{"subnets", "public_gateway"} - pathParameters := []string{*getSubnetPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSubnetPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { return } @@ -1638,11 +1628,12 @@ func (vpc *VpcV1) SetSubnetPublicGateway(setSubnetPublicGatewayOptions *SetSubne return } - pathSegments := []string{"subnets", "public_gateway"} - pathParameters := []string{*setSubnetPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *setSubnetPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/subnets/{id}/public_gateway`, pathParamsMap) if err != nil { return } @@ -1688,17 +1679,17 @@ func (vpc *VpcV1) SetSubnetPublicGateway(setSubnetPublicGatewayOptions *SetSubne // ListImages : List all images // This request lists all provisionable images available in the region. An image provides source data for a volume. // Images are either system-provided, or created from another source, such as importing from object storage. +// +// The images will be sorted by their `created_at` property values, with the newest first. Images with identical +// `created_at` values will be secondarily sorted by ascending `id` property values. func (vpc *VpcV1) ListImages(listImagesOptions *ListImagesOptions) (result *ImageCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listImagesOptions, "listImagesOptions") if err != nil { return } - pathSegments := []string{"images"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images`, nil) if err != nil { return } @@ -1764,11 +1755,8 @@ func (vpc *VpcV1) CreateImage(createImageOptions *CreateImageOptions) (result *I return } - pathSegments := []string{"images"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images`, nil) if err != nil { return } @@ -1824,11 +1812,12 @@ func (vpc *VpcV1) DeleteImage(deleteImageOptions *DeleteImageOptions) (response return } - pathSegments := []string{"images"} - pathParameters := []string{*deleteImageOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteImageOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { return } @@ -1867,11 +1856,12 @@ func (vpc *VpcV1) GetImage(getImageOptions *GetImageOptions) (result *Image, res return } - pathSegments := []string{"images"} - pathParameters := []string{*getImageOptions.ID} + pathParamsMap := map[string]string{ + "id": *getImageOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { return } @@ -1922,11 +1912,12 @@ func (vpc *VpcV1) UpdateImage(updateImageOptions *UpdateImageOptions) (result *I return } - pathSegments := []string{"images"} - pathParameters := []string{*updateImageOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateImageOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/images/{id}`, pathParamsMap) if err != nil { return } @@ -1940,16 +1931,12 @@ func (vpc *VpcV1) UpdateImage(updateImageOptions *UpdateImageOptions) (result *I builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateImageOptions.Name != nil { - body["name"] = updateImageOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateImageOptions.ImagePatch) if err != nil { return } @@ -1981,11 +1968,8 @@ func (vpc *VpcV1) ListOperatingSystems(listOperatingSystemsOptions *ListOperatin return } - pathSegments := []string{"operating_systems"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/operating_systems`, nil) if err != nil { return } @@ -2040,11 +2024,12 @@ func (vpc *VpcV1) GetOperatingSystem(getOperatingSystemOptions *GetOperatingSyst return } - pathSegments := []string{"operating_systems"} - pathParameters := []string{*getOperatingSystemOptions.Name} + pathParamsMap := map[string]string{ + "name": *getOperatingSystemOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/operating_systems/{name}`, pathParamsMap) if err != nil { return } @@ -2090,11 +2075,8 @@ func (vpc *VpcV1) ListKeys(listKeysOptions *ListKeysOptions) (result *KeyCollect return } - pathSegments := []string{"keys"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys`, nil) if err != nil { return } @@ -2148,11 +2130,8 @@ func (vpc *VpcV1) CreateKey(createKeyOptions *CreateKeyOptions) (result *Key, re return } - pathSegments := []string{"keys"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys`, nil) if err != nil { return } @@ -2220,11 +2199,12 @@ func (vpc *VpcV1) DeleteKey(deleteKeyOptions *DeleteKeyOptions) (response *core. return } - pathSegments := []string{"keys"} - pathParameters := []string{*deleteKeyOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteKeyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { return } @@ -2263,11 +2243,12 @@ func (vpc *VpcV1) GetKey(getKeyOptions *GetKeyOptions) (result *Key, response *c return } - pathSegments := []string{"keys"} - pathParameters := []string{*getKeyOptions.ID} + pathParamsMap := map[string]string{ + "id": *getKeyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { return } @@ -2316,11 +2297,12 @@ func (vpc *VpcV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (result *Key, re return } - pathSegments := []string{"keys"} - pathParameters := []string{*updateKeyOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateKeyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/keys/{id}`, pathParamsMap) if err != nil { return } @@ -2334,16 +2316,12 @@ func (vpc *VpcV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (result *Key, re builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateKeyOptions.Name != nil { - body["name"] = updateKeyOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateKeyOptions.KeyPatch) if err != nil { return } @@ -2368,19 +2346,14 @@ func (vpc *VpcV1) UpdateKey(updateKeyOptions *UpdateKeyOptions) (result *Key, re } // ListInstanceProfiles : List all instance profiles -// This request lists all instance profiles available in the region. An instance profile specifies the performance -// characteristics and pricing model for an instance. func (vpc *VpcV1) ListInstanceProfiles(listInstanceProfilesOptions *ListInstanceProfilesOptions) (result *InstanceProfileCollection, response *core.DetailedResponse, err error) { err = core.ValidateStruct(listInstanceProfilesOptions, "listInstanceProfilesOptions") if err != nil { return } - pathSegments := []string{"instance/profiles"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/profiles`, nil) if err != nil { return } @@ -2429,11 +2402,12 @@ func (vpc *VpcV1) GetInstanceProfile(getInstanceProfileOptions *GetInstanceProfi return } - pathSegments := []string{"instance/profiles"} - pathParameters := []string{*getInstanceProfileOptions.Name} + pathParamsMap := map[string]string{ + "name": *getInstanceProfileOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/profiles/{name}`, pathParamsMap) if err != nil { return } @@ -2477,11 +2451,8 @@ func (vpc *VpcV1) ListInstanceTemplates(listInstanceTemplatesOptions *ListInstan return } - pathSegments := []string{"instance/templates"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates`, nil) if err != nil { return } @@ -2530,11 +2501,8 @@ func (vpc *VpcV1) CreateInstanceTemplate(createInstanceTemplateOptions *CreateIn return } - pathSegments := []string{"instance/templates"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates`, nil) if err != nil { return } @@ -2589,11 +2557,12 @@ func (vpc *VpcV1) DeleteInstanceTemplate(deleteInstanceTemplateOptions *DeleteIn return } - pathSegments := []string{"instance/templates"} - pathParameters := []string{*deleteInstanceTemplateOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteInstanceTemplateOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap) if err != nil { return } @@ -2631,11 +2600,12 @@ func (vpc *VpcV1) GetInstanceTemplate(getInstanceTemplateOptions *GetInstanceTem return } - pathSegments := []string{"instance/templates"} - pathParameters := []string{*getInstanceTemplateOptions.ID} + pathParamsMap := map[string]string{ + "id": *getInstanceTemplateOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap) if err != nil { return } @@ -2686,11 +2656,12 @@ func (vpc *VpcV1) UpdateInstanceTemplate(updateInstanceTemplateOptions *UpdateIn return } - pathSegments := []string{"instance/templates"} - pathParameters := []string{*updateInstanceTemplateOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateInstanceTemplateOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance/templates/{id}`, pathParamsMap) if err != nil { return } @@ -2704,16 +2675,12 @@ func (vpc *VpcV1) UpdateInstanceTemplate(updateInstanceTemplateOptions *UpdateIn builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceTemplateOptions.Name != nil { - body["name"] = updateInstanceTemplateOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceTemplateOptions.InstanceTemplatePatch) if err != nil { return } @@ -2745,11 +2712,8 @@ func (vpc *VpcV1) ListInstances(listInstancesOptions *ListInstancesOptions) (res return } - pathSegments := []string{"instances"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances`, nil) if err != nil { return } @@ -2821,11 +2785,8 @@ func (vpc *VpcV1) CreateInstance(createInstanceOptions *CreateInstanceOptions) ( return } - pathSegments := []string{"instances"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances`, nil) if err != nil { return } @@ -2882,11 +2843,12 @@ func (vpc *VpcV1) DeleteInstance(deleteInstanceOptions *DeleteInstanceOptions) ( return } - pathSegments := []string{"instances"} - pathParameters := []string{*deleteInstanceOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteInstanceOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { return } @@ -2925,11 +2887,12 @@ func (vpc *VpcV1) GetInstance(getInstanceOptions *GetInstanceOptions) (result *I return } - pathSegments := []string{"instances"} - pathParameters := []string{*getInstanceOptions.ID} + pathParamsMap := map[string]string{ + "id": *getInstanceOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { return } @@ -2979,11 +2942,12 @@ func (vpc *VpcV1) UpdateInstance(updateInstanceOptions *UpdateInstanceOptions) ( return } - pathSegments := []string{"instances"} - pathParameters := []string{*updateInstanceOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateInstanceOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}`, pathParamsMap) if err != nil { return } @@ -2997,16 +2961,12 @@ func (vpc *VpcV1) UpdateInstance(updateInstanceOptions *UpdateInstanceOptions) ( builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceOptions.Name != nil { - body["name"] = updateInstanceOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceOptions.InstancePatch) if err != nil { return } @@ -3043,11 +3003,12 @@ func (vpc *VpcV1) GetInstanceInitialization(getInstanceInitializationOptions *Ge return } - pathSegments := []string{"instances", "initialization"} - pathParameters := []string{*getInstanceInitializationOptions.ID} + pathParamsMap := map[string]string{ + "id": *getInstanceInitializationOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{id}/initialization`, pathParamsMap) if err != nil { return } @@ -3097,11 +3058,12 @@ func (vpc *VpcV1) CreateInstanceAction(createInstanceActionOptions *CreateInstan return } - pathSegments := []string{"instances", "actions"} - pathParameters := []string{*createInstanceActionOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *createInstanceActionOptions.InstanceID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/actions`, pathParamsMap) if err != nil { return } @@ -3166,11 +3128,12 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaces(listInstanceNetworkInterfacesOpt return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*listInstanceNetworkInterfacesOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *listInstanceNetworkInterfacesOptions.InstanceID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap) if err != nil { return } @@ -3222,11 +3185,12 @@ func (vpc *VpcV1) CreateInstanceNetworkInterface(createInstanceNetworkInterfaceO return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*createInstanceNetworkInterfaceOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *createInstanceNetworkInterfaceOptions.InstanceID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces`, pathParamsMap) if err != nil { return } @@ -3296,11 +3260,13 @@ func (vpc *VpcV1) DeleteInstanceNetworkInterface(deleteInstanceNetworkInterfaceO return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*deleteInstanceNetworkInterfaceOptions.InstanceID, *deleteInstanceNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *deleteInstanceNetworkInterfaceOptions.InstanceID, + "id": *deleteInstanceNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -3339,11 +3305,13 @@ func (vpc *VpcV1) GetInstanceNetworkInterface(getInstanceNetworkInterfaceOptions return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*getInstanceNetworkInterfaceOptions.InstanceID, *getInstanceNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *getInstanceNetworkInterfaceOptions.InstanceID, + "id": *getInstanceNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -3394,11 +3362,13 @@ func (vpc *VpcV1) UpdateInstanceNetworkInterface(updateInstanceNetworkInterfaceO return } - pathSegments := []string{"instances", "network_interfaces"} - pathParameters := []string{*updateInstanceNetworkInterfaceOptions.InstanceID, *updateInstanceNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *updateInstanceNetworkInterfaceOptions.InstanceID, + "id": *updateInstanceNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -3412,16 +3382,12 @@ func (vpc *VpcV1) UpdateInstanceNetworkInterface(updateInstanceNetworkInterfaceO builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceNetworkInterfaceOptions.Name != nil { - body["name"] = updateInstanceNetworkInterfaceOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceNetworkInterfaceOptions.NetworkInterfacePatch) if err != nil { return } @@ -3457,11 +3423,13 @@ func (vpc *VpcV1) ListInstanceNetworkInterfaceFloatingIps(listInstanceNetworkInt return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*listInstanceNetworkInterfaceFloatingIpsOptions.InstanceID, *listInstanceNetworkInterfaceFloatingIpsOptions.NetworkInterfaceID} + pathParamsMap := map[string]string{ + "instance_id": *listInstanceNetworkInterfaceFloatingIpsOptions.InstanceID, + "network_interface_id": *listInstanceNetworkInterfaceFloatingIpsOptions.NetworkInterfaceID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips`, pathParamsMap) if err != nil { return } @@ -3510,11 +3478,14 @@ func (vpc *VpcV1) RemoveInstanceNetworkInterfaceFloatingIP(removeInstanceNetwork return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*removeInstanceNetworkInterfaceFloatingIPOptions.InstanceID, *removeInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, *removeInstanceNetworkInterfaceFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *removeInstanceNetworkInterfaceFloatingIPOptions.InstanceID, + "network_interface_id": *removeInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, + "id": *removeInstanceNetworkInterfaceFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -3554,11 +3525,14 @@ func (vpc *VpcV1) GetInstanceNetworkInterfaceFloatingIP(getInstanceNetworkInterf return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*getInstanceNetworkInterfaceFloatingIPOptions.InstanceID, *getInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, *getInstanceNetworkInterfaceFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *getInstanceNetworkInterfaceFloatingIPOptions.InstanceID, + "network_interface_id": *getInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, + "id": *getInstanceNetworkInterfaceFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -3609,11 +3583,14 @@ func (vpc *VpcV1) AddInstanceNetworkInterfaceFloatingIP(addInstanceNetworkInterf return } - pathSegments := []string{"instances", "network_interfaces", "floating_ips"} - pathParameters := []string{*addInstanceNetworkInterfaceFloatingIPOptions.InstanceID, *addInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, *addInstanceNetworkInterfaceFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *addInstanceNetworkInterfaceFloatingIPOptions.InstanceID, + "network_interface_id": *addInstanceNetworkInterfaceFloatingIPOptions.NetworkInterfaceID, + "id": *addInstanceNetworkInterfaceFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/network_interfaces/{network_interface_id}/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -3664,11 +3641,12 @@ func (vpc *VpcV1) ListInstanceVolumeAttachments(listInstanceVolumeAttachmentsOpt return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*listInstanceVolumeAttachmentsOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *listInstanceVolumeAttachmentsOptions.InstanceID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap) if err != nil { return } @@ -3719,11 +3697,12 @@ func (vpc *VpcV1) CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentO return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*createInstanceVolumeAttachmentOptions.InstanceID} + pathParamsMap := map[string]string{ + "instance_id": *createInstanceVolumeAttachmentOptions.InstanceID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments`, pathParamsMap) if err != nil { return } @@ -3746,12 +3725,12 @@ func (vpc *VpcV1) CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentO if createInstanceVolumeAttachmentOptions.Volume != nil { body["volume"] = createInstanceVolumeAttachmentOptions.Volume } - if createInstanceVolumeAttachmentOptions.Name != nil { - body["name"] = createInstanceVolumeAttachmentOptions.Name - } if createInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete != nil { body["delete_volume_on_instance_delete"] = createInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete } + if createInstanceVolumeAttachmentOptions.Name != nil { + body["name"] = createInstanceVolumeAttachmentOptions.Name + } _, err = builder.SetBodyContentJSON(body) if err != nil { return @@ -3788,11 +3767,13 @@ func (vpc *VpcV1) DeleteInstanceVolumeAttachment(deleteInstanceVolumeAttachmentO return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*deleteInstanceVolumeAttachmentOptions.InstanceID, *deleteInstanceVolumeAttachmentOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *deleteInstanceVolumeAttachmentOptions.InstanceID, + "id": *deleteInstanceVolumeAttachmentOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { return } @@ -3831,11 +3812,13 @@ func (vpc *VpcV1) GetInstanceVolumeAttachment(getInstanceVolumeAttachmentOptions return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*getInstanceVolumeAttachmentOptions.InstanceID, *getInstanceVolumeAttachmentOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *getInstanceVolumeAttachmentOptions.InstanceID, + "id": *getInstanceVolumeAttachmentOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { return } @@ -3886,11 +3869,13 @@ func (vpc *VpcV1) UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentO return } - pathSegments := []string{"instances", "volume_attachments"} - pathParameters := []string{*updateInstanceVolumeAttachmentOptions.InstanceID, *updateInstanceVolumeAttachmentOptions.ID} + pathParamsMap := map[string]string{ + "instance_id": *updateInstanceVolumeAttachmentOptions.InstanceID, + "id": *updateInstanceVolumeAttachmentOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instances/{instance_id}/volume_attachments/{id}`, pathParamsMap) if err != nil { return } @@ -3904,19 +3889,12 @@ func (vpc *VpcV1) UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentO builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceVolumeAttachmentOptions.Name != nil { - body["name"] = updateInstanceVolumeAttachmentOptions.Name - } - if updateInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete != nil { - body["delete_volume_on_instance_delete"] = updateInstanceVolumeAttachmentOptions.DeleteVolumeOnInstanceDelete - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceVolumeAttachmentOptions.VolumeAttachmentPatch) if err != nil { return } @@ -3947,11 +3925,8 @@ func (vpc *VpcV1) ListInstanceGroups(listInstanceGroupsOptions *ListInstanceGrou return } - pathSegments := []string{"instance_groups"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups`, nil) if err != nil { return } @@ -4006,11 +3981,8 @@ func (vpc *VpcV1) CreateInstanceGroup(createInstanceGroupOptions *CreateInstance return } - pathSegments := []string{"instance_groups"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups`, nil) if err != nil { return } @@ -4091,11 +4063,12 @@ func (vpc *VpcV1) DeleteInstanceGroup(deleteInstanceGroupOptions *DeleteInstance return } - pathSegments := []string{"instance_groups"} - pathParameters := []string{*deleteInstanceGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteInstanceGroupOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap) if err != nil { return } @@ -4134,11 +4107,12 @@ func (vpc *VpcV1) GetInstanceGroup(getInstanceGroupOptions *GetInstanceGroupOpti return } - pathSegments := []string{"instance_groups"} - pathParameters := []string{*getInstanceGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *getInstanceGroupOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap) if err != nil { return } @@ -4188,11 +4162,12 @@ func (vpc *VpcV1) UpdateInstanceGroup(updateInstanceGroupOptions *UpdateInstance return } - pathSegments := []string{"instance_groups"} - pathParameters := []string{*updateInstanceGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateInstanceGroupOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{id}`, pathParamsMap) if err != nil { return } @@ -4206,34 +4181,12 @@ func (vpc *VpcV1) UpdateInstanceGroup(updateInstanceGroupOptions *UpdateInstance builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceGroupOptions.Name != nil { - body["name"] = updateInstanceGroupOptions.Name - } - if updateInstanceGroupOptions.MembershipCount != nil { - body["membership_count"] = updateInstanceGroupOptions.MembershipCount - } - if updateInstanceGroupOptions.InstanceTemplate != nil { - body["instance_template"] = updateInstanceGroupOptions.InstanceTemplate - } - if updateInstanceGroupOptions.Subnets != nil { - body["subnets"] = updateInstanceGroupOptions.Subnets - } - if updateInstanceGroupOptions.ApplicationPort != nil { - body["application_port"] = updateInstanceGroupOptions.ApplicationPort - } - if updateInstanceGroupOptions.LoadBalancer != nil { - body["load_balancer"] = updateInstanceGroupOptions.LoadBalancer - } - if updateInstanceGroupOptions.LoadBalancerPool != nil { - body["load_balancer_pool"] = updateInstanceGroupOptions.LoadBalancerPool - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceGroupOptions.InstanceGroupPatch) if err != nil { return } @@ -4269,11 +4222,12 @@ func (vpc *VpcV1) DeleteInstanceGroupLoadBalancer(deleteInstanceGroupLoadBalance return } - pathSegments := []string{"instance_groups", "load_balancer"} - pathParameters := []string{*deleteInstanceGroupLoadBalancerOptions.InstanceGroupID} + pathParamsMap := map[string]string{ + "instance_group_id": *deleteInstanceGroupLoadBalancerOptions.InstanceGroupID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/load_balancer`, pathParamsMap) if err != nil { return } @@ -4312,11 +4266,12 @@ func (vpc *VpcV1) ListInstanceGroupManagers(listInstanceGroupManagersOptions *Li return } - pathSegments := []string{"instance_groups", "managers"} - pathParameters := []string{*listInstanceGroupManagersOptions.InstanceGroupID} + pathParamsMap := map[string]string{ + "instance_group_id": *listInstanceGroupManagersOptions.InstanceGroupID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers`, pathParamsMap) if err != nil { return } @@ -4365,11 +4320,12 @@ func (vpc *VpcV1) CreateInstanceGroupManager(createInstanceGroupManagerOptions * return } - pathSegments := []string{"instance_groups", "managers"} - pathParameters := []string{*createInstanceGroupManagerOptions.InstanceGroupID} + pathParamsMap := map[string]string{ + "instance_group_id": *createInstanceGroupManagerOptions.InstanceGroupID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers`, pathParamsMap) if err != nil { return } @@ -4424,11 +4380,13 @@ func (vpc *VpcV1) DeleteInstanceGroupManager(deleteInstanceGroupManagerOptions * return } - pathSegments := []string{"instance_groups", "managers"} - pathParameters := []string{*deleteInstanceGroupManagerOptions.InstanceGroupID, *deleteInstanceGroupManagerOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *deleteInstanceGroupManagerOptions.InstanceGroupID, + "id": *deleteInstanceGroupManagerOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap) if err != nil { return } @@ -4467,11 +4425,13 @@ func (vpc *VpcV1) GetInstanceGroupManager(getInstanceGroupManagerOptions *GetIns return } - pathSegments := []string{"instance_groups", "managers"} - pathParameters := []string{*getInstanceGroupManagerOptions.InstanceGroupID, *getInstanceGroupManagerOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *getInstanceGroupManagerOptions.InstanceGroupID, + "id": *getInstanceGroupManagerOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap) if err != nil { return } @@ -4520,11 +4480,13 @@ func (vpc *VpcV1) UpdateInstanceGroupManager(updateInstanceGroupManagerOptions * return } - pathSegments := []string{"instance_groups", "managers"} - pathParameters := []string{*updateInstanceGroupManagerOptions.InstanceGroupID, *updateInstanceGroupManagerOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *updateInstanceGroupManagerOptions.InstanceGroupID, + "id": *updateInstanceGroupManagerOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{id}`, pathParamsMap) if err != nil { return } @@ -4538,31 +4500,12 @@ func (vpc *VpcV1) UpdateInstanceGroupManager(updateInstanceGroupManagerOptions * builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceGroupManagerOptions.Name != nil { - body["name"] = updateInstanceGroupManagerOptions.Name - } - if updateInstanceGroupManagerOptions.ManagementEnabled != nil { - body["management_enabled"] = updateInstanceGroupManagerOptions.ManagementEnabled - } - if updateInstanceGroupManagerOptions.AggregationWindow != nil { - body["aggregation_window"] = updateInstanceGroupManagerOptions.AggregationWindow - } - if updateInstanceGroupManagerOptions.Cooldown != nil { - body["cooldown"] = updateInstanceGroupManagerOptions.Cooldown - } - if updateInstanceGroupManagerOptions.MaxMembershipCount != nil { - body["max_membership_count"] = updateInstanceGroupManagerOptions.MaxMembershipCount - } - if updateInstanceGroupManagerOptions.MinMembershipCount != nil { - body["min_membership_count"] = updateInstanceGroupManagerOptions.MinMembershipCount - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceGroupManagerOptions.InstanceGroupManagerPatch) if err != nil { return } @@ -4597,11 +4540,13 @@ func (vpc *VpcV1) ListInstanceGroupManagerPolicies(listInstanceGroupManagerPolic return } - pathSegments := []string{"instance_groups", "managers", "policies"} - pathParameters := []string{*listInstanceGroupManagerPoliciesOptions.InstanceGroupID, *listInstanceGroupManagerPoliciesOptions.InstanceGroupManagerID} + pathParamsMap := map[string]string{ + "instance_group_id": *listInstanceGroupManagerPoliciesOptions.InstanceGroupID, + "instance_group_manager_id": *listInstanceGroupManagerPoliciesOptions.InstanceGroupManagerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies`, pathParamsMap) if err != nil { return } @@ -4650,11 +4595,13 @@ func (vpc *VpcV1) CreateInstanceGroupManagerPolicy(createInstanceGroupManagerPol return } - pathSegments := []string{"instance_groups", "managers", "policies"} - pathParameters := []string{*createInstanceGroupManagerPolicyOptions.InstanceGroupID, *createInstanceGroupManagerPolicyOptions.InstanceGroupManagerID} + pathParamsMap := map[string]string{ + "instance_group_id": *createInstanceGroupManagerPolicyOptions.InstanceGroupID, + "instance_group_manager_id": *createInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies`, pathParamsMap) if err != nil { return } @@ -4709,11 +4656,14 @@ func (vpc *VpcV1) DeleteInstanceGroupManagerPolicy(deleteInstanceGroupManagerPol return } - pathSegments := []string{"instance_groups", "managers", "policies"} - pathParameters := []string{*deleteInstanceGroupManagerPolicyOptions.InstanceGroupID, *deleteInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, *deleteInstanceGroupManagerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *deleteInstanceGroupManagerPolicyOptions.InstanceGroupID, + "instance_group_manager_id": *deleteInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, + "id": *deleteInstanceGroupManagerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -4752,11 +4702,14 @@ func (vpc *VpcV1) GetInstanceGroupManagerPolicy(getInstanceGroupManagerPolicyOpt return } - pathSegments := []string{"instance_groups", "managers", "policies"} - pathParameters := []string{*getInstanceGroupManagerPolicyOptions.InstanceGroupID, *getInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, *getInstanceGroupManagerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *getInstanceGroupManagerPolicyOptions.InstanceGroupID, + "instance_group_manager_id": *getInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, + "id": *getInstanceGroupManagerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -4805,11 +4758,14 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerPolicy(updateInstanceGroupManagerPol return } - pathSegments := []string{"instance_groups", "managers", "policies"} - pathParameters := []string{*updateInstanceGroupManagerPolicyOptions.InstanceGroupID, *updateInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, *updateInstanceGroupManagerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *updateInstanceGroupManagerPolicyOptions.InstanceGroupID, + "instance_group_manager_id": *updateInstanceGroupManagerPolicyOptions.InstanceGroupManagerID, + "id": *updateInstanceGroupManagerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -4823,22 +4779,12 @@ func (vpc *VpcV1) UpdateInstanceGroupManagerPolicy(updateInstanceGroupManagerPol builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceGroupManagerPolicyOptions.Name != nil { - body["name"] = updateInstanceGroupManagerPolicyOptions.Name - } - if updateInstanceGroupManagerPolicyOptions.MetricType != nil { - body["metric_type"] = updateInstanceGroupManagerPolicyOptions.MetricType - } - if updateInstanceGroupManagerPolicyOptions.MetricValue != nil { - body["metric_value"] = updateInstanceGroupManagerPolicyOptions.MetricValue - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceGroupManagerPolicyOptions.InstanceGroupManagerPolicyPatch) if err != nil { return } @@ -4875,11 +4821,12 @@ func (vpc *VpcV1) DeleteInstanceGroupMemberships(deleteInstanceGroupMembershipsO return } - pathSegments := []string{"instance_groups", "memberships"} - pathParameters := []string{*deleteInstanceGroupMembershipsOptions.InstanceGroupID} + pathParamsMap := map[string]string{ + "instance_group_id": *deleteInstanceGroupMembershipsOptions.InstanceGroupID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships`, pathParamsMap) if err != nil { return } @@ -4917,11 +4864,12 @@ func (vpc *VpcV1) ListInstanceGroupMemberships(listInstanceGroupMembershipsOptio return } - pathSegments := []string{"instance_groups", "memberships"} - pathParameters := []string{*listInstanceGroupMembershipsOptions.InstanceGroupID} + pathParamsMap := map[string]string{ + "instance_group_id": *listInstanceGroupMembershipsOptions.InstanceGroupID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships`, pathParamsMap) if err != nil { return } @@ -4971,11 +4919,13 @@ func (vpc *VpcV1) DeleteInstanceGroupMembership(deleteInstanceGroupMembershipOpt return } - pathSegments := []string{"instance_groups", "memberships"} - pathParameters := []string{*deleteInstanceGroupMembershipOptions.InstanceGroupID, *deleteInstanceGroupMembershipOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *deleteInstanceGroupMembershipOptions.InstanceGroupID, + "id": *deleteInstanceGroupMembershipOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap) if err != nil { return } @@ -5014,11 +4964,13 @@ func (vpc *VpcV1) GetInstanceGroupMembership(getInstanceGroupMembershipOptions * return } - pathSegments := []string{"instance_groups", "memberships"} - pathParameters := []string{*getInstanceGroupMembershipOptions.InstanceGroupID, *getInstanceGroupMembershipOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *getInstanceGroupMembershipOptions.InstanceGroupID, + "id": *getInstanceGroupMembershipOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap) if err != nil { return } @@ -5067,11 +5019,13 @@ func (vpc *VpcV1) UpdateInstanceGroupMembership(updateInstanceGroupMembershipOpt return } - pathSegments := []string{"instance_groups", "memberships"} - pathParameters := []string{*updateInstanceGroupMembershipOptions.InstanceGroupID, *updateInstanceGroupMembershipOptions.ID} + pathParamsMap := map[string]string{ + "instance_group_id": *updateInstanceGroupMembershipOptions.InstanceGroupID, + "id": *updateInstanceGroupMembershipOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/instance_groups/{instance_group_id}/memberships/{id}`, pathParamsMap) if err != nil { return } @@ -5085,16 +5039,12 @@ func (vpc *VpcV1) UpdateInstanceGroupMembership(updateInstanceGroupMembershipOpt builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateInstanceGroupMembershipOptions.Name != nil { - body["name"] = updateInstanceGroupMembershipOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateInstanceGroupMembershipOptions.InstanceGroupMembershipPatch) if err != nil { return } @@ -5127,11 +5077,8 @@ func (vpc *VpcV1) ListVolumeProfiles(listVolumeProfilesOptions *ListVolumeProfil return } - pathSegments := []string{"volume/profiles"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volume/profiles`, nil) if err != nil { return } @@ -5186,11 +5133,12 @@ func (vpc *VpcV1) GetVolumeProfile(getVolumeProfileOptions *GetVolumeProfileOpti return } - pathSegments := []string{"volume/profiles"} - pathParameters := []string{*getVolumeProfileOptions.Name} + pathParamsMap := map[string]string{ + "name": *getVolumeProfileOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volume/profiles/{name}`, pathParamsMap) if err != nil { return } @@ -5236,11 +5184,8 @@ func (vpc *VpcV1) ListVolumes(listVolumesOptions *ListVolumesOptions) (result *V return } - pathSegments := []string{"volumes"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes`, nil) if err != nil { return } @@ -5302,11 +5247,8 @@ func (vpc *VpcV1) CreateVolume(createVolumeOptions *CreateVolumeOptions) (result return } - pathSegments := []string{"volumes"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes`, nil) if err != nil { return } @@ -5362,11 +5304,12 @@ func (vpc *VpcV1) DeleteVolume(deleteVolumeOptions *DeleteVolumeOptions) (respon return } - pathSegments := []string{"volumes"} - pathParameters := []string{*deleteVolumeOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteVolumeOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { return } @@ -5405,11 +5348,12 @@ func (vpc *VpcV1) GetVolume(getVolumeOptions *GetVolumeOptions) (result *Volume, return } - pathSegments := []string{"volumes"} - pathParameters := []string{*getVolumeOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVolumeOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { return } @@ -5459,11 +5403,12 @@ func (vpc *VpcV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOptions) (result return } - pathSegments := []string{"volumes"} - pathParameters := []string{*updateVolumeOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateVolumeOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/volumes/{id}`, pathParamsMap) if err != nil { return } @@ -5477,16 +5422,12 @@ func (vpc *VpcV1) UpdateVolume(updateVolumeOptions *UpdateVolumeOptions) (result builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateVolumeOptions.Name != nil { - body["name"] = updateVolumeOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVolumeOptions.VolumePatch) if err != nil { return } @@ -5522,11 +5463,8 @@ func (vpc *VpcV1) ListRegions(listRegionsOptions *ListRegionsOptions) (result *R return } - pathSegments := []string{"regions"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions`, nil) if err != nil { return } @@ -5575,11 +5513,12 @@ func (vpc *VpcV1) GetRegion(getRegionOptions *GetRegionOptions) (result *Region, return } - pathSegments := []string{"regions"} - pathParameters := []string{*getRegionOptions.Name} + pathParamsMap := map[string]string{ + "name": *getRegionOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{name}`, pathParamsMap) if err != nil { return } @@ -5629,11 +5568,12 @@ func (vpc *VpcV1) ListRegionZones(listRegionZonesOptions *ListRegionZonesOptions return } - pathSegments := []string{"regions", "zones"} - pathParameters := []string{*listRegionZonesOptions.RegionName} + pathParamsMap := map[string]string{ + "region_name": *listRegionZonesOptions.RegionName, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{region_name}/zones`, pathParamsMap) if err != nil { return } @@ -5682,11 +5622,13 @@ func (vpc *VpcV1) GetRegionZone(getRegionZoneOptions *GetRegionZoneOptions) (res return } - pathSegments := []string{"regions", "zones"} - pathParameters := []string{*getRegionZoneOptions.RegionName, *getRegionZoneOptions.ZoneName} + pathParamsMap := map[string]string{ + "region_name": *getRegionZoneOptions.RegionName, + "zone_name": *getRegionZoneOptions.ZoneName, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/regions/{region_name}/zones/{zone_name}`, pathParamsMap) if err != nil { return } @@ -5733,11 +5675,8 @@ func (vpc *VpcV1) ListPublicGateways(listPublicGatewaysOptions *ListPublicGatewa return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways`, nil) if err != nil { return } @@ -5800,11 +5739,8 @@ func (vpc *VpcV1) CreatePublicGateway(createPublicGatewayOptions *CreatePublicGa return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways`, nil) if err != nil { return } @@ -5877,11 +5813,12 @@ func (vpc *VpcV1) DeletePublicGateway(deletePublicGatewayOptions *DeletePublicGa return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{*deletePublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *deletePublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -5920,11 +5857,12 @@ func (vpc *VpcV1) GetPublicGateway(getPublicGatewayOptions *GetPublicGatewayOpti return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{*getPublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *getPublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -5973,11 +5911,12 @@ func (vpc *VpcV1) UpdatePublicGateway(updatePublicGatewayOptions *UpdatePublicGa return } - pathSegments := []string{"public_gateways"} - pathParameters := []string{*updatePublicGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *updatePublicGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/public_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -5991,16 +5930,12 @@ func (vpc *VpcV1) UpdatePublicGateway(updatePublicGatewayOptions *UpdatePublicGa builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updatePublicGatewayOptions.Name != nil { - body["name"] = updatePublicGatewayOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updatePublicGatewayOptions.PublicGatewayPatch) if err != nil { return } @@ -6033,11 +5968,8 @@ func (vpc *VpcV1) ListFloatingIps(listFloatingIpsOptions *ListFloatingIpsOptions return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips`, nil) if err != nil { return } @@ -6095,11 +6027,8 @@ func (vpc *VpcV1) CreateFloatingIP(createFloatingIPOptions *CreateFloatingIPOpti return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips`, nil) if err != nil { return } @@ -6155,11 +6084,12 @@ func (vpc *VpcV1) DeleteFloatingIP(deleteFloatingIPOptions *DeleteFloatingIPOpti return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{*deleteFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -6198,11 +6128,12 @@ func (vpc *VpcV1) GetFloatingIP(getFloatingIPOptions *GetFloatingIPOptions) (res return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{*getFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "id": *getFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -6251,11 +6182,12 @@ func (vpc *VpcV1) UpdateFloatingIP(updateFloatingIPOptions *UpdateFloatingIPOpti return } - pathSegments := []string{"floating_ips"} - pathParameters := []string{*updateFloatingIPOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateFloatingIPOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/floating_ips/{id}`, pathParamsMap) if err != nil { return } @@ -6269,19 +6201,12 @@ func (vpc *VpcV1) UpdateFloatingIP(updateFloatingIPOptions *UpdateFloatingIPOpti builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateFloatingIPOptions.Name != nil { - body["name"] = updateFloatingIPOptions.Name - } - if updateFloatingIPOptions.Target != nil { - body["target"] = updateFloatingIPOptions.Target - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateFloatingIPOptions.FloatingIPPatch) if err != nil { return } @@ -6315,11 +6240,8 @@ func (vpc *VpcV1) ListNetworkAcls(listNetworkAclsOptions *ListNetworkAclsOptions return } - pathSegments := []string{"network_acls"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls`, nil) if err != nil { return } @@ -6374,11 +6296,8 @@ func (vpc *VpcV1) CreateNetworkACL(createNetworkACLOptions *CreateNetworkACLOpti return } - pathSegments := []string{"network_acls"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls`, nil) if err != nil { return } @@ -6436,11 +6355,12 @@ func (vpc *VpcV1) DeleteNetworkACL(deleteNetworkACLOptions *DeleteNetworkACLOpti return } - pathSegments := []string{"network_acls"} - pathParameters := []string{*deleteNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { return } @@ -6479,11 +6399,12 @@ func (vpc *VpcV1) GetNetworkACL(getNetworkACLOptions *GetNetworkACLOptions) (res return } - pathSegments := []string{"network_acls"} - pathParameters := []string{*getNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *getNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { return } @@ -6532,11 +6453,12 @@ func (vpc *VpcV1) UpdateNetworkACL(updateNetworkACLOptions *UpdateNetworkACLOpti return } - pathSegments := []string{"network_acls"} - pathParameters := []string{*updateNetworkACLOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateNetworkACLOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{id}`, pathParamsMap) if err != nil { return } @@ -6550,16 +6472,12 @@ func (vpc *VpcV1) UpdateNetworkACL(updateNetworkACLOptions *UpdateNetworkACLOpti builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateNetworkACLOptions.Name != nil { - body["name"] = updateNetworkACLOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateNetworkACLOptions.NetworkACLPatch) if err != nil { return } @@ -6596,11 +6514,12 @@ func (vpc *VpcV1) ListNetworkACLRules(listNetworkACLRulesOptions *ListNetworkACL return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*listNetworkACLRulesOptions.NetworkACLID} + pathParamsMap := map[string]string{ + "network_acl_id": *listNetworkACLRulesOptions.NetworkACLID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap) if err != nil { return } @@ -6659,11 +6578,12 @@ func (vpc *VpcV1) CreateNetworkACLRule(createNetworkACLRuleOptions *CreateNetwor return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*createNetworkACLRuleOptions.NetworkACLID} + pathParamsMap := map[string]string{ + "network_acl_id": *createNetworkACLRuleOptions.NetworkACLID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules`, pathParamsMap) if err != nil { return } @@ -6718,11 +6638,13 @@ func (vpc *VpcV1) DeleteNetworkACLRule(deleteNetworkACLRuleOptions *DeleteNetwor return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*deleteNetworkACLRuleOptions.NetworkACLID, *deleteNetworkACLRuleOptions.ID} + pathParamsMap := map[string]string{ + "network_acl_id": *deleteNetworkACLRuleOptions.NetworkACLID, + "id": *deleteNetworkACLRuleOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -6761,11 +6683,13 @@ func (vpc *VpcV1) GetNetworkACLRule(getNetworkACLRuleOptions *GetNetworkACLRuleO return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*getNetworkACLRuleOptions.NetworkACLID, *getNetworkACLRuleOptions.ID} + pathParamsMap := map[string]string{ + "network_acl_id": *getNetworkACLRuleOptions.NetworkACLID, + "id": *getNetworkACLRuleOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -6815,11 +6739,13 @@ func (vpc *VpcV1) UpdateNetworkACLRule(updateNetworkACLRuleOptions *UpdateNetwor return } - pathSegments := []string{"network_acls", "rules"} - pathParameters := []string{*updateNetworkACLRuleOptions.NetworkACLID, *updateNetworkACLRuleOptions.ID} + pathParamsMap := map[string]string{ + "network_acl_id": *updateNetworkACLRuleOptions.NetworkACLID, + "id": *updateNetworkACLRuleOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/network_acls/{network_acl_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -6833,49 +6759,12 @@ func (vpc *VpcV1) UpdateNetworkACLRule(updateNetworkACLRuleOptions *UpdateNetwor builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateNetworkACLRuleOptions.Name != nil { - body["name"] = updateNetworkACLRuleOptions.Name - } - if updateNetworkACLRuleOptions.Action != nil { - body["action"] = updateNetworkACLRuleOptions.Action - } - if updateNetworkACLRuleOptions.Destination != nil { - body["destination"] = updateNetworkACLRuleOptions.Destination - } - if updateNetworkACLRuleOptions.Direction != nil { - body["direction"] = updateNetworkACLRuleOptions.Direction - } - if updateNetworkACLRuleOptions.Source != nil { - body["source"] = updateNetworkACLRuleOptions.Source - } - if updateNetworkACLRuleOptions.DestinationPortMax != nil { - body["destination_port_max"] = updateNetworkACLRuleOptions.DestinationPortMax - } - if updateNetworkACLRuleOptions.DestinationPortMin != nil { - body["destination_port_min"] = updateNetworkACLRuleOptions.DestinationPortMin - } - if updateNetworkACLRuleOptions.SourcePortMax != nil { - body["source_port_max"] = updateNetworkACLRuleOptions.SourcePortMax - } - if updateNetworkACLRuleOptions.SourcePortMin != nil { - body["source_port_min"] = updateNetworkACLRuleOptions.SourcePortMin - } - if updateNetworkACLRuleOptions.Code != nil { - body["code"] = updateNetworkACLRuleOptions.Code - } - if updateNetworkACLRuleOptions.Type != nil { - body["type"] = updateNetworkACLRuleOptions.Type - } - if updateNetworkACLRuleOptions.Before != nil { - body["before"] = updateNetworkACLRuleOptions.Before - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateNetworkACLRuleOptions.NetworkACLRulePatch) if err != nil { return } @@ -6910,11 +6799,8 @@ func (vpc *VpcV1) ListSecurityGroups(listSecurityGroupsOptions *ListSecurityGrou return } - pathSegments := []string{"security_groups"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups`, nil) if err != nil { return } @@ -6985,11 +6871,8 @@ func (vpc *VpcV1) CreateSecurityGroup(createSecurityGroupOptions *CreateSecurity return } - pathSegments := []string{"security_groups"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups`, nil) if err != nil { return } @@ -7059,11 +6942,12 @@ func (vpc *VpcV1) DeleteSecurityGroup(deleteSecurityGroupOptions *DeleteSecurity return } - pathSegments := []string{"security_groups"} - pathParameters := []string{*deleteSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { return } @@ -7102,11 +6986,12 @@ func (vpc *VpcV1) GetSecurityGroup(getSecurityGroupOptions *GetSecurityGroupOpti return } - pathSegments := []string{"security_groups"} - pathParameters := []string{*getSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *getSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { return } @@ -7157,11 +7042,12 @@ func (vpc *VpcV1) UpdateSecurityGroup(updateSecurityGroupOptions *UpdateSecurity return } - pathSegments := []string{"security_groups"} - pathParameters := []string{*updateSecurityGroupOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateSecurityGroupOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{id}`, pathParamsMap) if err != nil { return } @@ -7175,16 +7061,12 @@ func (vpc *VpcV1) UpdateSecurityGroup(updateSecurityGroupOptions *UpdateSecurity builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateSecurityGroupOptions.Name != nil { - body["name"] = updateSecurityGroupOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateSecurityGroupOptions.SecurityGroupPatch) if err != nil { return } @@ -7221,11 +7103,12 @@ func (vpc *VpcV1) ListSecurityGroupNetworkInterfaces(listSecurityGroupNetworkInt return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*listSecurityGroupNetworkInterfacesOptions.SecurityGroupID} + pathParamsMap := map[string]string{ + "security_group_id": *listSecurityGroupNetworkInterfacesOptions.SecurityGroupID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces`, pathParamsMap) if err != nil { return } @@ -7283,11 +7166,13 @@ func (vpc *VpcV1) RemoveSecurityGroupNetworkInterface(removeSecurityGroupNetwork return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*removeSecurityGroupNetworkInterfaceOptions.SecurityGroupID, *removeSecurityGroupNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *removeSecurityGroupNetworkInterfaceOptions.SecurityGroupID, + "id": *removeSecurityGroupNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -7327,11 +7212,13 @@ func (vpc *VpcV1) GetSecurityGroupNetworkInterface(getSecurityGroupNetworkInterf return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*getSecurityGroupNetworkInterfaceOptions.SecurityGroupID, *getSecurityGroupNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *getSecurityGroupNetworkInterfaceOptions.SecurityGroupID, + "id": *getSecurityGroupNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -7382,11 +7269,13 @@ func (vpc *VpcV1) AddSecurityGroupNetworkInterface(addSecurityGroupNetworkInterf return } - pathSegments := []string{"security_groups", "network_interfaces"} - pathParameters := []string{*addSecurityGroupNetworkInterfaceOptions.SecurityGroupID, *addSecurityGroupNetworkInterfaceOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *addSecurityGroupNetworkInterfaceOptions.SecurityGroupID, + "id": *addSecurityGroupNetworkInterfaceOptions.ID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/network_interfaces/{id}`, pathParamsMap) if err != nil { return } @@ -7437,11 +7326,12 @@ func (vpc *VpcV1) ListSecurityGroupRules(listSecurityGroupRulesOptions *ListSecu return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*listSecurityGroupRulesOptions.SecurityGroupID} + pathParamsMap := map[string]string{ + "security_group_id": *listSecurityGroupRulesOptions.SecurityGroupID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap) if err != nil { return } @@ -7495,11 +7385,12 @@ func (vpc *VpcV1) CreateSecurityGroupRule(createSecurityGroupRuleOptions *Create return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*createSecurityGroupRuleOptions.SecurityGroupID} + pathParamsMap := map[string]string{ + "security_group_id": *createSecurityGroupRuleOptions.SecurityGroupID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules`, pathParamsMap) if err != nil { return } @@ -7555,11 +7446,13 @@ func (vpc *VpcV1) DeleteSecurityGroupRule(deleteSecurityGroupRuleOptions *Delete return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*deleteSecurityGroupRuleOptions.SecurityGroupID, *deleteSecurityGroupRuleOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *deleteSecurityGroupRuleOptions.SecurityGroupID, + "id": *deleteSecurityGroupRuleOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -7598,11 +7491,13 @@ func (vpc *VpcV1) GetSecurityGroupRule(getSecurityGroupRuleOptions *GetSecurityG return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*getSecurityGroupRuleOptions.SecurityGroupID, *getSecurityGroupRuleOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *getSecurityGroupRuleOptions.SecurityGroupID, + "id": *getSecurityGroupRuleOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -7653,11 +7548,13 @@ func (vpc *VpcV1) UpdateSecurityGroupRule(updateSecurityGroupRuleOptions *Update return } - pathSegments := []string{"security_groups", "rules"} - pathParameters := []string{*updateSecurityGroupRuleOptions.SecurityGroupID, *updateSecurityGroupRuleOptions.ID} + pathParamsMap := map[string]string{ + "security_group_id": *updateSecurityGroupRuleOptions.SecurityGroupID, + "id": *updateSecurityGroupRuleOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/security_groups/{security_group_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -7671,34 +7568,12 @@ func (vpc *VpcV1) UpdateSecurityGroupRule(updateSecurityGroupRuleOptions *Update builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateSecurityGroupRuleOptions.Remote != nil { - body["remote"] = updateSecurityGroupRuleOptions.Remote - } - if updateSecurityGroupRuleOptions.Direction != nil { - body["direction"] = updateSecurityGroupRuleOptions.Direction - } - if updateSecurityGroupRuleOptions.IPVersion != nil { - body["ip_version"] = updateSecurityGroupRuleOptions.IPVersion - } - if updateSecurityGroupRuleOptions.Code != nil { - body["code"] = updateSecurityGroupRuleOptions.Code - } - if updateSecurityGroupRuleOptions.PortMax != nil { - body["port_max"] = updateSecurityGroupRuleOptions.PortMax - } - if updateSecurityGroupRuleOptions.PortMin != nil { - body["port_min"] = updateSecurityGroupRuleOptions.PortMin - } - if updateSecurityGroupRuleOptions.Type != nil { - body["type"] = updateSecurityGroupRuleOptions.Type - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateSecurityGroupRuleOptions.SecurityGroupRulePatch) if err != nil { return } @@ -7730,11 +7605,8 @@ func (vpc *VpcV1) ListIkePolicies(listIkePoliciesOptions *ListIkePoliciesOptions return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies`, nil) if err != nil { return } @@ -7789,11 +7661,8 @@ func (vpc *VpcV1) CreateIkePolicy(createIkePolicyOptions *CreateIkePolicyOptions return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies`, nil) if err != nil { return } @@ -7870,11 +7739,12 @@ func (vpc *VpcV1) DeleteIkePolicy(deleteIkePolicyOptions *DeleteIkePolicyOptions return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{*deleteIkePolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteIkePolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { return } @@ -7913,11 +7783,12 @@ func (vpc *VpcV1) GetIkePolicy(getIkePolicyOptions *GetIkePolicyOptions) (result return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{*getIkePolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *getIkePolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { return } @@ -7966,11 +7837,12 @@ func (vpc *VpcV1) UpdateIkePolicy(updateIkePolicyOptions *UpdateIkePolicyOptions return } - pathSegments := []string{"ike_policies"} - pathParameters := []string{*updateIkePolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateIkePolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}`, pathParamsMap) if err != nil { return } @@ -7984,31 +7856,12 @@ func (vpc *VpcV1) UpdateIkePolicy(updateIkePolicyOptions *UpdateIkePolicyOptions builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateIkePolicyOptions.Name != nil { - body["name"] = updateIkePolicyOptions.Name - } - if updateIkePolicyOptions.AuthenticationAlgorithm != nil { - body["authentication_algorithm"] = updateIkePolicyOptions.AuthenticationAlgorithm - } - if updateIkePolicyOptions.DhGroup != nil { - body["dh_group"] = updateIkePolicyOptions.DhGroup - } - if updateIkePolicyOptions.EncryptionAlgorithm != nil { - body["encryption_algorithm"] = updateIkePolicyOptions.EncryptionAlgorithm - } - if updateIkePolicyOptions.IkeVersion != nil { - body["ike_version"] = updateIkePolicyOptions.IkeVersion - } - if updateIkePolicyOptions.KeyLifetime != nil { - body["key_lifetime"] = updateIkePolicyOptions.KeyLifetime - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateIkePolicyOptions.IkePolicyPatch) if err != nil { return } @@ -8044,11 +7897,12 @@ func (vpc *VpcV1) ListIkePolicyConnections(listIkePolicyConnectionsOptions *List return } - pathSegments := []string{"ike_policies", "connections"} - pathParameters := []string{*listIkePolicyConnectionsOptions.ID} + pathParamsMap := map[string]string{ + "id": *listIkePolicyConnectionsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ike_policies/{id}/connections`, pathParamsMap) if err != nil { return } @@ -8093,11 +7947,8 @@ func (vpc *VpcV1) ListIpsecPolicies(listIpsecPoliciesOptions *ListIpsecPoliciesO return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies`, nil) if err != nil { return } @@ -8152,11 +8003,8 @@ func (vpc *VpcV1) CreateIpsecPolicy(createIpsecPolicyOptions *CreateIpsecPolicyO return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies`, nil) if err != nil { return } @@ -8230,11 +8078,12 @@ func (vpc *VpcV1) DeleteIpsecPolicy(deleteIpsecPolicyOptions *DeleteIpsecPolicyO return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{*deleteIpsecPolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteIpsecPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { return } @@ -8273,11 +8122,12 @@ func (vpc *VpcV1) GetIpsecPolicy(getIpsecPolicyOptions *GetIpsecPolicyOptions) ( return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{*getIpsecPolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *getIpsecPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { return } @@ -8326,11 +8176,12 @@ func (vpc *VpcV1) UpdateIpsecPolicy(updateIpsecPolicyOptions *UpdateIpsecPolicyO return } - pathSegments := []string{"ipsec_policies"} - pathParameters := []string{*updateIpsecPolicyOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateIpsecPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}`, pathParamsMap) if err != nil { return } @@ -8344,28 +8195,12 @@ func (vpc *VpcV1) UpdateIpsecPolicy(updateIpsecPolicyOptions *UpdateIpsecPolicyO builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateIpsecPolicyOptions.Name != nil { - body["name"] = updateIpsecPolicyOptions.Name - } - if updateIpsecPolicyOptions.AuthenticationAlgorithm != nil { - body["authentication_algorithm"] = updateIpsecPolicyOptions.AuthenticationAlgorithm - } - if updateIpsecPolicyOptions.EncryptionAlgorithm != nil { - body["encryption_algorithm"] = updateIpsecPolicyOptions.EncryptionAlgorithm - } - if updateIpsecPolicyOptions.KeyLifetime != nil { - body["key_lifetime"] = updateIpsecPolicyOptions.KeyLifetime - } - if updateIpsecPolicyOptions.Pfs != nil { - body["pfs"] = updateIpsecPolicyOptions.Pfs - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateIpsecPolicyOptions.IPsecPolicyPatch) if err != nil { return } @@ -8401,11 +8236,12 @@ func (vpc *VpcV1) ListIpsecPolicyConnections(listIpsecPolicyConnectionsOptions * return } - pathSegments := []string{"ipsec_policies", "connections"} - pathParameters := []string{*listIpsecPolicyConnectionsOptions.ID} + pathParamsMap := map[string]string{ + "id": *listIpsecPolicyConnectionsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/ipsec_policies/{id}/connections`, pathParamsMap) if err != nil { return } @@ -8450,11 +8286,8 @@ func (vpc *VpcV1) ListVPNGateways(listVPNGatewaysOptions *ListVPNGatewaysOptions return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways`, nil) if err != nil { return } @@ -8512,11 +8345,8 @@ func (vpc *VpcV1) CreateVPNGateway(createVPNGatewayOptions *CreateVPNGatewayOpti return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways`, nil) if err != nil { return } @@ -8582,11 +8412,12 @@ func (vpc *VpcV1) DeleteVPNGateway(deleteVPNGatewayOptions *DeleteVPNGatewayOpti return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{*deleteVPNGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteVPNGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -8625,11 +8456,12 @@ func (vpc *VpcV1) GetVPNGateway(getVPNGatewayOptions *GetVPNGatewayOptions) (res return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{*getVPNGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *getVPNGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -8678,11 +8510,12 @@ func (vpc *VpcV1) UpdateVPNGateway(updateVPNGatewayOptions *UpdateVPNGatewayOpti return } - pathSegments := []string{"vpn_gateways"} - pathParameters := []string{*updateVPNGatewayOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateVPNGatewayOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{id}`, pathParamsMap) if err != nil { return } @@ -8696,16 +8529,12 @@ func (vpc *VpcV1) UpdateVPNGateway(updateVPNGatewayOptions *UpdateVPNGatewayOpti builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateVPNGatewayOptions.Name != nil { - body["name"] = updateVPNGatewayOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPNGatewayOptions.VPNGatewayPatch) if err != nil { return } @@ -8741,11 +8570,12 @@ func (vpc *VpcV1) ListVPNGatewayConnections(listVPNGatewayConnectionsOptions *Li return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*listVPNGatewayConnectionsOptions.VPNGatewayID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayConnectionsOptions.VPNGatewayID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap) if err != nil { return } @@ -8797,11 +8627,12 @@ func (vpc *VpcV1) CreateVPNGatewayConnection(createVPNGatewayConnectionOptions * return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*createVPNGatewayConnectionOptions.VPNGatewayID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *createVPNGatewayConnectionOptions.VPNGatewayID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections`, pathParamsMap) if err != nil { return } @@ -8884,11 +8715,13 @@ func (vpc *VpcV1) DeleteVPNGatewayConnection(deleteVPNGatewayConnectionOptions * return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*deleteVPNGatewayConnectionOptions.VPNGatewayID, *deleteVPNGatewayConnectionOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *deleteVPNGatewayConnectionOptions.VPNGatewayID, + "id": *deleteVPNGatewayConnectionOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { return } @@ -8927,11 +8760,13 @@ func (vpc *VpcV1) GetVPNGatewayConnection(getVPNGatewayConnectionOptions *GetVPN return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*getVPNGatewayConnectionOptions.VPNGatewayID, *getVPNGatewayConnectionOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *getVPNGatewayConnectionOptions.VPNGatewayID, + "id": *getVPNGatewayConnectionOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { return } @@ -8980,11 +8815,13 @@ func (vpc *VpcV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions * return } - pathSegments := []string{"vpn_gateways", "connections"} - pathParameters := []string{*updateVPNGatewayConnectionOptions.VPNGatewayID, *updateVPNGatewayConnectionOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *updateVPNGatewayConnectionOptions.VPNGatewayID, + "id": *updateVPNGatewayConnectionOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}`, pathParamsMap) if err != nil { return } @@ -8998,34 +8835,12 @@ func (vpc *VpcV1) UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptions * builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateVPNGatewayConnectionOptions.AdminStateUp != nil { - body["admin_state_up"] = updateVPNGatewayConnectionOptions.AdminStateUp - } - if updateVPNGatewayConnectionOptions.PeerAddress != nil { - body["peer_address"] = updateVPNGatewayConnectionOptions.PeerAddress - } - if updateVPNGatewayConnectionOptions.Name != nil { - body["name"] = updateVPNGatewayConnectionOptions.Name - } - if updateVPNGatewayConnectionOptions.Psk != nil { - body["psk"] = updateVPNGatewayConnectionOptions.Psk - } - if updateVPNGatewayConnectionOptions.DeadPeerDetection != nil { - body["dead_peer_detection"] = updateVPNGatewayConnectionOptions.DeadPeerDetection - } - if updateVPNGatewayConnectionOptions.IkePolicy != nil { - body["ike_policy"] = updateVPNGatewayConnectionOptions.IkePolicy - } - if updateVPNGatewayConnectionOptions.IpsecPolicy != nil { - body["ipsec_policy"] = updateVPNGatewayConnectionOptions.IpsecPolicy - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateVPNGatewayConnectionOptions.VPNGatewayConnectionPatch) if err != nil { return } @@ -9061,11 +8876,13 @@ func (vpc *VpcV1) ListVPNGatewayConnectionLocalCIDRs(listVPNGatewayConnectionLoc return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionLocalCIDRsOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayConnectionLocalCIDRsOptions.VPNGatewayID, + "id": *listVPNGatewayConnectionLocalCIDRsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs`, pathParamsMap) if err != nil { return } @@ -9114,11 +8931,15 @@ func (vpc *VpcV1) RemoveVPNGatewayConnectionLocalCIDR(removeVPNGatewayConnection return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs", ""} - pathParameters := []string{*removeVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, *removeVPNGatewayConnectionLocalCIDROptions.ID, *removeVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, *removeVPNGatewayConnectionLocalCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *removeVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, + "id": *removeVPNGatewayConnectionLocalCIDROptions.ID, + "cidr_prefix": *removeVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, + "prefix_length": *removeVPNGatewayConnectionLocalCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -9157,11 +8978,15 @@ func (vpc *VpcV1) CheckVPNGatewayConnectionLocalCIDR(checkVPNGatewayConnectionLo return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs", ""} - pathParameters := []string{*checkVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, *checkVPNGatewayConnectionLocalCIDROptions.ID, *checkVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, *checkVPNGatewayConnectionLocalCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *checkVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, + "id": *checkVPNGatewayConnectionLocalCIDROptions.ID, + "cidr_prefix": *checkVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, + "prefix_length": *checkVPNGatewayConnectionLocalCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -9201,11 +9026,15 @@ func (vpc *VpcV1) AddVPNGatewayConnectionLocalCIDR(addVPNGatewayConnectionLocalC return } - pathSegments := []string{"vpn_gateways", "connections", "local_cidrs", ""} - pathParameters := []string{*addVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, *addVPNGatewayConnectionLocalCIDROptions.ID, *addVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, *addVPNGatewayConnectionLocalCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *addVPNGatewayConnectionLocalCIDROptions.VPNGatewayID, + "id": *addVPNGatewayConnectionLocalCIDROptions.ID, + "cidr_prefix": *addVPNGatewayConnectionLocalCIDROptions.CIDRPrefix, + "prefix_length": *addVPNGatewayConnectionLocalCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/local_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -9244,11 +9073,13 @@ func (vpc *VpcV1) ListVPNGatewayConnectionPeerCIDRs(listVPNGatewayConnectionPeer return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs"} - pathParameters := []string{*listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, *listVPNGatewayConnectionPeerCIDRsOptions.ID} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *listVPNGatewayConnectionPeerCIDRsOptions.VPNGatewayID, + "id": *listVPNGatewayConnectionPeerCIDRsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs`, pathParamsMap) if err != nil { return } @@ -9297,11 +9128,15 @@ func (vpc *VpcV1) RemoveVPNGatewayConnectionPeerCIDR(removeVPNGatewayConnectionP return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs", ""} - pathParameters := []string{*removeVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, *removeVPNGatewayConnectionPeerCIDROptions.ID, *removeVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, *removeVPNGatewayConnectionPeerCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *removeVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, + "id": *removeVPNGatewayConnectionPeerCIDROptions.ID, + "cidr_prefix": *removeVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, + "prefix_length": *removeVPNGatewayConnectionPeerCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -9340,11 +9175,15 @@ func (vpc *VpcV1) CheckVPNGatewayConnectionPeerCIDR(checkVPNGatewayConnectionPee return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs", ""} - pathParameters := []string{*checkVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, *checkVPNGatewayConnectionPeerCIDROptions.ID, *checkVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, *checkVPNGatewayConnectionPeerCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *checkVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, + "id": *checkVPNGatewayConnectionPeerCIDROptions.ID, + "cidr_prefix": *checkVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, + "prefix_length": *checkVPNGatewayConnectionPeerCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -9384,11 +9223,15 @@ func (vpc *VpcV1) AddVPNGatewayConnectionPeerCIDR(addVPNGatewayConnectionPeerCID return } - pathSegments := []string{"vpn_gateways", "connections", "peer_cidrs", ""} - pathParameters := []string{*addVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, *addVPNGatewayConnectionPeerCIDROptions.ID, *addVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, *addVPNGatewayConnectionPeerCIDROptions.PrefixLength} + pathParamsMap := map[string]string{ + "vpn_gateway_id": *addVPNGatewayConnectionPeerCIDROptions.VPNGatewayID, + "id": *addVPNGatewayConnectionPeerCIDROptions.ID, + "cidr_prefix": *addVPNGatewayConnectionPeerCIDROptions.CIDRPrefix, + "prefix_length": *addVPNGatewayConnectionPeerCIDROptions.PrefixLength, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/vpn_gateways/{vpn_gateway_id}/connections/{id}/peer_cidrs/{cidr_prefix}/{prefix_length}`, pathParamsMap) if err != nil { return } @@ -9424,11 +9267,8 @@ func (vpc *VpcV1) ListLoadBalancerProfiles(listLoadBalancerProfilesOptions *List return } - pathSegments := []string{"load_balancer/profiles"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancer/profiles`, nil) if err != nil { return } @@ -9483,11 +9323,12 @@ func (vpc *VpcV1) GetLoadBalancerProfile(getLoadBalancerProfileOptions *GetLoadB return } - pathSegments := []string{"load_balancer/profiles"} - pathParameters := []string{*getLoadBalancerProfileOptions.Name} + pathParamsMap := map[string]string{ + "name": *getLoadBalancerProfileOptions.Name, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancer/profiles/{name}`, pathParamsMap) if err != nil { return } @@ -9532,11 +9373,8 @@ func (vpc *VpcV1) ListLoadBalancers(listLoadBalancersOptions *ListLoadBalancersO return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers`, nil) if err != nil { return } @@ -9585,11 +9423,8 @@ func (vpc *VpcV1) CreateLoadBalancer(createLoadBalancerOptions *CreateLoadBalanc return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers`, nil) if err != nil { return } @@ -9666,11 +9501,12 @@ func (vpc *VpcV1) DeleteLoadBalancer(deleteLoadBalancerOptions *DeleteLoadBalanc return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{*deleteLoadBalancerOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteLoadBalancerOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { return } @@ -9709,11 +9545,12 @@ func (vpc *VpcV1) GetLoadBalancer(getLoadBalancerOptions *GetLoadBalancerOptions return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{*getLoadBalancerOptions.ID} + pathParamsMap := map[string]string{ + "id": *getLoadBalancerOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { return } @@ -9762,11 +9599,12 @@ func (vpc *VpcV1) UpdateLoadBalancer(updateLoadBalancerOptions *UpdateLoadBalanc return } - pathSegments := []string{"load_balancers"} - pathParameters := []string{*updateLoadBalancerOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateLoadBalancerOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}`, pathParamsMap) if err != nil { return } @@ -9780,16 +9618,12 @@ func (vpc *VpcV1) UpdateLoadBalancer(updateLoadBalancerOptions *UpdateLoadBalanc builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerOptions.Name != nil { - body["name"] = updateLoadBalancerOptions.Name - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerOptions.LoadBalancerPatch) if err != nil { return } @@ -9825,11 +9659,12 @@ func (vpc *VpcV1) GetLoadBalancerStatistics(getLoadBalancerStatisticsOptions *Ge return } - pathSegments := []string{"load_balancers", "statistics"} - pathParameters := []string{*getLoadBalancerStatisticsOptions.ID} + pathParamsMap := map[string]string{ + "id": *getLoadBalancerStatisticsOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{id}/statistics`, pathParamsMap) if err != nil { return } @@ -9878,11 +9713,12 @@ func (vpc *VpcV1) ListLoadBalancerListeners(listLoadBalancerListenersOptions *Li return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*listLoadBalancerListenersOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerListenersOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap) if err != nil { return } @@ -9931,11 +9767,12 @@ func (vpc *VpcV1) CreateLoadBalancerListener(createLoadBalancerListenerOptions * return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*createLoadBalancerListenerOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerListenerOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners`, pathParamsMap) if err != nil { return } @@ -10009,11 +9846,13 @@ func (vpc *VpcV1) DeleteLoadBalancerListener(deleteLoadBalancerListenerOptions * return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*deleteLoadBalancerListenerOptions.LoadBalancerID, *deleteLoadBalancerListenerOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerListenerOptions.LoadBalancerID, + "id": *deleteLoadBalancerListenerOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { return } @@ -10052,11 +9891,13 @@ func (vpc *VpcV1) GetLoadBalancerListener(getLoadBalancerListenerOptions *GetLoa return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*getLoadBalancerListenerOptions.LoadBalancerID, *getLoadBalancerListenerOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerListenerOptions.LoadBalancerID, + "id": *getLoadBalancerListenerOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { return } @@ -10105,11 +9946,13 @@ func (vpc *VpcV1) UpdateLoadBalancerListener(updateLoadBalancerListenerOptions * return } - pathSegments := []string{"load_balancers", "listeners"} - pathParameters := []string{*updateLoadBalancerListenerOptions.LoadBalancerID, *updateLoadBalancerListenerOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerListenerOptions.LoadBalancerID, + "id": *updateLoadBalancerListenerOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{id}`, pathParamsMap) if err != nil { return } @@ -10123,28 +9966,12 @@ func (vpc *VpcV1) UpdateLoadBalancerListener(updateLoadBalancerListenerOptions * builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerListenerOptions.ConnectionLimit != nil { - body["connection_limit"] = updateLoadBalancerListenerOptions.ConnectionLimit - } - if updateLoadBalancerListenerOptions.Port != nil { - body["port"] = updateLoadBalancerListenerOptions.Port - } - if updateLoadBalancerListenerOptions.Protocol != nil { - body["protocol"] = updateLoadBalancerListenerOptions.Protocol - } - if updateLoadBalancerListenerOptions.CertificateInstance != nil { - body["certificate_instance"] = updateLoadBalancerListenerOptions.CertificateInstance - } - if updateLoadBalancerListenerOptions.DefaultPool != nil { - body["default_pool"] = updateLoadBalancerListenerOptions.DefaultPool - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerOptions.LoadBalancerListenerPatch) if err != nil { return } @@ -10180,11 +10007,13 @@ func (vpc *VpcV1) ListLoadBalancerListenerPolicies(listLoadBalancerListenerPolic return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*listLoadBalancerListenerPoliciesOptions.LoadBalancerID, *listLoadBalancerListenerPoliciesOptions.ListenerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerListenerPoliciesOptions.LoadBalancerID, + "listener_id": *listLoadBalancerListenerPoliciesOptions.ListenerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap) if err != nil { return } @@ -10233,11 +10062,13 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicy(createLoadBalancerListenerPol return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*createLoadBalancerListenerPolicyOptions.LoadBalancerID, *createLoadBalancerListenerPolicyOptions.ListenerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *createLoadBalancerListenerPolicyOptions.ListenerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies`, pathParamsMap) if err != nil { return } @@ -10308,11 +10139,14 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicy(deleteLoadBalancerListenerPol return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*deleteLoadBalancerListenerPolicyOptions.LoadBalancerID, *deleteLoadBalancerListenerPolicyOptions.ListenerID, *deleteLoadBalancerListenerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *deleteLoadBalancerListenerPolicyOptions.ListenerID, + "id": *deleteLoadBalancerListenerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -10351,11 +10185,14 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicy(getLoadBalancerListenerPolicyOpt return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*getLoadBalancerListenerPolicyOptions.LoadBalancerID, *getLoadBalancerListenerPolicyOptions.ListenerID, *getLoadBalancerListenerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *getLoadBalancerListenerPolicyOptions.ListenerID, + "id": *getLoadBalancerListenerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -10404,11 +10241,14 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicy(updateLoadBalancerListenerPol return } - pathSegments := []string{"load_balancers", "listeners", "policies"} - pathParameters := []string{*updateLoadBalancerListenerPolicyOptions.LoadBalancerID, *updateLoadBalancerListenerPolicyOptions.ListenerID, *updateLoadBalancerListenerPolicyOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerListenerPolicyOptions.LoadBalancerID, + "listener_id": *updateLoadBalancerListenerPolicyOptions.ListenerID, + "id": *updateLoadBalancerListenerPolicyOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id}`, pathParamsMap) if err != nil { return } @@ -10422,22 +10262,12 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicy(updateLoadBalancerListenerPol builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerListenerPolicyOptions.Name != nil { - body["name"] = updateLoadBalancerListenerPolicyOptions.Name - } - if updateLoadBalancerListenerPolicyOptions.Priority != nil { - body["priority"] = updateLoadBalancerListenerPolicyOptions.Priority - } - if updateLoadBalancerListenerPolicyOptions.Target != nil { - body["target"] = updateLoadBalancerListenerPolicyOptions.Target - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyOptions.LoadBalancerListenerPolicyPatch) if err != nil { return } @@ -10473,11 +10303,14 @@ func (vpc *VpcV1) ListLoadBalancerListenerPolicyRules(listLoadBalancerListenerPo return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*listLoadBalancerListenerPolicyRulesOptions.LoadBalancerID, *listLoadBalancerListenerPolicyRulesOptions.ListenerID, *listLoadBalancerListenerPolicyRulesOptions.PolicyID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerListenerPolicyRulesOptions.LoadBalancerID, + "listener_id": *listLoadBalancerListenerPolicyRulesOptions.ListenerID, + "policy_id": *listLoadBalancerListenerPolicyRulesOptions.PolicyID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap) if err != nil { return } @@ -10526,11 +10359,14 @@ func (vpc *VpcV1) CreateLoadBalancerListenerPolicyRule(createLoadBalancerListene return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*createLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *createLoadBalancerListenerPolicyRuleOptions.ListenerID, *createLoadBalancerListenerPolicyRuleOptions.PolicyID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *createLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *createLoadBalancerListenerPolicyRuleOptions.PolicyID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules`, pathParamsMap) if err != nil { return } @@ -10598,11 +10434,15 @@ func (vpc *VpcV1) DeleteLoadBalancerListenerPolicyRule(deleteLoadBalancerListene return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*deleteLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *deleteLoadBalancerListenerPolicyRuleOptions.ListenerID, *deleteLoadBalancerListenerPolicyRuleOptions.PolicyID, *deleteLoadBalancerListenerPolicyRuleOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *deleteLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *deleteLoadBalancerListenerPolicyRuleOptions.PolicyID, + "id": *deleteLoadBalancerListenerPolicyRuleOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -10641,11 +10481,15 @@ func (vpc *VpcV1) GetLoadBalancerListenerPolicyRule(getLoadBalancerListenerPolic return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*getLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *getLoadBalancerListenerPolicyRuleOptions.ListenerID, *getLoadBalancerListenerPolicyRuleOptions.PolicyID, *getLoadBalancerListenerPolicyRuleOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *getLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *getLoadBalancerListenerPolicyRuleOptions.PolicyID, + "id": *getLoadBalancerListenerPolicyRuleOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -10694,11 +10538,15 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRule(updateLoadBalancerListene return } - pathSegments := []string{"load_balancers", "listeners", "policies", "rules"} - pathParameters := []string{*updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, *updateLoadBalancerListenerPolicyRuleOptions.ListenerID, *updateLoadBalancerListenerPolicyRuleOptions.PolicyID, *updateLoadBalancerListenerPolicyRuleOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerID, + "listener_id": *updateLoadBalancerListenerPolicyRuleOptions.ListenerID, + "policy_id": *updateLoadBalancerListenerPolicyRuleOptions.PolicyID, + "id": *updateLoadBalancerListenerPolicyRuleOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id}`, pathParamsMap) if err != nil { return } @@ -10712,25 +10560,12 @@ func (vpc *VpcV1) UpdateLoadBalancerListenerPolicyRule(updateLoadBalancerListene builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerListenerPolicyRuleOptions.Condition != nil { - body["condition"] = updateLoadBalancerListenerPolicyRuleOptions.Condition - } - if updateLoadBalancerListenerPolicyRuleOptions.Field != nil { - body["field"] = updateLoadBalancerListenerPolicyRuleOptions.Field - } - if updateLoadBalancerListenerPolicyRuleOptions.Type != nil { - body["type"] = updateLoadBalancerListenerPolicyRuleOptions.Type - } - if updateLoadBalancerListenerPolicyRuleOptions.Value != nil { - body["value"] = updateLoadBalancerListenerPolicyRuleOptions.Value - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerListenerPolicyRuleOptions.LoadBalancerListenerPolicyRulePatch) if err != nil { return } @@ -10766,11 +10601,12 @@ func (vpc *VpcV1) ListLoadBalancerPools(listLoadBalancerPoolsOptions *ListLoadBa return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*listLoadBalancerPoolsOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerPoolsOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap) if err != nil { return } @@ -10819,11 +10655,12 @@ func (vpc *VpcV1) CreateLoadBalancerPool(createLoadBalancerPoolOptions *CreateLo return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*createLoadBalancerPoolOptions.LoadBalancerID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerPoolOptions.LoadBalancerID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools`, pathParamsMap) if err != nil { return } @@ -10897,11 +10734,13 @@ func (vpc *VpcV1) DeleteLoadBalancerPool(deleteLoadBalancerPoolOptions *DeleteLo return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*deleteLoadBalancerPoolOptions.LoadBalancerID, *deleteLoadBalancerPoolOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerPoolOptions.LoadBalancerID, + "id": *deleteLoadBalancerPoolOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { return } @@ -10940,11 +10779,13 @@ func (vpc *VpcV1) GetLoadBalancerPool(getLoadBalancerPoolOptions *GetLoadBalance return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*getLoadBalancerPoolOptions.LoadBalancerID, *getLoadBalancerPoolOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerPoolOptions.LoadBalancerID, + "id": *getLoadBalancerPoolOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { return } @@ -10993,11 +10834,13 @@ func (vpc *VpcV1) UpdateLoadBalancerPool(updateLoadBalancerPoolOptions *UpdateLo return } - pathSegments := []string{"load_balancers", "pools"} - pathParameters := []string{*updateLoadBalancerPoolOptions.LoadBalancerID, *updateLoadBalancerPoolOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerPoolOptions.LoadBalancerID, + "id": *updateLoadBalancerPoolOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{id}`, pathParamsMap) if err != nil { return } @@ -11011,28 +10854,12 @@ func (vpc *VpcV1) UpdateLoadBalancerPool(updateLoadBalancerPoolOptions *UpdateLo builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerPoolOptions.Name != nil { - body["name"] = updateLoadBalancerPoolOptions.Name - } - if updateLoadBalancerPoolOptions.Algorithm != nil { - body["algorithm"] = updateLoadBalancerPoolOptions.Algorithm - } - if updateLoadBalancerPoolOptions.Protocol != nil { - body["protocol"] = updateLoadBalancerPoolOptions.Protocol - } - if updateLoadBalancerPoolOptions.HealthMonitor != nil { - body["health_monitor"] = updateLoadBalancerPoolOptions.HealthMonitor - } - if updateLoadBalancerPoolOptions.SessionPersistence != nil { - body["session_persistence"] = updateLoadBalancerPoolOptions.SessionPersistence - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerPoolOptions.LoadBalancerPoolPatch) if err != nil { return } @@ -11068,11 +10895,13 @@ func (vpc *VpcV1) ListLoadBalancerPoolMembers(listLoadBalancerPoolMembersOptions return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*listLoadBalancerPoolMembersOptions.LoadBalancerID, *listLoadBalancerPoolMembersOptions.PoolID} + pathParamsMap := map[string]string{ + "load_balancer_id": *listLoadBalancerPoolMembersOptions.LoadBalancerID, + "pool_id": *listLoadBalancerPoolMembersOptions.PoolID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { return } @@ -11121,11 +10950,13 @@ func (vpc *VpcV1) CreateLoadBalancerPoolMember(createLoadBalancerPoolMemberOptio return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*createLoadBalancerPoolMemberOptions.LoadBalancerID, *createLoadBalancerPoolMemberOptions.PoolID} + pathParamsMap := map[string]string{ + "load_balancer_id": *createLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *createLoadBalancerPoolMemberOptions.PoolID, + } builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { return } @@ -11190,11 +11021,13 @@ func (vpc *VpcV1) ReplaceLoadBalancerPoolMembers(replaceLoadBalancerPoolMembersO return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*replaceLoadBalancerPoolMembersOptions.LoadBalancerID, *replaceLoadBalancerPoolMembersOptions.PoolID} + pathParamsMap := map[string]string{ + "load_balancer_id": *replaceLoadBalancerPoolMembersOptions.LoadBalancerID, + "pool_id": *replaceLoadBalancerPoolMembersOptions.PoolID, + } builder := core.NewRequestBuilder(core.PUT) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members`, pathParamsMap) if err != nil { return } @@ -11253,11 +11086,14 @@ func (vpc *VpcV1) DeleteLoadBalancerPoolMember(deleteLoadBalancerPoolMemberOptio return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*deleteLoadBalancerPoolMemberOptions.LoadBalancerID, *deleteLoadBalancerPoolMemberOptions.PoolID, *deleteLoadBalancerPoolMemberOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *deleteLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *deleteLoadBalancerPoolMemberOptions.PoolID, + "id": *deleteLoadBalancerPoolMemberOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { return } @@ -11296,11 +11132,14 @@ func (vpc *VpcV1) GetLoadBalancerPoolMember(getLoadBalancerPoolMemberOptions *Ge return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*getLoadBalancerPoolMemberOptions.LoadBalancerID, *getLoadBalancerPoolMemberOptions.PoolID, *getLoadBalancerPoolMemberOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *getLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *getLoadBalancerPoolMemberOptions.PoolID, + "id": *getLoadBalancerPoolMemberOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { return } @@ -11349,11 +11188,14 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptio return } - pathSegments := []string{"load_balancers", "pools", "members"} - pathParameters := []string{*updateLoadBalancerPoolMemberOptions.LoadBalancerID, *updateLoadBalancerPoolMemberOptions.PoolID, *updateLoadBalancerPoolMemberOptions.ID} + pathParamsMap := map[string]string{ + "load_balancer_id": *updateLoadBalancerPoolMemberOptions.LoadBalancerID, + "pool_id": *updateLoadBalancerPoolMemberOptions.PoolID, + "id": *updateLoadBalancerPoolMemberOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id}`, pathParamsMap) if err != nil { return } @@ -11367,22 +11209,12 @@ func (vpc *VpcV1) UpdateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptio builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateLoadBalancerPoolMemberOptions.Port != nil { - body["port"] = updateLoadBalancerPoolMemberOptions.Port - } - if updateLoadBalancerPoolMemberOptions.Weight != nil { - body["weight"] = updateLoadBalancerPoolMemberOptions.Weight - } - if updateLoadBalancerPoolMemberOptions.Target != nil { - body["target"] = updateLoadBalancerPoolMemberOptions.Target - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateLoadBalancerPoolMemberOptions.LoadBalancerPoolMemberPatch) if err != nil { return } @@ -11415,11 +11247,8 @@ func (vpc *VpcV1) ListFlowLogCollectors(listFlowLogCollectorsOptions *ListFlowLo return } - pathSegments := []string{"flow_log_collectors"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors`, nil) if err != nil { return } @@ -11497,11 +11326,8 @@ func (vpc *VpcV1) CreateFlowLogCollector(createFlowLogCollectorOptions *CreateFl return } - pathSegments := []string{"flow_log_collectors"} - pathParameters := []string{} - builder := core.NewRequestBuilder(core.POST) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors`, nil) if err != nil { return } @@ -11573,11 +11399,12 @@ func (vpc *VpcV1) DeleteFlowLogCollector(deleteFlowLogCollectorOptions *DeleteFl return } - pathSegments := []string{"flow_log_collectors"} - pathParameters := []string{*deleteFlowLogCollectorOptions.ID} + pathParamsMap := map[string]string{ + "id": *deleteFlowLogCollectorOptions.ID, + } builder := core.NewRequestBuilder(core.DELETE) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap) if err != nil { return } @@ -11616,11 +11443,12 @@ func (vpc *VpcV1) GetFlowLogCollector(getFlowLogCollectorOptions *GetFlowLogColl return } - pathSegments := []string{"flow_log_collectors"} - pathParameters := []string{*getFlowLogCollectorOptions.ID} + pathParamsMap := map[string]string{ + "id": *getFlowLogCollectorOptions.ID, + } builder := core.NewRequestBuilder(core.GET) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap) if err != nil { return } @@ -11671,11 +11499,12 @@ func (vpc *VpcV1) UpdateFlowLogCollector(updateFlowLogCollectorOptions *UpdateFl return } - pathSegments := []string{"flow_log_collectors"} - pathParameters := []string{*updateFlowLogCollectorOptions.ID} + pathParamsMap := map[string]string{ + "id": *updateFlowLogCollectorOptions.ID, + } builder := core.NewRequestBuilder(core.PATCH) - _, err = builder.ConstructHTTPURL(vpc.Service.Options.URL, pathSegments, pathParameters) + _, err = builder.ResolveRequestURL(vpc.Service.Options.URL, `/flow_log_collectors/{id}`, pathParamsMap) if err != nil { return } @@ -11689,19 +11518,12 @@ func (vpc *VpcV1) UpdateFlowLogCollector(updateFlowLogCollectorOptions *UpdateFl builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") + builder.AddHeader("Content-Type", "application/merge-patch+json") builder.AddQuery("version", fmt.Sprint(*vpc.Version)) builder.AddQuery("generation", fmt.Sprint(*vpc.generation)) - body := make(map[string]interface{}) - if updateFlowLogCollectorOptions.Name != nil { - body["name"] = updateFlowLogCollectorOptions.Name - } - if updateFlowLogCollectorOptions.Active != nil { - body["active"] = updateFlowLogCollectorOptions.Active - } - _, err = builder.SetBodyContentJSON(body) + _, err = builder.SetBodyContentJSON(updateFlowLogCollectorOptions.FlowLogCollectorPatch) if err != nil { return } @@ -11728,13 +11550,13 @@ func (vpc *VpcV1) UpdateFlowLogCollector(updateFlowLogCollectorOptions *UpdateFl // AddInstanceNetworkInterfaceFloatingIPOptions : The AddInstanceNetworkInterfaceFloatingIP options. type AddInstanceNetworkInterfaceFloatingIPOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11776,10 +11598,10 @@ func (options *AddInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param ma // AddSecurityGroupNetworkInterfaceOptions : The AddSecurityGroupNetworkInterface options. type AddSecurityGroupNetworkInterfaceOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11814,16 +11636,16 @@ func (options *AddSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[str // AddVPNGatewayConnectionLocalCIDROptions : The AddVPNGatewayConnectionLocalCIDR options. type AddVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -11872,16 +11694,16 @@ func (options *AddVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[str // AddVPNGatewayConnectionPeerCIDROptions : The AddVPNGatewayConnectionPeerCIDR options. type AddVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12075,6 +11897,42 @@ func UnmarshalAddressPrefixCollectionNext(m map[string]json.RawMessage, result i return } +// AddressPrefixPatch : AddressPrefixPatch struct +type AddressPrefixPatch struct { + // The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in. + Name *string `json:"name,omitempty"` + + // Indicates whether this is the default prefix for this zone in this VPC. Updating to true makes this prefix the + // default prefix for this zone in this VPC, provided the VPC currently has no default address prefix for this zone. + // Updating to false removes the default prefix for this zone in this VPC. + IsDefault *bool `json:"is_default,omitempty"` +} + +// UnmarshalAddressPrefixPatch unmarshals an instance of AddressPrefixPatch from the specified map of raw messages. +func UnmarshalAddressPrefixPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(AddressPrefixPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "is_default", &obj.IsDefault) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the AddressPrefixPatch +func (addressPrefixPatch *AddressPrefixPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(addressPrefixPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // CertificateInstanceIdentity : Identifies a certificate instance by a unique property. // Models which "extend" this model: // - CertificateInstanceIdentityByCRN @@ -12122,16 +11980,16 @@ func UnmarshalCertificateInstanceReference(m map[string]json.RawMessage, result // CheckVPNGatewayConnectionLocalCIDROptions : The CheckVPNGatewayConnectionLocalCIDR options. type CheckVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12180,16 +12038,16 @@ func (options *CheckVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[s // CheckVPNGatewayConnectionPeerCIDROptions : The CheckVPNGatewayConnectionPeerCIDR options. type CheckVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -12512,7 +12370,7 @@ func (options *CreateImageOptions) SetHeaders(param map[string]string) *CreateIm // CreateInstanceActionOptions : The CreateInstanceAction options. type CreateInstanceActionOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The type of action. Type *string `json:"type" validate:"required"` @@ -12567,7 +12425,7 @@ func (options *CreateInstanceActionOptions) SetHeaders(param map[string]string) // CreateInstanceGroupManagerOptions : The CreateInstanceGroupManager options. type CreateInstanceGroupManagerOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager prototype object. InstanceGroupManagerPrototype InstanceGroupManagerPrototypeIntf `json:"InstanceGroupManagerPrototype" validate:"required"` @@ -12605,10 +12463,10 @@ func (options *CreateInstanceGroupManagerOptions) SetHeaders(param map[string]st // CreateInstanceGroupManagerPolicyOptions : The CreateInstanceGroupManagerPolicy options. type CreateInstanceGroupManagerPolicyOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required"` + InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="` // The instance group manager policy prototype object. InstanceGroupManagerPolicyPrototype InstanceGroupManagerPolicyPrototypeIntf `json:"InstanceGroupManagerPolicyPrototype" validate:"required"` @@ -12751,7 +12609,7 @@ func (options *CreateInstanceGroupOptions) SetHeaders(param map[string]string) * // CreateInstanceNetworkInterfaceOptions : The CreateInstanceNetworkInterface options. type CreateInstanceNetworkInterfaceOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The associated subnet. Subnet SubnetIdentityIntf `json:"subnet" validate:"required"` @@ -12874,18 +12732,18 @@ func (options *CreateInstanceTemplateOptions) SetHeaders(param map[string]string // CreateInstanceVolumeAttachmentOptions : The CreateInstanceVolumeAttachment options. type CreateInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The identity of the volume to attach to the instance. Volume VolumeIdentityIntf `json:"volume" validate:"required"` + // If set to true, when deleting the instance the volume will also be deleted. + DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. If unspecified, the name will be a hyphenated list of // randomly-selected words. Name *string `json:"name,omitempty"` - // If set to true, when deleting the instance the volume will also be deleted. - DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` - // Allows users to set headers on API requests Headers map[string]string } @@ -12910,18 +12768,18 @@ func (options *CreateInstanceVolumeAttachmentOptions) SetVolume(volume VolumeIde return options } -// SetName : Allow user to set Name -func (options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions { - options.Name = core.StringPtr(name) - return options -} - // SetDeleteVolumeOnInstanceDelete : Allow user to set DeleteVolumeOnInstanceDelete func (options *CreateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *CreateInstanceVolumeAttachmentOptions { options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete) return options } +// SetName : Allow user to set Name +func (options *CreateInstanceVolumeAttachmentOptions) SetName(name string) *CreateInstanceVolumeAttachmentOptions { + options.Name = core.StringPtr(name) + return options +} + // SetHeaders : Allow user to set Headers func (options *CreateInstanceVolumeAttachmentOptions) SetHeaders(param map[string]string) *CreateInstanceVolumeAttachmentOptions { options.Headers = param @@ -13096,7 +12954,7 @@ func (options *CreateKeyOptions) SetHeaders(param map[string]string) *CreateKeyO // CreateLoadBalancerListenerOptions : The CreateLoadBalancerListener options. type CreateLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener port number. Port *int64 `json:"port" validate:"required"` @@ -13191,10 +13049,10 @@ func (options *CreateLoadBalancerListenerOptions) SetHeaders(param map[string]st // CreateLoadBalancerListenerPolicyOptions : The CreateLoadBalancerListenerPolicy options. type CreateLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // Priority of the policy. Lower value indicates higher priority. Priority *int64 `json:"priority" validate:"required"` @@ -13287,13 +13145,13 @@ func (options *CreateLoadBalancerListenerPolicyOptions) SetHeaders(param map[str // CreateLoadBalancerListenerPolicyRuleOptions : The CreateLoadBalancerListenerPolicyRule options. type CreateLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The condition of the rule. Condition *string `json:"condition" validate:"required"` @@ -13475,10 +13333,10 @@ func (options *CreateLoadBalancerOptions) SetHeaders(param map[string]string) *C // CreateLoadBalancerPoolMemberOptions : The CreateLoadBalancerPoolMember options. type CreateLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The port number of the application running in the server member. Port *int64 `json:"port" validate:"required"` @@ -13545,7 +13403,7 @@ func (options *CreateLoadBalancerPoolMemberOptions) SetHeaders(param map[string] // CreateLoadBalancerPoolOptions : The CreateLoadBalancerPool options. type CreateLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The load balancing algorithm. Algorithm *string `json:"algorithm" validate:"required"` @@ -13682,7 +13540,7 @@ func (options *CreateNetworkACLOptions) SetHeaders(param map[string]string) *Cre // CreateNetworkACLRuleOptions : The CreateNetworkACLRule options. type CreateNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The network ACL rule prototype object. NetworkACLRulePrototype NetworkACLRulePrototypeIntf `json:"NetworkACLRulePrototype" validate:"required"` @@ -13844,7 +13702,7 @@ func (options *CreateSecurityGroupOptions) SetHeaders(param map[string]string) * // CreateSecurityGroupRuleOptions : The CreateSecurityGroupRule options. type CreateSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The properties of the security group rule to be created. SecurityGroupRulePrototype SecurityGroupRulePrototypeIntf `json:"SecurityGroupRulePrototype" validate:"required"` @@ -13938,7 +13796,7 @@ func (options *CreateVolumeOptions) SetHeaders(param map[string]string) *CreateV // CreateVPCAddressPrefixOptions : The CreateVPCAddressPrefix options. type CreateVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The IPv4 range of the address prefix, expressed in CIDR format. The request must not overlap with any existing // address prefixes in the VPC, and must fall within the [RFC 1918](https://tools.ietf.org/html/rfc1918) address @@ -14075,7 +13933,7 @@ func (options *CreateVPCOptions) SetHeaders(param map[string]string) *CreateVPCO // CreateVPCRouteOptions : The CreateVPCRoute options. type CreateVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The next hop that packets will be delivered to. NextHop RouteNextHopPrototypeIntf `json:"next_hop" validate:"required"` @@ -14144,7 +14002,7 @@ func (options *CreateVPCRouteOptions) SetHeaders(param map[string]string) *Creat // CreateVPNGatewayConnectionOptions : The CreateVPNGatewayConnection options. type CreateVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The IP address of the peer VPN gateway. PeerAddress *string `json:"peer_address" validate:"required"` @@ -14448,7 +14306,7 @@ func UnmarshalDefaultSecurityGroup(m map[string]json.RawMessage, result interfac // DeleteFloatingIPOptions : The DeleteFloatingIP options. type DeleteFloatingIPOptions struct { // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14476,7 +14334,7 @@ func (options *DeleteFloatingIPOptions) SetHeaders(param map[string]string) *Del // DeleteFlowLogCollectorOptions : The DeleteFlowLogCollector options. type DeleteFlowLogCollectorOptions struct { // The flow log collector identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14504,7 +14362,7 @@ func (options *DeleteFlowLogCollectorOptions) SetHeaders(param map[string]string // DeleteIkePolicyOptions : The DeleteIkePolicy options. type DeleteIkePolicyOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14532,7 +14390,7 @@ func (options *DeleteIkePolicyOptions) SetHeaders(param map[string]string) *Dele // DeleteImageOptions : The DeleteImage options. type DeleteImageOptions struct { // The image identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14560,7 +14418,7 @@ func (options *DeleteImageOptions) SetHeaders(param map[string]string) *DeleteIm // DeleteInstanceGroupLoadBalancerOptions : The DeleteInstanceGroupLoadBalancer options. type DeleteInstanceGroupLoadBalancerOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14588,10 +14446,10 @@ func (options *DeleteInstanceGroupLoadBalancerOptions) SetHeaders(param map[stri // DeleteInstanceGroupManagerOptions : The DeleteInstanceGroupManager options. type DeleteInstanceGroupManagerOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14626,13 +14484,13 @@ func (options *DeleteInstanceGroupManagerOptions) SetHeaders(param map[string]st // DeleteInstanceGroupManagerPolicyOptions : The DeleteInstanceGroupManagerPolicy options. type DeleteInstanceGroupManagerPolicyOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required"` + InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="` // The instance group manager policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14674,10 +14532,10 @@ func (options *DeleteInstanceGroupManagerPolicyOptions) SetHeaders(param map[str // DeleteInstanceGroupMembershipOptions : The DeleteInstanceGroupMembership options. type DeleteInstanceGroupMembershipOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group membership identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14712,7 +14570,7 @@ func (options *DeleteInstanceGroupMembershipOptions) SetHeaders(param map[string // DeleteInstanceGroupMembershipsOptions : The DeleteInstanceGroupMemberships options. type DeleteInstanceGroupMembershipsOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14740,7 +14598,7 @@ func (options *DeleteInstanceGroupMembershipsOptions) SetHeaders(param map[strin // DeleteInstanceGroupOptions : The DeleteInstanceGroup options. type DeleteInstanceGroupOptions struct { // The instance group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14768,10 +14626,10 @@ func (options *DeleteInstanceGroupOptions) SetHeaders(param map[string]string) * // DeleteInstanceNetworkInterfaceOptions : The DeleteInstanceNetworkInterface options. type DeleteInstanceNetworkInterfaceOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14806,7 +14664,7 @@ func (options *DeleteInstanceNetworkInterfaceOptions) SetHeaders(param map[strin // DeleteInstanceOptions : The DeleteInstance options. type DeleteInstanceOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14834,7 +14692,7 @@ func (options *DeleteInstanceOptions) SetHeaders(param map[string]string) *Delet // DeleteInstanceTemplateOptions : The DeleteInstanceTemplate options. type DeleteInstanceTemplateOptions struct { // The instance template identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14862,10 +14720,10 @@ func (options *DeleteInstanceTemplateOptions) SetHeaders(param map[string]string // DeleteInstanceVolumeAttachmentOptions : The DeleteInstanceVolumeAttachment options. type DeleteInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The volume attachment identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14900,7 +14758,7 @@ func (options *DeleteInstanceVolumeAttachmentOptions) SetHeaders(param map[strin // DeleteIpsecPolicyOptions : The DeleteIpsecPolicy options. type DeleteIpsecPolicyOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14928,7 +14786,7 @@ func (options *DeleteIpsecPolicyOptions) SetHeaders(param map[string]string) *De // DeleteKeyOptions : The DeleteKey options. type DeleteKeyOptions struct { // The key identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14956,10 +14814,10 @@ func (options *DeleteKeyOptions) SetHeaders(param map[string]string) *DeleteKeyO // DeleteLoadBalancerListenerOptions : The DeleteLoadBalancerListener options. type DeleteLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -14994,13 +14852,13 @@ func (options *DeleteLoadBalancerListenerOptions) SetHeaders(param map[string]st // DeleteLoadBalancerListenerPolicyOptions : The DeleteLoadBalancerListenerPolicy options. type DeleteLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15042,16 +14900,16 @@ func (options *DeleteLoadBalancerListenerPolicyOptions) SetHeaders(param map[str // DeleteLoadBalancerListenerPolicyRuleOptions : The DeleteLoadBalancerListenerPolicyRule options. type DeleteLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15100,7 +14958,7 @@ func (options *DeleteLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map // DeleteLoadBalancerOptions : The DeleteLoadBalancer options. type DeleteLoadBalancerOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15128,13 +14986,13 @@ func (options *DeleteLoadBalancerOptions) SetHeaders(param map[string]string) *D // DeleteLoadBalancerPoolMemberOptions : The DeleteLoadBalancerPoolMember options. type DeleteLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The member identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15176,10 +15034,10 @@ func (options *DeleteLoadBalancerPoolMemberOptions) SetHeaders(param map[string] // DeleteLoadBalancerPoolOptions : The DeleteLoadBalancerPool options. type DeleteLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15214,7 +15072,7 @@ func (options *DeleteLoadBalancerPoolOptions) SetHeaders(param map[string]string // DeleteNetworkACLOptions : The DeleteNetworkACL options. type DeleteNetworkACLOptions struct { // The network ACL identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15242,10 +15100,10 @@ func (options *DeleteNetworkACLOptions) SetHeaders(param map[string]string) *Del // DeleteNetworkACLRuleOptions : The DeleteNetworkACLRule options. type DeleteNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15280,7 +15138,7 @@ func (options *DeleteNetworkACLRuleOptions) SetHeaders(param map[string]string) // DeletePublicGatewayOptions : The DeletePublicGateway options. type DeletePublicGatewayOptions struct { // The public gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15308,7 +15166,7 @@ func (options *DeletePublicGatewayOptions) SetHeaders(param map[string]string) * // DeleteSecurityGroupOptions : The DeleteSecurityGroup options. type DeleteSecurityGroupOptions struct { // The security group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15336,10 +15194,10 @@ func (options *DeleteSecurityGroupOptions) SetHeaders(param map[string]string) * // DeleteSecurityGroupRuleOptions : The DeleteSecurityGroupRule options. type DeleteSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15374,7 +15232,7 @@ func (options *DeleteSecurityGroupRuleOptions) SetHeaders(param map[string]strin // DeleteSubnetOptions : The DeleteSubnet options. type DeleteSubnetOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15402,7 +15260,7 @@ func (options *DeleteSubnetOptions) SetHeaders(param map[string]string) *DeleteS // DeleteVolumeOptions : The DeleteVolume options. type DeleteVolumeOptions struct { // The volume identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15430,10 +15288,10 @@ func (options *DeleteVolumeOptions) SetHeaders(param map[string]string) *DeleteV // DeleteVPCAddressPrefixOptions : The DeleteVPCAddressPrefix options. type DeleteVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The prefix identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15468,7 +15326,7 @@ func (options *DeleteVPCAddressPrefixOptions) SetHeaders(param map[string]string // DeleteVPCOptions : The DeleteVPC options. type DeleteVPCOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15496,10 +15354,10 @@ func (options *DeleteVPCOptions) SetHeaders(param map[string]string) *DeleteVPCO // DeleteVPCRouteOptions : The DeleteVPCRoute options. type DeleteVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The route identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15534,10 +15392,10 @@ func (options *DeleteVPCRouteOptions) SetHeaders(param map[string]string) *Delet // DeleteVPNGatewayConnectionOptions : The DeleteVPNGatewayConnection options. type DeleteVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15572,7 +15430,7 @@ func (options *DeleteVPNGatewayConnectionOptions) SetHeaders(param map[string]st // DeleteVPNGatewayOptions : The DeleteVPNGateway options. type DeleteVPNGatewayOptions struct { // The VPN gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -15634,6 +15492,15 @@ type EncryptionKeyReference struct { CRN *string `json:"crn" validate:"required"` } +// NewEncryptionKeyReference : Instantiate EncryptionKeyReference (Generic Model Constructor) +func (*VpcV1) NewEncryptionKeyReference(crn string) (model *EncryptionKeyReference, err error) { + model = &EncryptionKeyReference{ + CRN: core.StringPtr(crn), + } + err = core.ValidateStruct(model, "required parameters") + return +} + // 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) @@ -15849,6 +15716,42 @@ func UnmarshalFloatingIPCollectionNext(m map[string]json.RawMessage, result inte return } +// FloatingIPPatch : FloatingIPPatch struct +type FloatingIPPatch struct { + // The unique user-defined name for this floating IP. + Name *string `json:"name,omitempty"` + + // 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 FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"` +} + +// UnmarshalFloatingIPPatch unmarshals an instance of FloatingIPPatch from the specified map of raw messages. +func UnmarshalFloatingIPPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FloatingIPPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalFloatingIPPatchTargetNetworkInterfaceIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the FloatingIPPatch +func (floatingIPPatch *FloatingIPPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(floatingIPPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + 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: @@ -16256,6 +16159,41 @@ func UnmarshalFlowLogCollectorCollectionNext(m map[string]json.RawMessage, resul return } +// FlowLogCollectorPatch : FlowLogCollectorPatch struct +type FlowLogCollectorPatch struct { + // The unique user-defined name for this flow log collector. + Name *string `json:"name,omitempty"` + + // Indicates whether this collector is active. Updating to false deactivates the collector and updating to true + // activates the collector. + Active *bool `json:"active,omitempty"` +} + +// UnmarshalFlowLogCollectorPatch unmarshals an instance of FlowLogCollectorPatch from the specified map of raw messages. +func UnmarshalFlowLogCollectorPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(FlowLogCollectorPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "active", &obj.Active) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the FlowLogCollectorPatch +func (flowLogCollectorPatch *FlowLogCollectorPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(flowLogCollectorPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // FlowLogCollectorPrototypeTarget : The target this collector is to collect flow logs for. If the target is an instance, subnet, or VPC, flow logs will // not be collected for any network interfaces within the target that are themselves the target of a more specific flow // log collector. @@ -16371,7 +16309,7 @@ func UnmarshalFlowLogCollectorTarget(m map[string]json.RawMessage, result interf // GetFloatingIPOptions : The GetFloatingIP options. type GetFloatingIPOptions struct { // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16399,7 +16337,7 @@ func (options *GetFloatingIPOptions) SetHeaders(param map[string]string) *GetFlo // GetFlowLogCollectorOptions : The GetFlowLogCollector options. type GetFlowLogCollectorOptions struct { // The flow log collector identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16427,7 +16365,7 @@ func (options *GetFlowLogCollectorOptions) SetHeaders(param map[string]string) * // GetIkePolicyOptions : The GetIkePolicy options. type GetIkePolicyOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16455,7 +16393,7 @@ func (options *GetIkePolicyOptions) SetHeaders(param map[string]string) *GetIkeP // GetImageOptions : The GetImage options. type GetImageOptions struct { // The image identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16483,10 +16421,10 @@ func (options *GetImageOptions) SetHeaders(param map[string]string) *GetImageOpt // GetInstanceGroupManagerOptions : The GetInstanceGroupManager options. type GetInstanceGroupManagerOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16521,13 +16459,13 @@ func (options *GetInstanceGroupManagerOptions) SetHeaders(param map[string]strin // GetInstanceGroupManagerPolicyOptions : The GetInstanceGroupManagerPolicy options. type GetInstanceGroupManagerPolicyOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required"` + InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="` // The instance group manager policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16569,10 +16507,10 @@ func (options *GetInstanceGroupManagerPolicyOptions) SetHeaders(param map[string // GetInstanceGroupMembershipOptions : The GetInstanceGroupMembership options. type GetInstanceGroupMembershipOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group membership identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16607,7 +16545,7 @@ func (options *GetInstanceGroupMembershipOptions) SetHeaders(param map[string]st // GetInstanceGroupOptions : The GetInstanceGroup options. type GetInstanceGroupOptions struct { // The instance group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16635,7 +16573,7 @@ func (options *GetInstanceGroupOptions) SetHeaders(param map[string]string) *Get // GetInstanceInitializationOptions : The GetInstanceInitialization options. type GetInstanceInitializationOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16663,13 +16601,13 @@ func (options *GetInstanceInitializationOptions) SetHeaders(param map[string]str // GetInstanceNetworkInterfaceFloatingIPOptions : The GetInstanceNetworkInterfaceFloatingIP options. type GetInstanceNetworkInterfaceFloatingIPOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16711,10 +16649,10 @@ func (options *GetInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param ma // GetInstanceNetworkInterfaceOptions : The GetInstanceNetworkInterface options. type GetInstanceNetworkInterfaceOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16749,7 +16687,7 @@ func (options *GetInstanceNetworkInterfaceOptions) SetHeaders(param map[string]s // GetInstanceOptions : The GetInstance options. type GetInstanceOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16777,7 +16715,7 @@ func (options *GetInstanceOptions) SetHeaders(param map[string]string) *GetInsta // GetInstanceProfileOptions : The GetInstanceProfile options. type GetInstanceProfileOptions struct { // The instance profile name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16805,7 +16743,7 @@ func (options *GetInstanceProfileOptions) SetHeaders(param map[string]string) *G // GetInstanceTemplateOptions : The GetInstanceTemplate options. type GetInstanceTemplateOptions struct { // The instance template identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16833,10 +16771,10 @@ func (options *GetInstanceTemplateOptions) SetHeaders(param map[string]string) * // GetInstanceVolumeAttachmentOptions : The GetInstanceVolumeAttachment options. type GetInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The volume attachment identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16871,7 +16809,7 @@ func (options *GetInstanceVolumeAttachmentOptions) SetHeaders(param map[string]s // GetIpsecPolicyOptions : The GetIpsecPolicy options. type GetIpsecPolicyOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16899,7 +16837,7 @@ func (options *GetIpsecPolicyOptions) SetHeaders(param map[string]string) *GetIp // GetKeyOptions : The GetKey options. type GetKeyOptions struct { // The key identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16927,10 +16865,10 @@ func (options *GetKeyOptions) SetHeaders(param map[string]string) *GetKeyOptions // GetLoadBalancerListenerOptions : The GetLoadBalancerListener options. type GetLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -16965,13 +16903,13 @@ func (options *GetLoadBalancerListenerOptions) SetHeaders(param map[string]strin // GetLoadBalancerListenerPolicyOptions : The GetLoadBalancerListenerPolicy options. type GetLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17013,16 +16951,16 @@ func (options *GetLoadBalancerListenerPolicyOptions) SetHeaders(param map[string // GetLoadBalancerListenerPolicyRuleOptions : The GetLoadBalancerListenerPolicyRule options. type GetLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17071,7 +17009,7 @@ func (options *GetLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map[st // GetLoadBalancerOptions : The GetLoadBalancer options. type GetLoadBalancerOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17099,13 +17037,13 @@ func (options *GetLoadBalancerOptions) SetHeaders(param map[string]string) *GetL // GetLoadBalancerPoolMemberOptions : The GetLoadBalancerPoolMember options. type GetLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The member identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17147,10 +17085,10 @@ func (options *GetLoadBalancerPoolMemberOptions) SetHeaders(param map[string]str // GetLoadBalancerPoolOptions : The GetLoadBalancerPool options. type GetLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17185,7 +17123,7 @@ func (options *GetLoadBalancerPoolOptions) SetHeaders(param map[string]string) * // GetLoadBalancerProfileOptions : The GetLoadBalancerProfile options. type GetLoadBalancerProfileOptions struct { // The load balancer profile name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17213,7 +17151,7 @@ func (options *GetLoadBalancerProfileOptions) SetHeaders(param map[string]string // GetLoadBalancerStatisticsOptions : The GetLoadBalancerStatistics options. type GetLoadBalancerStatisticsOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17241,7 +17179,7 @@ func (options *GetLoadBalancerStatisticsOptions) SetHeaders(param map[string]str // GetNetworkACLOptions : The GetNetworkACL options. type GetNetworkACLOptions struct { // The network ACL identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17269,10 +17207,10 @@ func (options *GetNetworkACLOptions) SetHeaders(param map[string]string) *GetNet // GetNetworkACLRuleOptions : The GetNetworkACLRule options. type GetNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17307,7 +17245,7 @@ func (options *GetNetworkACLRuleOptions) SetHeaders(param map[string]string) *Ge // GetOperatingSystemOptions : The GetOperatingSystem options. type GetOperatingSystemOptions struct { // The operating system name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17335,7 +17273,7 @@ func (options *GetOperatingSystemOptions) SetHeaders(param map[string]string) *G // GetPublicGatewayOptions : The GetPublicGateway options. type GetPublicGatewayOptions struct { // The public gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17363,7 +17301,7 @@ func (options *GetPublicGatewayOptions) SetHeaders(param map[string]string) *Get // GetRegionOptions : The GetRegion options. type GetRegionOptions struct { // The region name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17391,10 +17329,10 @@ func (options *GetRegionOptions) SetHeaders(param map[string]string) *GetRegionO // GetRegionZoneOptions : The GetRegionZone options. type GetRegionZoneOptions struct { // The region name. - RegionName *string `json:"region_name" validate:"required"` + RegionName *string `json:"region_name" validate:"required,ne="` // The zone name. - ZoneName *string `json:"zone_name" validate:"required"` + ZoneName *string `json:"zone_name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17429,10 +17367,10 @@ func (options *GetRegionZoneOptions) SetHeaders(param map[string]string) *GetReg // GetSecurityGroupNetworkInterfaceOptions : The GetSecurityGroupNetworkInterface options. type GetSecurityGroupNetworkInterfaceOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17467,7 +17405,7 @@ func (options *GetSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[str // GetSecurityGroupOptions : The GetSecurityGroup options. type GetSecurityGroupOptions struct { // The security group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17495,10 +17433,10 @@ func (options *GetSecurityGroupOptions) SetHeaders(param map[string]string) *Get // GetSecurityGroupRuleOptions : The GetSecurityGroupRule options. type GetSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17533,7 +17471,7 @@ func (options *GetSecurityGroupRuleOptions) SetHeaders(param map[string]string) // GetSubnetNetworkACLOptions : The GetSubnetNetworkACL options. type GetSubnetNetworkACLOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17561,7 +17499,7 @@ func (options *GetSubnetNetworkACLOptions) SetHeaders(param map[string]string) * // GetSubnetOptions : The GetSubnet options. type GetSubnetOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17589,7 +17527,7 @@ func (options *GetSubnetOptions) SetHeaders(param map[string]string) *GetSubnetO // GetSubnetPublicGatewayOptions : The GetSubnetPublicGateway options. type GetSubnetPublicGatewayOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17617,7 +17555,7 @@ func (options *GetSubnetPublicGatewayOptions) SetHeaders(param map[string]string // GetVolumeOptions : The GetVolume options. type GetVolumeOptions struct { // The volume identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17645,7 +17583,7 @@ func (options *GetVolumeOptions) SetHeaders(param map[string]string) *GetVolumeO // GetVolumeProfileOptions : The GetVolumeProfile options. type GetVolumeProfileOptions struct { // The volume profile name. - Name *string `json:"name" validate:"required"` + Name *string `json:"name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17673,10 +17611,10 @@ func (options *GetVolumeProfileOptions) SetHeaders(param map[string]string) *Get // GetVPCAddressPrefixOptions : The GetVPCAddressPrefix options. type GetVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The prefix identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17711,7 +17649,7 @@ func (options *GetVPCAddressPrefixOptions) SetHeaders(param map[string]string) * // GetVPCDefaultNetworkACLOptions : The GetVPCDefaultNetworkACL options. type GetVPCDefaultNetworkACLOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17739,7 +17677,7 @@ func (options *GetVPCDefaultNetworkACLOptions) SetHeaders(param map[string]strin // GetVPCDefaultSecurityGroupOptions : The GetVPCDefaultSecurityGroup options. type GetVPCDefaultSecurityGroupOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17767,7 +17705,7 @@ func (options *GetVPCDefaultSecurityGroupOptions) SetHeaders(param map[string]st // GetVPCOptions : The GetVPC options. type GetVPCOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17795,10 +17733,10 @@ func (options *GetVPCOptions) SetHeaders(param map[string]string) *GetVPCOptions // GetVPCRouteOptions : The GetVPCRoute options. type GetVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The route identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17833,10 +17771,10 @@ func (options *GetVPCRouteOptions) SetHeaders(param map[string]string) *GetVPCRo // GetVPNGatewayConnectionOptions : The GetVPNGatewayConnection options. type GetVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -17871,7 +17809,7 @@ func (options *GetVPNGatewayConnectionOptions) SetHeaders(param map[string]strin // GetVPNGatewayOptions : The GetVPNGateway options. type GetVPNGatewayOptions struct { // The VPN gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -18106,6 +18044,84 @@ func UnmarshalIkePolicyIdentity(m map[string]json.RawMessage, result interface{} return } +// IkePolicyPatch : IkePolicyPatch struct +type IkePolicyPatch struct { + // The user-defined name for this IKE policy. + Name *string `json:"name,omitempty"` + + // The authentication algorithm. + AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` + + // The Diffie-Hellman group. + DhGroup *int64 `json:"dh_group,omitempty"` + + // The encryption algorithm. + EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` + + // The IKE protocol version. + IkeVersion *int64 `json:"ike_version,omitempty"` + + // The key lifetime in seconds. + KeyLifetime *int64 `json:"key_lifetime,omitempty"` +} + +// Constants associated with the IkePolicyPatch.AuthenticationAlgorithm property. +// The authentication algorithm. +const ( + IkePolicyPatchAuthenticationAlgorithmMd5Const = "md5" + IkePolicyPatchAuthenticationAlgorithmSha1Const = "sha1" + IkePolicyPatchAuthenticationAlgorithmSha256Const = "sha256" +) + +// Constants associated with the IkePolicyPatch.EncryptionAlgorithm property. +// The encryption algorithm. +const ( + IkePolicyPatchEncryptionAlgorithmAes128Const = "aes128" + IkePolicyPatchEncryptionAlgorithmAes256Const = "aes256" + IkePolicyPatchEncryptionAlgorithmTripleDesConst = "triple_des" +) + +// UnmarshalIkePolicyPatch unmarshals an instance of IkePolicyPatch from the specified map of raw messages. +func UnmarshalIkePolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IkePolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "dh_group", &obj.DhGroup) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "ike_version", &obj.IkeVersion) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the IkePolicyPatch +func (ikePolicyPatch *IkePolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(ikePolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // IkePolicyReference : IkePolicyReference struct type IkePolicyReference struct { // The unique identifier for this IKE policy. @@ -18428,6 +18444,86 @@ func UnmarshalIPsecPolicyIdentity(m map[string]json.RawMessage, result interface return } +// IPsecPolicyPatch : IPsecPolicyPatch struct +type IPsecPolicyPatch struct { + // The user-defined name for this IPsec policy. + Name *string `json:"name,omitempty"` + + // The authentication algorithm. + AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` + + // The encryption algorithm. + EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` + + // The key lifetime in seconds. + KeyLifetime *int64 `json:"key_lifetime,omitempty"` + + // Perfect Forward Secrecy. + Pfs *string `json:"pfs,omitempty"` +} + +// Constants associated with the IPsecPolicyPatch.AuthenticationAlgorithm property. +// The authentication algorithm. +const ( + IPsecPolicyPatchAuthenticationAlgorithmMd5Const = "md5" + IPsecPolicyPatchAuthenticationAlgorithmSha1Const = "sha1" + IPsecPolicyPatchAuthenticationAlgorithmSha256Const = "sha256" +) + +// Constants associated with the IPsecPolicyPatch.EncryptionAlgorithm property. +// The encryption algorithm. +const ( + IPsecPolicyPatchEncryptionAlgorithmAes128Const = "aes128" + IPsecPolicyPatchEncryptionAlgorithmAes256Const = "aes256" + IPsecPolicyPatchEncryptionAlgorithmTripleDesConst = "triple_des" +) + +// Constants associated with the IPsecPolicyPatch.Pfs property. +// Perfect Forward Secrecy. +const ( + IPsecPolicyPatchPfsDisabledConst = "disabled" + IPsecPolicyPatchPfsGroup14Const = "group_14" + IPsecPolicyPatchPfsGroup2Const = "group_2" + IPsecPolicyPatchPfsGroup5Const = "group_5" +) + +// UnmarshalIPsecPolicyPatch unmarshals an instance of IPsecPolicyPatch from the specified map of raw messages. +func UnmarshalIPsecPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(IPsecPolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "authentication_algorithm", &obj.AuthenticationAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "encryption_algorithm", &obj.EncryptionAlgorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "key_lifetime", &obj.KeyLifetime) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "pfs", &obj.Pfs) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the IPsecPolicyPatch +func (iPsecPolicyPatch *IPsecPolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(iPsecPolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // IPsecPolicyReference : IPsecPolicyReference struct type IPsecPolicyReference struct { // The unique identifier for this IPsec policy. @@ -18529,6 +18625,15 @@ type Image struct { // The resource group for this image. ResourceGroup *ResourceGroupReference `json:"resource_group" validate:"required"` + // The type of encryption used on the image. + Encryption *string `json:"encryption" validate:"required"` + + // The key that will be used to encrypt volumes created from this image (unless an + // alternate `encryption_key` is provided at volume creation). + // + // This property will be present for images with an `encryption` type of `user_managed`. + EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"` + // The date and time that the image was created. CreatedAt *strfmt.DateTime `json:"created_at" validate:"required"` @@ -18545,6 +18650,13 @@ type Image struct { Visibility *string `json:"visibility" validate:"required"` } +// Constants associated with the Image.Encryption property. +// The type of encryption used on the image. +const ( + ImageEncryptionNoneConst = "none" + ImageEncryptionUserManagedConst = "user_managed" +) + // Constants associated with the Image.Status property. // The status of this image. const ( @@ -18590,6 +18702,14 @@ func UnmarshalImage(m map[string]json.RawMessage, result interface{}) (err error if err != nil { return } + err = core.UnmarshalPrimitive(m, "encryption", &obj.Encryption) + if err != nil { + return + } + err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "created_at", &obj.CreatedAt) if err != nil { return @@ -18776,6 +18896,33 @@ func UnmarshalImageIdentity(m map[string]json.RawMessage, result interface{}) (e return } +// ImagePatch : ImagePatch struct +type ImagePatch struct { + // The unique user-defined name for this image. Names starting with "ibm-" are not allowed. + Name *string `json:"name,omitempty"` +} + +// UnmarshalImagePatch unmarshals an instance of ImagePatch from the specified map of raw messages. +func UnmarshalImagePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ImagePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the ImagePatch +func (imagePatch *ImagePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(imagePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // ImagePrototype : ImagePrototype struct // Models which "extend" this model: // - ImagePrototypeImageByFile @@ -18784,6 +18931,23 @@ type ImagePrototype struct { // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` + // A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image. + // + // That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be + // provided), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the + // [Hyper Protect Crypto Service](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys). + // + // If this property is not provided, the imported image is treated as unencrypted. + EncryptedDataKey *string `json:"encrypted_data_key,omitempty"` + + // A reference to the root key that was used to wrap the data key (which is ultimately + // represented as `encrypted_data_key`). Additionally, the root key will be used to encrypt + // volumes created from this image (unless an alternate `encryption_key` is provided at + // volume creation). + // + // If this property is not provided, the imported image is treated as unencrypted. + EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"` + // The resource group to use. If unspecified, the account's [default resource // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` @@ -18812,6 +18976,14 @@ func UnmarshalImagePrototype(m map[string]json.RawMessage, result interface{}) ( if err != nil { return } + err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey) + if err != nil { + return + } + err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) + if err != nil { + return + } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return @@ -19600,6 +19772,68 @@ func UnmarshalInstanceGroupManagerCollectionNext(m map[string]json.RawMessage, r return } +// InstanceGroupManagerPatch : InstanceGroupManagerPatch struct +type InstanceGroupManagerPatch struct { + // The user-defined name for this instance group manager. Names must be unique within the instance group. + Name *string `json:"name,omitempty"` + + // If set to `true`, this manager will control the instance group. + ManagementEnabled *bool `json:"management_enabled,omitempty"` + + // The time window in seconds to aggregate metrics prior to evaluation. + AggregationWindow *int64 `json:"aggregation_window,omitempty"` + + // The duration of time in seconds to pause further scale actions after scaling has taken place. + Cooldown *int64 `json:"cooldown,omitempty"` + + // The maximum number of members in a managed instance group. + MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` + + // The minimum number of members in a managed instance group. + MinMembershipCount *int64 `json:"min_membership_count,omitempty"` +} + +// UnmarshalInstanceGroupManagerPatch unmarshals an instance of InstanceGroupManagerPatch from the specified map of raw messages. +func UnmarshalInstanceGroupManagerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "management_enabled", &obj.ManagementEnabled) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "aggregation_window", &obj.AggregationWindow) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "cooldown", &obj.Cooldown) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "max_membership_count", &obj.MaxMembershipCount) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "min_membership_count", &obj.MinMembershipCount) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstanceGroupManagerPatch +func (instanceGroupManagerPatch *InstanceGroupManagerPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instanceGroupManagerPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // InstanceGroupManagerPolicy : InstanceGroupManagerPolicy struct // Models which "extend" this model: // - InstanceGroupManagerPolicyInstanceGroupManagerTargetPolicy @@ -19758,6 +19992,57 @@ func UnmarshalInstanceGroupManagerPolicyCollectionNext(m map[string]json.RawMess return } +// InstanceGroupManagerPolicyPatch : InstanceGroupManagerPolicyPatch struct +type InstanceGroupManagerPolicyPatch struct { + // The user-defined name for this instance group manager policy. Names must be unique within the instance group + // manager. + Name *string `json:"name,omitempty"` + + // The type of metric to be evaluated. + MetricType *string `json:"metric_type,omitempty"` + + // The metric value to be evaluated. + MetricValue *int64 `json:"metric_value,omitempty"` +} + +// Constants associated with the InstanceGroupManagerPolicyPatch.MetricType property. +// The type of metric to be evaluated. +const ( + InstanceGroupManagerPolicyPatchMetricTypeCpuConst = "cpu" + InstanceGroupManagerPolicyPatchMetricTypeMemoryConst = "memory" + InstanceGroupManagerPolicyPatchMetricTypeNetworkInConst = "network_in" + InstanceGroupManagerPolicyPatchMetricTypeNetworkOutConst = "network_out" +) + +// UnmarshalInstanceGroupManagerPolicyPatch unmarshals an instance of InstanceGroupManagerPolicyPatch from the specified map of raw messages. +func UnmarshalInstanceGroupManagerPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupManagerPolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "metric_type", &obj.MetricType) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "metric_value", &obj.MetricValue) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstanceGroupManagerPolicyPatch +func (instanceGroupManagerPolicyPatch *InstanceGroupManagerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instanceGroupManagerPolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // InstanceGroupManagerPolicyPrototype : InstanceGroupManagerPolicyPrototype struct // Models which "extend" this model: // - InstanceGroupManagerPolicyPrototypeInstanceGroupManagerTargetPolicyPrototype @@ -20123,6 +20408,107 @@ func UnmarshalInstanceGroupMembershipCollectionNext(m map[string]json.RawMessage return } +// InstanceGroupMembershipPatch : InstanceGroupMembershipPatch struct +type InstanceGroupMembershipPatch struct { + // The user-defined name for this instance group membership. Names must be unique within the instance group. + Name *string `json:"name,omitempty"` +} + +// UnmarshalInstanceGroupMembershipPatch unmarshals an instance of InstanceGroupMembershipPatch from the specified map of raw messages. +func UnmarshalInstanceGroupMembershipPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupMembershipPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstanceGroupMembershipPatch +func (instanceGroupMembershipPatch *InstanceGroupMembershipPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instanceGroupMembershipPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + +// InstanceGroupPatch : To add or update load balancer specification for an instance group the `membership_count` must first be set to 0. +type InstanceGroupPatch struct { + // The user-defined name for this instance group. + Name *string `json:"name,omitempty"` + + // The number of instances in the instance group. + MembershipCount *int64 `json:"membership_count,omitempty"` + + // Instance template to use when creating new instances. + InstanceTemplate InstanceTemplateIdentityIntf `json:"instance_template,omitempty"` + + // Array of identities to subnets to use when creating new instances. + Subnets []SubnetIdentityIntf `json:"subnets,omitempty"` + + // Required if specifying a load balancer pool only. Used by the instance group when scaling up instances to supply the + // port for the load balancer pool member. + ApplicationPort *int64 `json:"application_port,omitempty"` + + // The load balancer that the load balancer pool used by this group + // is in. Must be supplied when using a load balancer pool. + LoadBalancer LoadBalancerIdentityIntf `json:"load_balancer,omitempty"` + + // When specified, the load balancer pool will be managed by this + // group. Instances created by this group will have a new load + // balancer pool member in that pool created. Must be used with + // `application_port`. + LoadBalancerPool LoadBalancerPoolIdentityIntf `json:"load_balancer_pool,omitempty"` +} + +// UnmarshalInstanceGroupPatch unmarshals an instance of InstanceGroupPatch from the specified map of raw messages. +func UnmarshalInstanceGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceGroupPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "membership_count", &obj.MembershipCount) + if err != nil { + return + } + err = core.UnmarshalModel(m, "instance_template", &obj.InstanceTemplate, UnmarshalInstanceTemplateIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "subnets", &obj.Subnets, UnmarshalSubnetIdentity) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "application_port", &obj.ApplicationPort) + if err != nil { + return + } + err = core.UnmarshalModel(m, "load_balancer", &obj.LoadBalancer, UnmarshalLoadBalancerIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "load_balancer_pool", &obj.LoadBalancerPool, UnmarshalLoadBalancerPoolIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstanceGroupPatch +func (instanceGroupPatch *InstanceGroupPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instanceGroupPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // InstanceGroupReference : InstanceGroupReference struct type InstanceGroupReference struct { // The unique identifier for this instance group. @@ -20208,6 +20594,33 @@ func UnmarshalInstanceInitializationPassword(m map[string]json.RawMessage, resul return } +// InstancePatch : InstancePatch struct +type InstancePatch struct { + // The user-defined name for this virtual server instance (and default system hostname). + Name *string `json:"name,omitempty"` +} + +// UnmarshalInstancePatch unmarshals an instance of InstancePatch from the specified map of raw messages. +func UnmarshalInstancePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstancePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstancePatch +func (instancePatch *InstancePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instancePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // InstanceProfile : InstanceProfile struct type InstanceProfile struct { // The name for this virtual server instance profile. @@ -21127,6 +21540,33 @@ func UnmarshalInstanceTemplateIdentity(m map[string]json.RawMessage, result inte return } +// InstanceTemplatePatch : InstanceTemplatePatch struct +type InstanceTemplatePatch struct { + // The unique user-defined name for this instance template. + Name *string `json:"name,omitempty"` +} + +// UnmarshalInstanceTemplatePatch unmarshals an instance of InstanceTemplatePatch from the specified map of raw messages. +func UnmarshalInstanceTemplatePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(InstanceTemplatePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the InstanceTemplatePatch +func (instanceTemplatePatch *InstanceTemplatePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(instanceTemplatePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // InstanceTemplatePrototype : InstanceTemplatePrototype struct // Models which "extend" this model: // - InstanceTemplatePrototypeInstanceByImage @@ -21459,6 +21899,33 @@ func UnmarshalKeyIdentity(m map[string]json.RawMessage, result interface{}) (err return } +// KeyPatch : KeyPatch struct +type KeyPatch struct { + // The user-defined name for this key. + Name *string `json:"name,omitempty"` +} + +// UnmarshalKeyPatch unmarshals an instance of KeyPatch from the specified map of raw messages. +func UnmarshalKeyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(KeyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the KeyPatch +func (keyPatch *KeyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(keyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // KeyReferenceInstanceInitializationContext : KeyReferenceInstanceInitializationContext struct // Models which "extend" this model: // - KeyReferenceInstanceInitializationContextKeyReference @@ -21707,7 +22174,7 @@ func (options *ListIkePoliciesOptions) SetHeaders(param map[string]string) *List // ListIkePolicyConnectionsOptions : The ListIkePolicyConnections options. type ListIkePolicyConnectionsOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21805,10 +22272,10 @@ func (options *ListImagesOptions) SetHeaders(param map[string]string) *ListImage // ListInstanceGroupManagerPoliciesOptions : The ListInstanceGroupManagerPolicies options. type ListInstanceGroupManagerPoliciesOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required"` + InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21843,7 +22310,7 @@ func (options *ListInstanceGroupManagerPoliciesOptions) SetHeaders(param map[str // ListInstanceGroupManagersOptions : The ListInstanceGroupManagers options. type ListInstanceGroupManagersOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21871,7 +22338,7 @@ func (options *ListInstanceGroupManagersOptions) SetHeaders(param map[string]str // ListInstanceGroupMembershipsOptions : The ListInstanceGroupMemberships options. type ListInstanceGroupMembershipsOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21934,10 +22401,10 @@ func (options *ListInstanceGroupsOptions) SetHeaders(param map[string]string) *L // ListInstanceNetworkInterfaceFloatingIpsOptions : The ListInstanceNetworkInterfaceFloatingIps options. type ListInstanceNetworkInterfaceFloatingIpsOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -21972,7 +22439,7 @@ func (options *ListInstanceNetworkInterfaceFloatingIpsOptions) SetHeaders(param // ListInstanceNetworkInterfacesOptions : The ListInstanceNetworkInterfaces options. type ListInstanceNetworkInterfacesOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22036,7 +22503,7 @@ func (options *ListInstanceTemplatesOptions) SetHeaders(param map[string]string) // ListInstanceVolumeAttachmentsOptions : The ListInstanceVolumeAttachments options. type ListInstanceVolumeAttachmentsOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22180,7 +22647,7 @@ func (options *ListIpsecPoliciesOptions) SetHeaders(param map[string]string) *Li // ListIpsecPolicyConnectionsOptions : The ListIpsecPolicyConnections options. type ListIpsecPolicyConnectionsOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22235,10 +22702,10 @@ func (options *ListKeysOptions) SetHeaders(param map[string]string) *ListKeysOpt // ListLoadBalancerListenerPoliciesOptions : The ListLoadBalancerListenerPolicies options. type ListLoadBalancerListenerPoliciesOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22273,13 +22740,13 @@ func (options *ListLoadBalancerListenerPoliciesOptions) SetHeaders(param map[str // ListLoadBalancerListenerPolicyRulesOptions : The ListLoadBalancerListenerPolicyRules options. type ListLoadBalancerListenerPolicyRulesOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22321,7 +22788,7 @@ func (options *ListLoadBalancerListenerPolicyRulesOptions) SetHeaders(param map[ // ListLoadBalancerListenersOptions : The ListLoadBalancerListeners options. type ListLoadBalancerListenersOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22349,10 +22816,10 @@ func (options *ListLoadBalancerListenersOptions) SetHeaders(param map[string]str // ListLoadBalancerPoolMembersOptions : The ListLoadBalancerPoolMembers options. type ListLoadBalancerPoolMembersOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22387,7 +22854,7 @@ func (options *ListLoadBalancerPoolMembersOptions) SetHeaders(param map[string]s // ListLoadBalancerPoolsOptions : The ListLoadBalancerPools options. type ListLoadBalancerPoolsOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22468,7 +22935,7 @@ func (options *ListLoadBalancersOptions) SetHeaders(param map[string]string) *Li // ListNetworkACLRulesOptions : The ListNetworkACLRules options. type ListNetworkACLRulesOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // A server-supplied token determining what resource to start the page on. Start *string `json:"start,omitempty"` @@ -22655,7 +23122,7 @@ func (options *ListPublicGatewaysOptions) SetHeaders(param map[string]string) *L // ListRegionZonesOptions : The ListRegionZones options. type ListRegionZonesOptions struct { // The region name. - RegionName *string `json:"region_name" validate:"required"` + RegionName *string `json:"region_name" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22701,7 +23168,7 @@ func (options *ListRegionsOptions) SetHeaders(param map[string]string) *ListRegi // ListSecurityGroupNetworkInterfacesOptions : The ListSecurityGroupNetworkInterfaces options. type ListSecurityGroupNetworkInterfacesOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // A server-supplied token determining what resource to start the page on. Start *string `json:"start,omitempty"` @@ -22747,7 +23214,7 @@ func (options *ListSecurityGroupNetworkInterfacesOptions) SetHeaders(param map[s // ListSecurityGroupRulesOptions : The ListSecurityGroupRules options. type ListSecurityGroupRulesOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -22980,7 +23447,7 @@ func (options *ListVolumesOptions) SetHeaders(param map[string]string) *ListVolu // ListVPCAddressPrefixesOptions : The ListVPCAddressPrefixes options. type ListVPCAddressPrefixesOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // A server-supplied token determining what resource to start the page on. Start *string `json:"start,omitempty"` @@ -23026,7 +23493,7 @@ func (options *ListVPCAddressPrefixesOptions) SetHeaders(param map[string]string // ListVPCRoutesOptions : The ListVPCRoutes options. type ListVPCRoutesOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // Filters the collection to resources in the zone with the exact specified name. ZoneName *string `json:"zone.name,omitempty"` @@ -23119,10 +23586,10 @@ func (options *ListVpcsOptions) SetHeaders(param map[string]string) *ListVpcsOpt // ListVPNGatewayConnectionLocalCIDRsOptions : The ListVPNGatewayConnectionLocalCIDRs options. type ListVPNGatewayConnectionLocalCIDRsOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -23157,10 +23624,10 @@ func (options *ListVPNGatewayConnectionLocalCIDRsOptions) SetHeaders(param map[s // ListVPNGatewayConnectionPeerCIDRsOptions : The ListVPNGatewayConnectionPeerCIDRs options. type ListVPNGatewayConnectionPeerCIDRsOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -23195,7 +23662,7 @@ func (options *ListVPNGatewayConnectionPeerCIDRsOptions) SetHeaders(param map[st // ListVPNGatewayConnectionsOptions : The ListVPNGatewayConnections options. type ListVPNGatewayConnectionsOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // Filters the collection to VPN gateway connections with the specified status. Status *string `json:"status,omitempty"` @@ -23593,6 +24060,72 @@ func UnmarshalLoadBalancerListenerCollection(m map[string]json.RawMessage, resul return } +// LoadBalancerListenerPatch : LoadBalancerListenerPatch struct +type LoadBalancerListenerPatch struct { + // The connection limit of the listener. + ConnectionLimit *int64 `json:"connection_limit,omitempty"` + + // The listener port number. + Port *int64 `json:"port,omitempty"` + + // The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application` + // family support `tcp`, `http`, and `https`. + Protocol *string `json:"protocol,omitempty"` + + // The certificate instance used for SSL termination. It is applicable only to `https` + // protocol. + CertificateInstance CertificateInstanceIdentityIntf `json:"certificate_instance,omitempty"` + + // The default pool associated with the listener. + DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"` +} + +// Constants associated with the LoadBalancerListenerPatch.Protocol property. +// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application` +// family support `tcp`, `http`, and `https`. +const ( + LoadBalancerListenerPatchProtocolHTTPConst = "http" + LoadBalancerListenerPatchProtocolHTTPSConst = "https" + LoadBalancerListenerPatchProtocolTCPConst = "tcp" +) + +// UnmarshalLoadBalancerListenerPatch unmarshals an instance of LoadBalancerListenerPatch from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPatch) + err = core.UnmarshalPrimitive(m, "connection_limit", &obj.ConnectionLimit) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "port", &obj.Port) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) + if err != nil { + return + } + err = core.UnmarshalModel(m, "certificate_instance", &obj.CertificateInstance, UnmarshalCertificateInstanceIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "default_pool", &obj.DefaultPool, UnmarshalLoadBalancerPoolIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerListenerPatch +func (loadBalancerListenerPatch *LoadBalancerListenerPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerListenerPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerListenerPolicy : LoadBalancerListenerPolicy struct type LoadBalancerListenerPolicy struct { // The policy's unique identifier. @@ -23621,7 +24154,7 @@ type LoadBalancerListenerPolicy struct { // `LoadBalancerPoolReference` is in the response if `action` is `forward`. // `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`. - Target LoadBalancerListenerPolicyTargetReferenceIntf `json:"target,omitempty"` + Target LoadBalancerListenerPolicyTargetIntf `json:"target,omitempty"` } // Constants associated with the LoadBalancerListenerPolicy.Action property. @@ -23678,7 +24211,7 @@ func UnmarshalLoadBalancerListenerPolicy(m map[string]json.RawMessage, result in if err != nil { return } - err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTargetReference) + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyTarget) if err != nil { return } @@ -23703,6 +24236,50 @@ func UnmarshalLoadBalancerListenerPolicyCollection(m map[string]json.RawMessage, return } +// LoadBalancerListenerPolicyPatch : LoadBalancerListenerPolicyPatch struct +type LoadBalancerListenerPolicyPatch struct { + // The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in. + Name *string `json:"name,omitempty"` + + // Priority of the policy. Lower value indicates higher priority. + Priority *int64 `json:"priority,omitempty"` + + // When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load + // balancer forwards the traffic to. When `action` is `redirect`, + // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http + // status code used in the redirect response. + Target LoadBalancerListenerPolicyPatchTargetIntf `json:"target,omitempty"` +} + +// UnmarshalLoadBalancerListenerPolicyPatch unmarshals an instance of LoadBalancerListenerPolicyPatch from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "priority", &obj.Priority) + if err != nil { + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerListenerPolicyPatchTarget) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyPatch +func (loadBalancerListenerPolicyPatch *LoadBalancerListenerPolicyPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerListenerPolicyPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerListenerPolicyPatchTarget : When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load balancer forwards the traffic // to. When `action` is `redirect`, // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http status code used in the redirect response. @@ -24006,6 +24583,70 @@ func UnmarshalLoadBalancerListenerPolicyRuleCollection(m map[string]json.RawMess return } +// LoadBalancerListenerPolicyRulePatch : LoadBalancerListenerPolicyRulePatch struct +type LoadBalancerListenerPolicyRulePatch struct { + // The condition of the rule. + Condition *string `json:"condition,omitempty"` + + // HTTP header field. This is only applicable to "header" rule type. + Field *string `json:"field,omitempty"` + + // The type of the rule. + Type *string `json:"type,omitempty"` + + // Value to be matched for rule condition. + Value *string `json:"value,omitempty"` +} + +// Constants associated with the LoadBalancerListenerPolicyRulePatch.Condition property. +// The condition of the rule. +const ( + LoadBalancerListenerPolicyRulePatchConditionContainsConst = "contains" + LoadBalancerListenerPolicyRulePatchConditionEqualsConst = "equals" + LoadBalancerListenerPolicyRulePatchConditionMatchesRegexConst = "matches_regex" +) + +// Constants associated with the LoadBalancerListenerPolicyRulePatch.Type property. +// The type of the rule. +const ( + LoadBalancerListenerPolicyRulePatchTypeHeaderConst = "header" + LoadBalancerListenerPolicyRulePatchTypeHostnameConst = "hostname" + LoadBalancerListenerPolicyRulePatchTypePathConst = "path" +) + +// UnmarshalLoadBalancerListenerPolicyRulePatch unmarshals an instance of LoadBalancerListenerPolicyRulePatch from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyRulePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyRulePatch) + err = core.UnmarshalPrimitive(m, "condition", &obj.Condition) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "field", &obj.Field) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "value", &obj.Value) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerListenerPolicyRulePatch +func (loadBalancerListenerPolicyRulePatch *LoadBalancerListenerPolicyRulePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerListenerPolicyRulePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerListenerPolicyRulePrototype : LoadBalancerListenerPolicyRulePrototype struct type LoadBalancerListenerPolicyRulePrototype struct { // The condition of the rule. @@ -24095,12 +24736,12 @@ func UnmarshalLoadBalancerListenerPolicyRuleReference(m map[string]json.RawMessa return } -// LoadBalancerListenerPolicyTargetReference : `LoadBalancerPoolReference` is in the response if `action` is `forward`. +// LoadBalancerListenerPolicyTarget : `LoadBalancerPoolReference` is in the response if `action` is `forward`. // `LoadBalancerListenerPolicyRedirectURL` is in the response if `action` is `redirect`. // Models which "extend" this model: -// - LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference -// - LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL -type LoadBalancerListenerPolicyTargetReference struct { +// - LoadBalancerListenerPolicyTargetLoadBalancerPoolReference +// - LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL +type LoadBalancerListenerPolicyTarget struct { // The unique identifier for this load balancer pool. ID *string `json:"id,omitempty"` @@ -24117,17 +24758,17 @@ type LoadBalancerListenerPolicyTargetReference struct { URL *string `json:"url,omitempty"` } -func (*LoadBalancerListenerPolicyTargetReference) isaLoadBalancerListenerPolicyTargetReference() bool { +func (*LoadBalancerListenerPolicyTarget) isaLoadBalancerListenerPolicyTarget() bool { return true } -type LoadBalancerListenerPolicyTargetReferenceIntf interface { - isaLoadBalancerListenerPolicyTargetReference() bool +type LoadBalancerListenerPolicyTargetIntf interface { + isaLoadBalancerListenerPolicyTarget() bool } -// UnmarshalLoadBalancerListenerPolicyTargetReference unmarshals an instance of LoadBalancerListenerPolicyTargetReference from the specified map of raw messages. -func UnmarshalLoadBalancerListenerPolicyTargetReference(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerListenerPolicyTargetReference) +// UnmarshalLoadBalancerListenerPolicyTarget unmarshals an instance of LoadBalancerListenerPolicyTarget from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyTarget(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyTarget) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return @@ -24234,6 +24875,33 @@ func UnmarshalLoadBalancerListenerReference(m map[string]json.RawMessage, result return } +// LoadBalancerPatch : LoadBalancerPatch struct +type LoadBalancerPatch struct { + // The unique user-defined name for this load balancer. + Name *string `json:"name,omitempty"` +} + +// UnmarshalLoadBalancerPatch unmarshals an instance of LoadBalancerPatch from the specified map of raw messages. +func UnmarshalLoadBalancerPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerPatch +func (loadBalancerPatch *LoadBalancerPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerPool : LoadBalancerPool struct type LoadBalancerPool struct { // The unique identifier for this load balancer pool. @@ -24752,6 +25420,50 @@ func UnmarshalLoadBalancerPoolMemberCollection(m map[string]json.RawMessage, res return } +// LoadBalancerPoolMemberPatch : LoadBalancerPoolMemberPatch struct +type LoadBalancerPoolMemberPatch struct { + // The port number of the application running in the server member. + Port *int64 `json:"port,omitempty"` + + // Weight of the server member. This takes effect only when the load balancing algorithm of its belonging pool is + // `weighted_round_robin`. + Weight *int64 `json:"weight,omitempty"` + + // The pool member target. Load balancers in the `network` family + // support instances. Load balancers in the `application` family support + // IP addresses. + Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target,omitempty"` +} + +// UnmarshalLoadBalancerPoolMemberPatch unmarshals an instance of LoadBalancerPoolMemberPatch from the specified map of raw messages. +func UnmarshalLoadBalancerPoolMemberPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolMemberPatch) + err = core.UnmarshalPrimitive(m, "port", &obj.Port) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "weight", &obj.Weight) + if err != nil { + return + } + err = core.UnmarshalModel(m, "target", &obj.Target, UnmarshalLoadBalancerPoolMemberTargetPrototype) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerPoolMemberPatch +func (loadBalancerPoolMemberPatch *LoadBalancerPoolMemberPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerPoolMemberPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerPoolMemberPrototype : LoadBalancerPoolMemberPrototype struct type LoadBalancerPoolMemberPrototype struct { // The port number of the application running in the server member. @@ -24931,6 +25643,85 @@ func UnmarshalLoadBalancerPoolMemberTargetPrototype(m map[string]json.RawMessage return } +// LoadBalancerPoolPatch : LoadBalancerPoolPatch struct +type LoadBalancerPoolPatch struct { + // The user-defined name for this load balancer pool. + Name *string `json:"name,omitempty"` + + // The load balancing algorithm. + Algorithm *string `json:"algorithm,omitempty"` + + // The protocol used for this load balancer pool. + // + // 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 pool on which the + // unexpected property value was encountered. + Protocol *string `json:"protocol,omitempty"` + + // The health monitor of this pool. + HealthMonitor *LoadBalancerPoolHealthMonitorPatch `json:"health_monitor,omitempty"` + + // The session persistence of this pool. + SessionPersistence *LoadBalancerPoolSessionPersistencePatch `json:"session_persistence,omitempty"` +} + +// Constants associated with the LoadBalancerPoolPatch.Algorithm property. +// The load balancing algorithm. +const ( + LoadBalancerPoolPatchAlgorithmLeastConnectionsConst = "least_connections" + LoadBalancerPoolPatchAlgorithmRoundRobinConst = "round_robin" + LoadBalancerPoolPatchAlgorithmWeightedRoundRobinConst = "weighted_round_robin" +) + +// Constants associated with the LoadBalancerPoolPatch.Protocol property. +// The protocol used for this load balancer pool. +// +// 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 pool on which the +// unexpected property value was encountered. +const ( + LoadBalancerPoolPatchProtocolHTTPConst = "http" + LoadBalancerPoolPatchProtocolHTTPSConst = "https" + LoadBalancerPoolPatchProtocolTCPConst = "tcp" +) + +// UnmarshalLoadBalancerPoolPatch unmarshals an instance of LoadBalancerPoolPatch from the specified map of raw messages. +func UnmarshalLoadBalancerPoolPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerPoolPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "algorithm", &obj.Algorithm) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "protocol", &obj.Protocol) + if err != nil { + return + } + err = core.UnmarshalModel(m, "health_monitor", &obj.HealthMonitor, UnmarshalLoadBalancerPoolHealthMonitorPatch) + if err != nil { + return + } + err = core.UnmarshalModel(m, "session_persistence", &obj.SessionPersistence, UnmarshalLoadBalancerPoolSessionPersistencePatch) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the LoadBalancerPoolPatch +func (loadBalancerPoolPatch *LoadBalancerPoolPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(loadBalancerPoolPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // LoadBalancerPoolPrototype : LoadBalancerPoolPrototype struct type LoadBalancerPoolPrototype struct { // The user-defined name for this load balancer pool. If unspecified, the name will be a hyphenated list of @@ -25549,6 +26340,33 @@ func UnmarshalNetworkACLIdentity(m map[string]json.RawMessage, result interface{ return } +// NetworkACLPatch : NetworkACLPatch struct +type NetworkACLPatch struct { + // The user-defined name for this network ACL. Names must be unique within the VPC the Network ACL resides in. + Name *string `json:"name,omitempty"` +} + +// UnmarshalNetworkACLPatch unmarshals an instance of NetworkACLPatch from the specified map of raw messages. +func UnmarshalNetworkACLPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the NetworkACLPatch +func (networkACLPatch *NetworkACLPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(networkACLPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // NetworkACLPrototype : NetworkACLPrototype struct // Models which "extend" this model: // - NetworkACLPrototypeNetworkACLByRules @@ -26012,6 +26830,125 @@ func UnmarshalNetworkACLRuleItem(m map[string]json.RawMessage, result interface{ return } +// NetworkACLRulePatch : NetworkACLRulePatch struct +type NetworkACLRulePatch struct { + // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. + Name *string `json:"name,omitempty"` + + // Whether to allow or deny matching traffic. + Action *string `json:"action,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"` + + // Whether the traffic to be matched is `inbound` or `outbound`. + Direction *string `json:"direction,omitempty"` + + // 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. + DestinationPortMax *int64 `json:"destination_port_max,omitempty"` + + // The inclusive lower bound of TCP/UDP destination port range. + DestinationPortMin *int64 `json:"destination_port_min,omitempty"` + + // The inclusive upper bound of TCP/UDP source port range. + SourcePortMax *int64 `json:"source_port_max,omitempty"` + + // The inclusive lower bound of TCP/UDP source port range. + SourcePortMin *int64 `json:"source_port_min,omitempty"` + + // The ICMP traffic code to allow. + Code *int64 `json:"code,omitempty"` + + // The ICMP traffic type to allow. + Type *int64 `json:"type,omitempty"` + + // The rule to move this rule immediately before. Specify `null` to move this rule after + // all existing rules. + Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` +} + +// Constants associated with the NetworkACLRulePatch.Action property. +// Whether to allow or deny matching traffic. +const ( + NetworkACLRulePatchActionAllowConst = "allow" + NetworkACLRulePatchActionDenyConst = "deny" +) + +// Constants associated with the NetworkACLRulePatch.Direction property. +// Whether the traffic to be matched is `inbound` or `outbound`. +const ( + NetworkACLRulePatchDirectionInboundConst = "inbound" + NetworkACLRulePatchDirectionOutboundConst = "outbound" +) + +// UnmarshalNetworkACLRulePatch unmarshals an instance of NetworkACLRulePatch from the specified map of raw messages. +func UnmarshalNetworkACLRulePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkACLRulePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "action", &obj.Action) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "destination", &obj.Destination) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "source", &obj.Source) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "destination_port_max", &obj.DestinationPortMax) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "destination_port_min", &obj.DestinationPortMin) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "source_port_max", &obj.SourcePortMax) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "source_port_min", &obj.SourcePortMin) + 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 + } + err = core.UnmarshalModel(m, "before", &obj.Before, UnmarshalNetworkACLRuleIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the NetworkACLRulePatch +func (networkACLRulePatch *NetworkACLRulePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(networkACLRulePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // NetworkACLRulePrototype : NetworkACLRulePrototype struct // Models which "extend" this model: // - NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp @@ -26506,6 +27443,33 @@ func UnmarshalNetworkInterfaceInstanceContextReference(m map[string]json.RawMess return } +// NetworkInterfacePatch : NetworkInterfacePatch struct +type NetworkInterfacePatch struct { + // The user-defined name for this network interface. + Name *string `json:"name,omitempty"` +} + +// UnmarshalNetworkInterfacePatch unmarshals an instance of NetworkInterfacePatch from the specified map of raw messages. +func UnmarshalNetworkInterfacePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(NetworkInterfacePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the NetworkInterfacePatch +func (networkInterfacePatch *NetworkInterfacePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(networkInterfacePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // NetworkInterfacePrototype : NetworkInterfacePrototype struct type NetworkInterfacePrototype struct { // The user-defined name for this network interface. If unspecified, the name will be a hyphenated list of @@ -27060,6 +28024,33 @@ func UnmarshalPublicGatewayIdentity(m map[string]json.RawMessage, result interfa return } +// PublicGatewayPatch : PublicGatewayPatch struct +type PublicGatewayPatch struct { + // The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. + Name *string `json:"name,omitempty"` +} + +// UnmarshalPublicGatewayPatch unmarshals an instance of PublicGatewayPatch from the specified map of raw messages. +func UnmarshalPublicGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(PublicGatewayPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the PublicGatewayPatch +func (publicGatewayPatch *PublicGatewayPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(publicGatewayPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // PublicGatewayPrototypeFloatingIP : PublicGatewayPrototypeFloatingIP struct // Models which "extend" this model: // - PublicGatewayPrototypeFloatingIPFloatingIPIdentity @@ -27265,13 +28256,13 @@ func UnmarshalRegionReference(m map[string]json.RawMessage, result interface{}) // RemoveInstanceNetworkInterfaceFloatingIPOptions : The RemoveInstanceNetworkInterfaceFloatingIP options. type RemoveInstanceNetworkInterfaceFloatingIPOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - NetworkInterfaceID *string `json:"network_interface_id" validate:"required"` + NetworkInterfaceID *string `json:"network_interface_id" validate:"required,ne="` // The floating IP identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -27313,10 +28304,10 @@ func (options *RemoveInstanceNetworkInterfaceFloatingIPOptions) SetHeaders(param // RemoveSecurityGroupNetworkInterfaceOptions : The RemoveSecurityGroupNetworkInterface options. type RemoveSecurityGroupNetworkInterfaceOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -27351,16 +28342,16 @@ func (options *RemoveSecurityGroupNetworkInterfaceOptions) SetHeaders(param map[ // RemoveVPNGatewayConnectionLocalCIDROptions : The RemoveVPNGatewayConnectionLocalCIDR options. type RemoveVPNGatewayConnectionLocalCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -27409,16 +28400,16 @@ func (options *RemoveVPNGatewayConnectionLocalCIDROptions) SetHeaders(param map[ // RemoveVPNGatewayConnectionPeerCIDROptions : The RemoveVPNGatewayConnectionPeerCIDR options. type RemoveVPNGatewayConnectionPeerCIDROptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The address prefix part of the CIDR. - CIDRPrefix *string `json:"cidr_prefix" validate:"required"` + CIDRPrefix *string `json:"cidr_prefix" validate:"required,ne="` // The prefix length part of the CIDR. - PrefixLength *string `json:"prefix_length" validate:"required"` + PrefixLength *string `json:"prefix_length" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -27467,10 +28458,10 @@ func (options *RemoveVPNGatewayConnectionPeerCIDROptions) SetHeaders(param map[s // ReplaceLoadBalancerPoolMembersOptions : The ReplaceLoadBalancerPoolMembers options. type ReplaceLoadBalancerPoolMembersOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // Array of pool member prototype objects. Members []LoadBalancerPoolMemberPrototype `json:"members" validate:"required"` @@ -27515,7 +28506,7 @@ func (options *ReplaceLoadBalancerPoolMembersOptions) SetHeaders(param map[strin // ReplaceSubnetNetworkACLOptions : The ReplaceSubnetNetworkACL options. type ReplaceSubnetNetworkACLOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The network ACL identity. NetworkACLIdentity NetworkACLIdentityIntf `json:"NetworkACLIdentity" validate:"required"` @@ -27764,6 +28755,33 @@ func UnmarshalRouteNextHopPrototype(m map[string]json.RawMessage, result interfa return } +// RoutePatch : RoutePatch struct +type RoutePatch struct { + // The user-defined name for this route. Names must be unique within the VPC routing table the route resides in. + Name *string `json:"name,omitempty"` +} + +// UnmarshalRoutePatch unmarshals an instance of RoutePatch from the specified map of raw messages. +func UnmarshalRoutePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(RoutePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the RoutePatch +func (routePatch *RoutePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(routePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SecurityGroup : SecurityGroup struct type SecurityGroup struct { // The unique identifier for this security group. @@ -27960,6 +28978,33 @@ func UnmarshalSecurityGroupIdentity(m map[string]json.RawMessage, result interfa return } +// SecurityGroupPatch : SecurityGroupPatch struct +type SecurityGroupPatch struct { + // The user-defined name for this security group. Names must be unique within the VPC the security group resides in. + Name *string `json:"name,omitempty"` +} + +// UnmarshalSecurityGroupPatch unmarshals an instance of SecurityGroupPatch from the specified map of raw messages. +func UnmarshalSecurityGroupPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the SecurityGroupPatch +func (securityGroupPatch *SecurityGroupPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(securityGroupPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SecurityGroupReference : SecurityGroupReference struct type SecurityGroupReference struct { // The unique identifier for this security group. @@ -28116,6 +29161,95 @@ func UnmarshalSecurityGroupRuleCollection(m map[string]json.RawMessage, result i return } +// SecurityGroupRulePatch : SecurityGroupRulePatch struct +type SecurityGroupRulePatch struct { + // 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. A CIDR block of `0.0.0.0/0` will allow traffic from any source (or to + // any source, for outbound rules). + Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` + + // The direction of traffic to enforce, either `inbound` or `outbound`. + Direction *string `json:"direction,omitempty"` + + // 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 ICMP traffic code to allow. + Code *int64 `json:"code,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"` + + // The ICMP traffic type to allow. + Type *int64 `json:"type,omitempty"` +} + +// Constants associated with the SecurityGroupRulePatch.Direction property. +// The direction of traffic to enforce, either `inbound` or `outbound`. +const ( + SecurityGroupRulePatchDirectionInboundConst = "inbound" + SecurityGroupRulePatchDirectionOutboundConst = "outbound" +) + +// Constants associated with the SecurityGroupRulePatch.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 ( + SecurityGroupRulePatchIPVersionIpv4Const = "ipv4" +) + +// UnmarshalSecurityGroupRulePatch unmarshals an instance of SecurityGroupRulePatch from the specified map of raw messages. +func UnmarshalSecurityGroupRulePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SecurityGroupRulePatch) + err = core.UnmarshalModel(m, "remote", &obj.Remote, UnmarshalSecurityGroupRulePatchRemote) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "direction", &obj.Direction) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "ip_version", &obj.IPVersion) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "code", &obj.Code) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "port_max", &obj.PortMax) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "port_min", &obj.PortMin) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the SecurityGroupRulePatch +func (securityGroupRulePatch *SecurityGroupRulePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(securityGroupRulePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SecurityGroupRulePatchRemote : 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. A CIDR block of `0.0.0.0/0` will allow traffic from // any source (or to any source, for outbound rules). @@ -28410,7 +29544,7 @@ func UnmarshalSecurityGroupRuleRemote(m map[string]json.RawMessage, result inter // SetSubnetPublicGatewayOptions : The SetSubnetPublicGateway options. type SetSubnetPublicGatewayOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // The public gateway identity. PublicGatewayIdentity PublicGatewayIdentityIntf `json:"PublicGatewayIdentity" validate:"required"` @@ -28702,6 +29836,47 @@ func UnmarshalSubnetIdentity(m map[string]json.RawMessage, result interface{}) ( return } +// SubnetPatch : SubnetPatch struct +type SubnetPatch struct { + // The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. + Name *string `json:"name,omitempty"` + + // The network ACL to use for this subnet. + NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` + + // The public gateway to handle internet bound traffic for this subnet. + PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"` +} + +// UnmarshalSubnetPatch unmarshals an instance of SubnetPatch from the specified map of raw messages. +func UnmarshalSubnetPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(SubnetPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalModel(m, "network_acl", &obj.NetworkACL, UnmarshalNetworkACLIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "public_gateway", &obj.PublicGateway, UnmarshalPublicGatewayIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the SubnetPatch +func (subnetPatch *SubnetPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(subnetPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // SubnetPrototype : SubnetPrototype struct // Models which "extend" this model: // - SubnetPrototypeSubnetByTotalCount @@ -28839,7 +30014,7 @@ func UnmarshalSubnetReference(m map[string]json.RawMessage, result interface{}) // UnsetSubnetPublicGatewayOptions : The UnsetSubnetPublicGateway options. type UnsetSubnetPublicGatewayOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string @@ -28867,24 +30042,20 @@ func (options *UnsetSubnetPublicGatewayOptions) SetHeaders(param map[string]stri // UpdateFloatingIPOptions : The UpdateFloatingIP options. type UpdateFloatingIPOptions struct { // The floating IP identifier. - ID *string `json:"id" validate:"required"` - - // The unique user-defined name for this floating IP. - Name *string `json:"name,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // 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 FloatingIPPatchTargetNetworkInterfaceIdentityIntf `json:"target,omitempty"` + // The floating IP patch. + FloatingIPPatch map[string]interface{} `json:"FloatingIP_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateFloatingIPOptions : Instantiate UpdateFloatingIPOptions -func (*VpcV1) NewUpdateFloatingIPOptions(id string) *UpdateFloatingIPOptions { +func (*VpcV1) NewUpdateFloatingIPOptions(id string, floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions { return &UpdateFloatingIPOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + FloatingIPPatch: floatingIPPatch, } } @@ -28894,15 +30065,9 @@ func (options *UpdateFloatingIPOptions) SetID(id string) *UpdateFloatingIPOption return options } -// SetName : Allow user to set Name -func (options *UpdateFloatingIPOptions) SetName(name string) *UpdateFloatingIPOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetTarget : Allow user to set Target -func (options *UpdateFloatingIPOptions) SetTarget(target FloatingIPPatchTargetNetworkInterfaceIdentityIntf) *UpdateFloatingIPOptions { - options.Target = target +// SetFloatingIPPatch : Allow user to set FloatingIPPatch +func (options *UpdateFloatingIPOptions) SetFloatingIPPatch(floatingIPPatch map[string]interface{}) *UpdateFloatingIPOptions { + options.FloatingIPPatch = floatingIPPatch return options } @@ -28915,23 +30080,20 @@ func (options *UpdateFloatingIPOptions) SetHeaders(param map[string]string) *Upd // UpdateFlowLogCollectorOptions : The UpdateFlowLogCollector options. type UpdateFlowLogCollectorOptions struct { // The flow log collector identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this flow log collector. - Name *string `json:"name,omitempty"` - - // Indicates whether this collector is active. Updating to false deactivates the collector and updating to true - // activates the collector. - Active *bool `json:"active,omitempty"` + // The flow log collector patch. + FlowLogCollectorPatch map[string]interface{} `json:"FlowLogCollector_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateFlowLogCollectorOptions : Instantiate UpdateFlowLogCollectorOptions -func (*VpcV1) NewUpdateFlowLogCollectorOptions(id string) *UpdateFlowLogCollectorOptions { +func (*VpcV1) NewUpdateFlowLogCollectorOptions(id string, flowLogCollectorPatch map[string]interface{}) *UpdateFlowLogCollectorOptions { return &UpdateFlowLogCollectorOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + FlowLogCollectorPatch: flowLogCollectorPatch, } } @@ -28941,15 +30103,9 @@ func (options *UpdateFlowLogCollectorOptions) SetID(id string) *UpdateFlowLogCol return options } -// SetName : Allow user to set Name -func (options *UpdateFlowLogCollectorOptions) SetName(name string) *UpdateFlowLogCollectorOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetActive : Allow user to set Active -func (options *UpdateFlowLogCollectorOptions) SetActive(active bool) *UpdateFlowLogCollectorOptions { - options.Active = core.BoolPtr(active) +// SetFlowLogCollectorPatch : Allow user to set FlowLogCollectorPatch +func (options *UpdateFlowLogCollectorOptions) SetFlowLogCollectorPatch(flowLogCollectorPatch map[string]interface{}) *UpdateFlowLogCollectorOptions { + options.FlowLogCollectorPatch = flowLogCollectorPatch return options } @@ -28962,50 +30118,20 @@ func (options *UpdateFlowLogCollectorOptions) SetHeaders(param map[string]string // UpdateIkePolicyOptions : The UpdateIkePolicy options. type UpdateIkePolicyOptions struct { // The IKE policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this IKE policy. - Name *string `json:"name,omitempty"` - - // The authentication algorithm. - AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` - - // The Diffie-Hellman group. - DhGroup *int64 `json:"dh_group,omitempty"` - - // The encryption algorithm. - EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` - - // The IKE protocol version. - IkeVersion *int64 `json:"ike_version,omitempty"` - - // The key lifetime in seconds. - KeyLifetime *int64 `json:"key_lifetime,omitempty"` + // The IKE policy patch. + IkePolicyPatch map[string]interface{} `json:"IKEPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateIkePolicyOptions.AuthenticationAlgorithm property. -// The authentication algorithm. -const ( - UpdateIkePolicyOptionsAuthenticationAlgorithmMd5Const = "md5" - UpdateIkePolicyOptionsAuthenticationAlgorithmSha1Const = "sha1" - UpdateIkePolicyOptionsAuthenticationAlgorithmSha256Const = "sha256" -) - -// Constants associated with the UpdateIkePolicyOptions.EncryptionAlgorithm property. -// The encryption algorithm. -const ( - UpdateIkePolicyOptionsEncryptionAlgorithmAes128Const = "aes128" - UpdateIkePolicyOptionsEncryptionAlgorithmAes256Const = "aes256" - UpdateIkePolicyOptionsEncryptionAlgorithmTripleDesConst = "triple_des" -) - // NewUpdateIkePolicyOptions : Instantiate UpdateIkePolicyOptions -func (*VpcV1) NewUpdateIkePolicyOptions(id string) *UpdateIkePolicyOptions { +func (*VpcV1) NewUpdateIkePolicyOptions(id string, ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions { return &UpdateIkePolicyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + IkePolicyPatch: ikePolicyPatch, } } @@ -29015,39 +30141,9 @@ func (options *UpdateIkePolicyOptions) SetID(id string) *UpdateIkePolicyOptions return options } -// SetName : Allow user to set Name -func (options *UpdateIkePolicyOptions) SetName(name string) *UpdateIkePolicyOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm -func (options *UpdateIkePolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *UpdateIkePolicyOptions { - options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm) - return options -} - -// SetDhGroup : Allow user to set DhGroup -func (options *UpdateIkePolicyOptions) SetDhGroup(dhGroup int64) *UpdateIkePolicyOptions { - options.DhGroup = core.Int64Ptr(dhGroup) - return options -} - -// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm -func (options *UpdateIkePolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *UpdateIkePolicyOptions { - options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm) - return options -} - -// SetIkeVersion : Allow user to set IkeVersion -func (options *UpdateIkePolicyOptions) SetIkeVersion(ikeVersion int64) *UpdateIkePolicyOptions { - options.IkeVersion = core.Int64Ptr(ikeVersion) - return options -} - -// SetKeyLifetime : Allow user to set KeyLifetime -func (options *UpdateIkePolicyOptions) SetKeyLifetime(keyLifetime int64) *UpdateIkePolicyOptions { - options.KeyLifetime = core.Int64Ptr(keyLifetime) +// SetIkePolicyPatch : Allow user to set IkePolicyPatch +func (options *UpdateIkePolicyOptions) SetIkePolicyPatch(ikePolicyPatch map[string]interface{}) *UpdateIkePolicyOptions { + options.IkePolicyPatch = ikePolicyPatch return options } @@ -29060,19 +30156,20 @@ func (options *UpdateIkePolicyOptions) SetHeaders(param map[string]string) *Upda // UpdateImageOptions : The UpdateImage options. type UpdateImageOptions struct { // The image identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this image. Names starting with "ibm-" are not allowed. - Name *string `json:"name,omitempty"` + // The image patch. + ImagePatch map[string]interface{} `json:"Image_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateImageOptions : Instantiate UpdateImageOptions -func (*VpcV1) NewUpdateImageOptions(id string) *UpdateImageOptions { +func (*VpcV1) NewUpdateImageOptions(id string, imagePatch map[string]interface{}) *UpdateImageOptions { return &UpdateImageOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + ImagePatch: imagePatch, } } @@ -29082,9 +30179,9 @@ func (options *UpdateImageOptions) SetID(id string) *UpdateImageOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateImageOptions) SetName(name string) *UpdateImageOptions { - options.Name = core.StringPtr(name) +// SetImagePatch : Allow user to set ImagePatch +func (options *UpdateImageOptions) SetImagePatch(imagePatch map[string]interface{}) *UpdateImageOptions { + options.ImagePatch = imagePatch return options } @@ -29097,38 +30194,24 @@ func (options *UpdateImageOptions) SetHeaders(param map[string]string) *UpdateIm // UpdateInstanceGroupManagerOptions : The UpdateInstanceGroupManager options. type UpdateInstanceGroupManagerOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - ID *string `json:"id" validate:"required"` - - // The user-defined name for this instance group manager. Names must be unique within the instance group. - Name *string `json:"name,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // If set to `true`, this manager will control the instance group. - ManagementEnabled *bool `json:"management_enabled,omitempty"` - - // The time window in seconds to aggregate metrics prior to evaluation. - AggregationWindow *int64 `json:"aggregation_window,omitempty"` - - // The duration of time in seconds to pause further scale actions after scaling has taken place. - Cooldown *int64 `json:"cooldown,omitempty"` - - // The maximum number of members in a managed instance group. - MaxMembershipCount *int64 `json:"max_membership_count,omitempty"` - - // The minimum number of members in a managed instance group. - MinMembershipCount *int64 `json:"min_membership_count,omitempty"` + // The instance group manager patch. + InstanceGroupManagerPatch map[string]interface{} `json:"InstanceGroupManager_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceGroupManagerOptions : Instantiate UpdateInstanceGroupManagerOptions -func (*VpcV1) NewUpdateInstanceGroupManagerOptions(instanceGroupID string, id string) *UpdateInstanceGroupManagerOptions { +func (*VpcV1) NewUpdateInstanceGroupManagerOptions(instanceGroupID string, id string, instanceGroupManagerPatch map[string]interface{}) *UpdateInstanceGroupManagerOptions { return &UpdateInstanceGroupManagerOptions{ - InstanceGroupID: core.StringPtr(instanceGroupID), - ID: core.StringPtr(id), + InstanceGroupID: core.StringPtr(instanceGroupID), + ID: core.StringPtr(id), + InstanceGroupManagerPatch: instanceGroupManagerPatch, } } @@ -29144,39 +30227,9 @@ func (options *UpdateInstanceGroupManagerOptions) SetID(id string) *UpdateInstan return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceGroupManagerOptions) SetName(name string) *UpdateInstanceGroupManagerOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetManagementEnabled : Allow user to set ManagementEnabled -func (options *UpdateInstanceGroupManagerOptions) SetManagementEnabled(managementEnabled bool) *UpdateInstanceGroupManagerOptions { - options.ManagementEnabled = core.BoolPtr(managementEnabled) - return options -} - -// SetAggregationWindow : Allow user to set AggregationWindow -func (options *UpdateInstanceGroupManagerOptions) SetAggregationWindow(aggregationWindow int64) *UpdateInstanceGroupManagerOptions { - options.AggregationWindow = core.Int64Ptr(aggregationWindow) - return options -} - -// SetCooldown : Allow user to set Cooldown -func (options *UpdateInstanceGroupManagerOptions) SetCooldown(cooldown int64) *UpdateInstanceGroupManagerOptions { - options.Cooldown = core.Int64Ptr(cooldown) - return options -} - -// SetMaxMembershipCount : Allow user to set MaxMembershipCount -func (options *UpdateInstanceGroupManagerOptions) SetMaxMembershipCount(maxMembershipCount int64) *UpdateInstanceGroupManagerOptions { - options.MaxMembershipCount = core.Int64Ptr(maxMembershipCount) - return options -} - -// SetMinMembershipCount : Allow user to set MinMembershipCount -func (options *UpdateInstanceGroupManagerOptions) SetMinMembershipCount(minMembershipCount int64) *UpdateInstanceGroupManagerOptions { - options.MinMembershipCount = core.Int64Ptr(minMembershipCount) +// SetInstanceGroupManagerPatch : Allow user to set InstanceGroupManagerPatch +func (options *UpdateInstanceGroupManagerOptions) SetInstanceGroupManagerPatch(instanceGroupManagerPatch map[string]interface{}) *UpdateInstanceGroupManagerOptions { + options.InstanceGroupManagerPatch = instanceGroupManagerPatch return options } @@ -29189,43 +30242,28 @@ func (options *UpdateInstanceGroupManagerOptions) SetHeaders(param map[string]st // UpdateInstanceGroupManagerPolicyOptions : The UpdateInstanceGroupManagerPolicy options. type UpdateInstanceGroupManagerPolicyOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group manager identifier. - InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required"` + InstanceGroupManagerID *string `json:"instance_group_manager_id" validate:"required,ne="` // The instance group manager policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this instance group manager policy. Names must be unique within the instance group - // manager. - Name *string `json:"name,omitempty"` - - // The type of metric to be evaluated. - MetricType *string `json:"metric_type,omitempty"` - - // The metric value to be evaluated. - MetricValue *int64 `json:"metric_value,omitempty"` + // The instance group manager policy patch. + InstanceGroupManagerPolicyPatch map[string]interface{} `json:"InstanceGroupManagerPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateInstanceGroupManagerPolicyOptions.MetricType property. -// The type of metric to be evaluated. -const ( - UpdateInstanceGroupManagerPolicyOptionsMetricTypeCpuConst = "cpu" - UpdateInstanceGroupManagerPolicyOptionsMetricTypeMemoryConst = "memory" - UpdateInstanceGroupManagerPolicyOptionsMetricTypeNetworkInConst = "network_in" - UpdateInstanceGroupManagerPolicyOptionsMetricTypeNetworkOutConst = "network_out" -) - // NewUpdateInstanceGroupManagerPolicyOptions : Instantiate UpdateInstanceGroupManagerPolicyOptions -func (*VpcV1) NewUpdateInstanceGroupManagerPolicyOptions(instanceGroupID string, instanceGroupManagerID string, id string) *UpdateInstanceGroupManagerPolicyOptions { +func (*VpcV1) NewUpdateInstanceGroupManagerPolicyOptions(instanceGroupID string, instanceGroupManagerID string, id string, instanceGroupManagerPolicyPatch map[string]interface{}) *UpdateInstanceGroupManagerPolicyOptions { return &UpdateInstanceGroupManagerPolicyOptions{ - InstanceGroupID: core.StringPtr(instanceGroupID), - InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID), - ID: core.StringPtr(id), + InstanceGroupID: core.StringPtr(instanceGroupID), + InstanceGroupManagerID: core.StringPtr(instanceGroupManagerID), + ID: core.StringPtr(id), + InstanceGroupManagerPolicyPatch: instanceGroupManagerPolicyPatch, } } @@ -29247,21 +30285,9 @@ func (options *UpdateInstanceGroupManagerPolicyOptions) SetID(id string) *Update return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceGroupManagerPolicyOptions) SetName(name string) *UpdateInstanceGroupManagerPolicyOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetMetricType : Allow user to set MetricType -func (options *UpdateInstanceGroupManagerPolicyOptions) SetMetricType(metricType string) *UpdateInstanceGroupManagerPolicyOptions { - options.MetricType = core.StringPtr(metricType) - return options -} - -// SetMetricValue : Allow user to set MetricValue -func (options *UpdateInstanceGroupManagerPolicyOptions) SetMetricValue(metricValue int64) *UpdateInstanceGroupManagerPolicyOptions { - options.MetricValue = core.Int64Ptr(metricValue) +// SetInstanceGroupManagerPolicyPatch : Allow user to set InstanceGroupManagerPolicyPatch +func (options *UpdateInstanceGroupManagerPolicyOptions) SetInstanceGroupManagerPolicyPatch(instanceGroupManagerPolicyPatch map[string]interface{}) *UpdateInstanceGroupManagerPolicyOptions { + options.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatch return options } @@ -29274,23 +30300,24 @@ func (options *UpdateInstanceGroupManagerPolicyOptions) SetHeaders(param map[str // UpdateInstanceGroupMembershipOptions : The UpdateInstanceGroupMembership options. type UpdateInstanceGroupMembershipOptions struct { // The instance group identifier. - InstanceGroupID *string `json:"instance_group_id" validate:"required"` + InstanceGroupID *string `json:"instance_group_id" validate:"required,ne="` // The instance group membership identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this instance group membership. Names must be unique within the instance group. - Name *string `json:"name,omitempty"` + // The instance group membership patch. + InstanceGroupMembershipPatch map[string]interface{} `json:"InstanceGroupMembership_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceGroupMembershipOptions : Instantiate UpdateInstanceGroupMembershipOptions -func (*VpcV1) NewUpdateInstanceGroupMembershipOptions(instanceGroupID string, id string) *UpdateInstanceGroupMembershipOptions { +func (*VpcV1) NewUpdateInstanceGroupMembershipOptions(instanceGroupID string, id string, instanceGroupMembershipPatch map[string]interface{}) *UpdateInstanceGroupMembershipOptions { return &UpdateInstanceGroupMembershipOptions{ - InstanceGroupID: core.StringPtr(instanceGroupID), - ID: core.StringPtr(id), + InstanceGroupID: core.StringPtr(instanceGroupID), + ID: core.StringPtr(id), + InstanceGroupMembershipPatch: instanceGroupMembershipPatch, } } @@ -29306,9 +30333,9 @@ func (options *UpdateInstanceGroupMembershipOptions) SetID(id string) *UpdateIns return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceGroupMembershipOptions) SetName(name string) *UpdateInstanceGroupMembershipOptions { - options.Name = core.StringPtr(name) +// SetInstanceGroupMembershipPatch : Allow user to set InstanceGroupMembershipPatch +func (options *UpdateInstanceGroupMembershipOptions) SetInstanceGroupMembershipPatch(instanceGroupMembershipPatch map[string]interface{}) *UpdateInstanceGroupMembershipOptions { + options.InstanceGroupMembershipPatch = instanceGroupMembershipPatch return options } @@ -29321,42 +30348,20 @@ func (options *UpdateInstanceGroupMembershipOptions) SetHeaders(param map[string // UpdateInstanceGroupOptions : The UpdateInstanceGroup options. type UpdateInstanceGroupOptions struct { // The instance group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this instance group. - Name *string `json:"name,omitempty"` - - // The number of instances in the instance group. - MembershipCount *int64 `json:"membership_count,omitempty"` - - // Instance template to use when creating new instances. - InstanceTemplate InstanceTemplateIdentityIntf `json:"instance_template,omitempty"` - - // Array of identities to subnets to use when creating new instances. - Subnets []SubnetIdentityIntf `json:"subnets,omitempty"` - - // Required if specifying a load balancer pool only. Used by the instance group when scaling up instances to supply the - // port for the load balancer pool member. - ApplicationPort *int64 `json:"application_port,omitempty"` - - // The load balancer that the load balancer pool used by this group - // is in. Must be supplied when using a load balancer pool. - LoadBalancer LoadBalancerIdentityIntf `json:"load_balancer,omitempty"` - - // When specified, the load balancer pool will be managed by this - // group. Instances created by this group will have a new load - // balancer pool member in that pool created. Must be used with - // `application_port`. - LoadBalancerPool LoadBalancerPoolIdentityIntf `json:"load_balancer_pool,omitempty"` + // The instance group patch. + InstanceGroupPatch map[string]interface{} `json:"InstanceGroup_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceGroupOptions : Instantiate UpdateInstanceGroupOptions -func (*VpcV1) NewUpdateInstanceGroupOptions(id string) *UpdateInstanceGroupOptions { +func (*VpcV1) NewUpdateInstanceGroupOptions(id string, instanceGroupPatch map[string]interface{}) *UpdateInstanceGroupOptions { return &UpdateInstanceGroupOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + InstanceGroupPatch: instanceGroupPatch, } } @@ -29366,45 +30371,9 @@ func (options *UpdateInstanceGroupOptions) SetID(id string) *UpdateInstanceGroup return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceGroupOptions) SetName(name string) *UpdateInstanceGroupOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetMembershipCount : Allow user to set MembershipCount -func (options *UpdateInstanceGroupOptions) SetMembershipCount(membershipCount int64) *UpdateInstanceGroupOptions { - options.MembershipCount = core.Int64Ptr(membershipCount) - return options -} - -// SetInstanceTemplate : Allow user to set InstanceTemplate -func (options *UpdateInstanceGroupOptions) SetInstanceTemplate(instanceTemplate InstanceTemplateIdentityIntf) *UpdateInstanceGroupOptions { - options.InstanceTemplate = instanceTemplate - return options -} - -// SetSubnets : Allow user to set Subnets -func (options *UpdateInstanceGroupOptions) SetSubnets(subnets []SubnetIdentityIntf) *UpdateInstanceGroupOptions { - options.Subnets = subnets - return options -} - -// SetApplicationPort : Allow user to set ApplicationPort -func (options *UpdateInstanceGroupOptions) SetApplicationPort(applicationPort int64) *UpdateInstanceGroupOptions { - options.ApplicationPort = core.Int64Ptr(applicationPort) - return options -} - -// SetLoadBalancer : Allow user to set LoadBalancer -func (options *UpdateInstanceGroupOptions) SetLoadBalancer(loadBalancer LoadBalancerIdentityIntf) *UpdateInstanceGroupOptions { - options.LoadBalancer = loadBalancer - return options -} - -// SetLoadBalancerPool : Allow user to set LoadBalancerPool -func (options *UpdateInstanceGroupOptions) SetLoadBalancerPool(loadBalancerPool LoadBalancerPoolIdentityIntf) *UpdateInstanceGroupOptions { - options.LoadBalancerPool = loadBalancerPool +// SetInstanceGroupPatch : Allow user to set InstanceGroupPatch +func (options *UpdateInstanceGroupOptions) SetInstanceGroupPatch(instanceGroupPatch map[string]interface{}) *UpdateInstanceGroupOptions { + options.InstanceGroupPatch = instanceGroupPatch return options } @@ -29417,23 +30386,24 @@ func (options *UpdateInstanceGroupOptions) SetHeaders(param map[string]string) * // UpdateInstanceNetworkInterfaceOptions : The UpdateInstanceNetworkInterface options. type UpdateInstanceNetworkInterfaceOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The network interface identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this network interface. - Name *string `json:"name,omitempty"` + // The network interface patch. + NetworkInterfacePatch map[string]interface{} `json:"NetworkInterface_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceNetworkInterfaceOptions : Instantiate UpdateInstanceNetworkInterfaceOptions -func (*VpcV1) NewUpdateInstanceNetworkInterfaceOptions(instanceID string, id string) *UpdateInstanceNetworkInterfaceOptions { +func (*VpcV1) NewUpdateInstanceNetworkInterfaceOptions(instanceID string, id string, networkInterfacePatch map[string]interface{}) *UpdateInstanceNetworkInterfaceOptions { return &UpdateInstanceNetworkInterfaceOptions{ - InstanceID: core.StringPtr(instanceID), - ID: core.StringPtr(id), + InstanceID: core.StringPtr(instanceID), + ID: core.StringPtr(id), + NetworkInterfacePatch: networkInterfacePatch, } } @@ -29449,9 +30419,9 @@ func (options *UpdateInstanceNetworkInterfaceOptions) SetID(id string) *UpdateIn return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceNetworkInterfaceOptions) SetName(name string) *UpdateInstanceNetworkInterfaceOptions { - options.Name = core.StringPtr(name) +// SetNetworkInterfacePatch : Allow user to set NetworkInterfacePatch +func (options *UpdateInstanceNetworkInterfaceOptions) SetNetworkInterfacePatch(networkInterfacePatch map[string]interface{}) *UpdateInstanceNetworkInterfaceOptions { + options.NetworkInterfacePatch = networkInterfacePatch return options } @@ -29464,19 +30434,20 @@ func (options *UpdateInstanceNetworkInterfaceOptions) SetHeaders(param map[strin // UpdateInstanceOptions : The UpdateInstance options. type UpdateInstanceOptions struct { // The instance identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this virtual server instance (and default system hostname). - Name *string `json:"name,omitempty"` + // The instance patch. + InstancePatch map[string]interface{} `json:"Instance_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceOptions : Instantiate UpdateInstanceOptions -func (*VpcV1) NewUpdateInstanceOptions(id string) *UpdateInstanceOptions { +func (*VpcV1) NewUpdateInstanceOptions(id string, instancePatch map[string]interface{}) *UpdateInstanceOptions { return &UpdateInstanceOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + InstancePatch: instancePatch, } } @@ -29486,9 +30457,9 @@ func (options *UpdateInstanceOptions) SetID(id string) *UpdateInstanceOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceOptions) SetName(name string) *UpdateInstanceOptions { - options.Name = core.StringPtr(name) +// SetInstancePatch : Allow user to set InstancePatch +func (options *UpdateInstanceOptions) SetInstancePatch(instancePatch map[string]interface{}) *UpdateInstanceOptions { + options.InstancePatch = instancePatch return options } @@ -29501,19 +30472,20 @@ func (options *UpdateInstanceOptions) SetHeaders(param map[string]string) *Updat // UpdateInstanceTemplateOptions : The UpdateInstanceTemplate options. type UpdateInstanceTemplateOptions struct { // The instance template identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this instance template. - Name *string `json:"name,omitempty"` + // The instance template patch. + InstanceTemplatePatch map[string]interface{} `json:"InstanceTemplate_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceTemplateOptions : Instantiate UpdateInstanceTemplateOptions -func (*VpcV1) NewUpdateInstanceTemplateOptions(id string) *UpdateInstanceTemplateOptions { +func (*VpcV1) NewUpdateInstanceTemplateOptions(id string, instanceTemplatePatch map[string]interface{}) *UpdateInstanceTemplateOptions { return &UpdateInstanceTemplateOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + InstanceTemplatePatch: instanceTemplatePatch, } } @@ -29523,9 +30495,9 @@ func (options *UpdateInstanceTemplateOptions) SetID(id string) *UpdateInstanceTe return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceTemplateOptions) SetName(name string) *UpdateInstanceTemplateOptions { - options.Name = core.StringPtr(name) +// SetInstanceTemplatePatch : Allow user to set InstanceTemplatePatch +func (options *UpdateInstanceTemplateOptions) SetInstanceTemplatePatch(instanceTemplatePatch map[string]interface{}) *UpdateInstanceTemplateOptions { + options.InstanceTemplatePatch = instanceTemplatePatch return options } @@ -29538,26 +30510,24 @@ func (options *UpdateInstanceTemplateOptions) SetHeaders(param map[string]string // UpdateInstanceVolumeAttachmentOptions : The UpdateInstanceVolumeAttachment options. type UpdateInstanceVolumeAttachmentOptions struct { // The instance identifier. - InstanceID *string `json:"instance_id" validate:"required"` + InstanceID *string `json:"instance_id" validate:"required,ne="` // The volume attachment identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this volume attachment. - Name *string `json:"name,omitempty"` - - // If set to true, when deleting the instance the volume will also be deleted. - DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The volume attachment patch. + VolumeAttachmentPatch map[string]interface{} `json:"VolumeAttachment_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateInstanceVolumeAttachmentOptions : Instantiate UpdateInstanceVolumeAttachmentOptions -func (*VpcV1) NewUpdateInstanceVolumeAttachmentOptions(instanceID string, id string) *UpdateInstanceVolumeAttachmentOptions { +func (*VpcV1) NewUpdateInstanceVolumeAttachmentOptions(instanceID string, id string, volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions { return &UpdateInstanceVolumeAttachmentOptions{ - InstanceID: core.StringPtr(instanceID), - ID: core.StringPtr(id), + InstanceID: core.StringPtr(instanceID), + ID: core.StringPtr(id), + VolumeAttachmentPatch: volumeAttachmentPatch, } } @@ -29573,15 +30543,9 @@ func (options *UpdateInstanceVolumeAttachmentOptions) SetID(id string) *UpdateIn return options } -// SetName : Allow user to set Name -func (options *UpdateInstanceVolumeAttachmentOptions) SetName(name string) *UpdateInstanceVolumeAttachmentOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetDeleteVolumeOnInstanceDelete : Allow user to set DeleteVolumeOnInstanceDelete -func (options *UpdateInstanceVolumeAttachmentOptions) SetDeleteVolumeOnInstanceDelete(deleteVolumeOnInstanceDelete bool) *UpdateInstanceVolumeAttachmentOptions { - options.DeleteVolumeOnInstanceDelete = core.BoolPtr(deleteVolumeOnInstanceDelete) +// SetVolumeAttachmentPatch : Allow user to set VolumeAttachmentPatch +func (options *UpdateInstanceVolumeAttachmentOptions) SetVolumeAttachmentPatch(volumeAttachmentPatch map[string]interface{}) *UpdateInstanceVolumeAttachmentOptions { + options.VolumeAttachmentPatch = volumeAttachmentPatch return options } @@ -29594,56 +30558,20 @@ func (options *UpdateInstanceVolumeAttachmentOptions) SetHeaders(param map[strin // UpdateIpsecPolicyOptions : The UpdateIpsecPolicy options. type UpdateIpsecPolicyOptions struct { // The IPsec policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this IPsec policy. - Name *string `json:"name,omitempty"` - - // The authentication algorithm. - AuthenticationAlgorithm *string `json:"authentication_algorithm,omitempty"` - - // The encryption algorithm. - EncryptionAlgorithm *string `json:"encryption_algorithm,omitempty"` - - // The key lifetime in seconds. - KeyLifetime *int64 `json:"key_lifetime,omitempty"` - - // Perfect Forward Secrecy. - Pfs *string `json:"pfs,omitempty"` + // The IPsec policy patch. + IPsecPolicyPatch map[string]interface{} `json:"IPsecPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateIpsecPolicyOptions.AuthenticationAlgorithm property. -// The authentication algorithm. -const ( - UpdateIpsecPolicyOptionsAuthenticationAlgorithmMd5Const = "md5" - UpdateIpsecPolicyOptionsAuthenticationAlgorithmSha1Const = "sha1" - UpdateIpsecPolicyOptionsAuthenticationAlgorithmSha256Const = "sha256" -) - -// Constants associated with the UpdateIpsecPolicyOptions.EncryptionAlgorithm property. -// The encryption algorithm. -const ( - UpdateIpsecPolicyOptionsEncryptionAlgorithmAes128Const = "aes128" - UpdateIpsecPolicyOptionsEncryptionAlgorithmAes256Const = "aes256" - UpdateIpsecPolicyOptionsEncryptionAlgorithmTripleDesConst = "triple_des" -) - -// Constants associated with the UpdateIpsecPolicyOptions.Pfs property. -// Perfect Forward Secrecy. -const ( - UpdateIpsecPolicyOptionsPfsDisabledConst = "disabled" - UpdateIpsecPolicyOptionsPfsGroup14Const = "group_14" - UpdateIpsecPolicyOptionsPfsGroup2Const = "group_2" - UpdateIpsecPolicyOptionsPfsGroup5Const = "group_5" -) - // NewUpdateIpsecPolicyOptions : Instantiate UpdateIpsecPolicyOptions -func (*VpcV1) NewUpdateIpsecPolicyOptions(id string) *UpdateIpsecPolicyOptions { +func (*VpcV1) NewUpdateIpsecPolicyOptions(id string, iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions { return &UpdateIpsecPolicyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + IPsecPolicyPatch: iPsecPolicyPatch, } } @@ -29653,33 +30581,9 @@ func (options *UpdateIpsecPolicyOptions) SetID(id string) *UpdateIpsecPolicyOpti return options } -// SetName : Allow user to set Name -func (options *UpdateIpsecPolicyOptions) SetName(name string) *UpdateIpsecPolicyOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetAuthenticationAlgorithm : Allow user to set AuthenticationAlgorithm -func (options *UpdateIpsecPolicyOptions) SetAuthenticationAlgorithm(authenticationAlgorithm string) *UpdateIpsecPolicyOptions { - options.AuthenticationAlgorithm = core.StringPtr(authenticationAlgorithm) - return options -} - -// SetEncryptionAlgorithm : Allow user to set EncryptionAlgorithm -func (options *UpdateIpsecPolicyOptions) SetEncryptionAlgorithm(encryptionAlgorithm string) *UpdateIpsecPolicyOptions { - options.EncryptionAlgorithm = core.StringPtr(encryptionAlgorithm) - return options -} - -// SetKeyLifetime : Allow user to set KeyLifetime -func (options *UpdateIpsecPolicyOptions) SetKeyLifetime(keyLifetime int64) *UpdateIpsecPolicyOptions { - options.KeyLifetime = core.Int64Ptr(keyLifetime) - return options -} - -// SetPfs : Allow user to set Pfs -func (options *UpdateIpsecPolicyOptions) SetPfs(pfs string) *UpdateIpsecPolicyOptions { - options.Pfs = core.StringPtr(pfs) +// SetIPsecPolicyPatch : Allow user to set IPsecPolicyPatch +func (options *UpdateIpsecPolicyOptions) SetIPsecPolicyPatch(iPsecPolicyPatch map[string]interface{}) *UpdateIpsecPolicyOptions { + options.IPsecPolicyPatch = iPsecPolicyPatch return options } @@ -29692,19 +30596,20 @@ func (options *UpdateIpsecPolicyOptions) SetHeaders(param map[string]string) *Up // UpdateKeyOptions : The UpdateKey options. type UpdateKeyOptions struct { // The key identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this key. - Name *string `json:"name,omitempty"` + // The key patch. + KeyPatch map[string]interface{} `json:"Key_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateKeyOptions : Instantiate UpdateKeyOptions -func (*VpcV1) NewUpdateKeyOptions(id string) *UpdateKeyOptions { +func (*VpcV1) NewUpdateKeyOptions(id string, keyPatch map[string]interface{}) *UpdateKeyOptions { return &UpdateKeyOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + KeyPatch: keyPatch, } } @@ -29714,9 +30619,9 @@ func (options *UpdateKeyOptions) SetID(id string) *UpdateKeyOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateKeyOptions) SetName(name string) *UpdateKeyOptions { - options.Name = core.StringPtr(name) +// SetKeyPatch : Allow user to set KeyPatch +func (options *UpdateKeyOptions) SetKeyPatch(keyPatch map[string]interface{}) *UpdateKeyOptions { + options.KeyPatch = keyPatch return options } @@ -29729,46 +30634,24 @@ func (options *UpdateKeyOptions) SetHeaders(param map[string]string) *UpdateKeyO // UpdateLoadBalancerListenerOptions : The UpdateLoadBalancerListener options. type UpdateLoadBalancerListenerOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The connection limit of the listener. - ConnectionLimit *int64 `json:"connection_limit,omitempty"` - - // The listener port number. - Port *int64 `json:"port,omitempty"` - - // The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application` - // family support `tcp`, `http`, and `https`. - Protocol *string `json:"protocol,omitempty"` - - // The certificate instance used for SSL termination. It is applicable only to `https` - // protocol. - CertificateInstance CertificateInstanceIdentityIntf `json:"certificate_instance,omitempty"` - - // The default pool associated with the listener. - DefaultPool LoadBalancerPoolIdentityIntf `json:"default_pool,omitempty"` + // The load balancer listener patch. + LoadBalancerListenerPatch map[string]interface{} `json:"LoadBalancerListener_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateLoadBalancerListenerOptions.Protocol property. -// The listener protocol. Load balancers in the `network` family support `tcp`. Load balancers in the `application` -// family support `tcp`, `http`, and `https`. -const ( - UpdateLoadBalancerListenerOptionsProtocolHTTPConst = "http" - UpdateLoadBalancerListenerOptionsProtocolHTTPSConst = "https" - UpdateLoadBalancerListenerOptionsProtocolTCPConst = "tcp" -) - // NewUpdateLoadBalancerListenerOptions : Instantiate UpdateLoadBalancerListenerOptions -func (*VpcV1) NewUpdateLoadBalancerListenerOptions(loadBalancerID string, id string) *UpdateLoadBalancerListenerOptions { +func (*VpcV1) NewUpdateLoadBalancerListenerOptions(loadBalancerID string, id string, loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions { return &UpdateLoadBalancerListenerOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ID: core.StringPtr(id), + LoadBalancerListenerPatch: loadBalancerListenerPatch, } } @@ -29784,33 +30667,9 @@ func (options *UpdateLoadBalancerListenerOptions) SetID(id string) *UpdateLoadBa return options } -// SetConnectionLimit : Allow user to set ConnectionLimit -func (options *UpdateLoadBalancerListenerOptions) SetConnectionLimit(connectionLimit int64) *UpdateLoadBalancerListenerOptions { - options.ConnectionLimit = core.Int64Ptr(connectionLimit) - return options -} - -// SetPort : Allow user to set Port -func (options *UpdateLoadBalancerListenerOptions) SetPort(port int64) *UpdateLoadBalancerListenerOptions { - options.Port = core.Int64Ptr(port) - return options -} - -// SetProtocol : Allow user to set Protocol -func (options *UpdateLoadBalancerListenerOptions) SetProtocol(protocol string) *UpdateLoadBalancerListenerOptions { - options.Protocol = core.StringPtr(protocol) - return options -} - -// SetCertificateInstance : Allow user to set CertificateInstance -func (options *UpdateLoadBalancerListenerOptions) SetCertificateInstance(certificateInstance CertificateInstanceIdentityIntf) *UpdateLoadBalancerListenerOptions { - options.CertificateInstance = certificateInstance - return options -} - -// SetDefaultPool : Allow user to set DefaultPool -func (options *UpdateLoadBalancerListenerOptions) SetDefaultPool(defaultPool LoadBalancerPoolIdentityIntf) *UpdateLoadBalancerListenerOptions { - options.DefaultPool = defaultPool +// SetLoadBalancerListenerPatch : Allow user to set LoadBalancerListenerPatch +func (options *UpdateLoadBalancerListenerOptions) SetLoadBalancerListenerPatch(loadBalancerListenerPatch map[string]interface{}) *UpdateLoadBalancerListenerOptions { + options.LoadBalancerListenerPatch = loadBalancerListenerPatch return options } @@ -29823,36 +30682,28 @@ func (options *UpdateLoadBalancerListenerOptions) SetHeaders(param map[string]st // UpdateLoadBalancerListenerPolicyOptions : The UpdateLoadBalancerListenerPolicy options. type UpdateLoadBalancerListenerPolicyOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this policy. Names must be unique within the load balancer listener the policy resides in. - Name *string `json:"name,omitempty"` - - // Priority of the policy. Lower value indicates higher priority. - Priority *int64 `json:"priority,omitempty"` - - // When `action` is `forward`, `LoadBalancerPoolIdentity` specifies which pool the load - // balancer forwards the traffic to. When `action` is `redirect`, - // `LoadBalancerListenerPolicyRedirectURLPatch` specifies the url and http - // status code used in the redirect response. - Target LoadBalancerListenerPolicyPatchTargetIntf `json:"target,omitempty"` + // The listener policy patch. + LoadBalancerListenerPolicyPatch map[string]interface{} `json:"LoadBalancerListenerPolicy_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateLoadBalancerListenerPolicyOptions : Instantiate UpdateLoadBalancerListenerPolicyOptions -func (*VpcV1) NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string) *UpdateLoadBalancerListenerPolicyOptions { +func (*VpcV1) NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID string, listenerID string, id string, loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions { return &UpdateLoadBalancerListenerPolicyOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ListenerID: core.StringPtr(listenerID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ListenerID: core.StringPtr(listenerID), + ID: core.StringPtr(id), + LoadBalancerListenerPolicyPatch: loadBalancerListenerPolicyPatch, } } @@ -29874,21 +30725,9 @@ func (options *UpdateLoadBalancerListenerPolicyOptions) SetID(id string) *Update return options } -// SetName : Allow user to set Name -func (options *UpdateLoadBalancerListenerPolicyOptions) SetName(name string) *UpdateLoadBalancerListenerPolicyOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetPriority : Allow user to set Priority -func (options *UpdateLoadBalancerListenerPolicyOptions) SetPriority(priority int64) *UpdateLoadBalancerListenerPolicyOptions { - options.Priority = core.Int64Ptr(priority) - return options -} - -// SetTarget : Allow user to set Target -func (options *UpdateLoadBalancerListenerPolicyOptions) SetTarget(target LoadBalancerListenerPolicyPatchTargetIntf) *UpdateLoadBalancerListenerPolicyOptions { - options.Target = target +// SetLoadBalancerListenerPolicyPatch : Allow user to set LoadBalancerListenerPolicyPatch +func (options *UpdateLoadBalancerListenerPolicyOptions) SetLoadBalancerListenerPolicyPatch(loadBalancerListenerPolicyPatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyOptions { + options.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatch return options } @@ -29901,56 +30740,32 @@ func (options *UpdateLoadBalancerListenerPolicyOptions) SetHeaders(param map[str // UpdateLoadBalancerListenerPolicyRuleOptions : The UpdateLoadBalancerListenerPolicyRule options. type UpdateLoadBalancerListenerPolicyRuleOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The listener identifier. - ListenerID *string `json:"listener_id" validate:"required"` + ListenerID *string `json:"listener_id" validate:"required,ne="` // The policy identifier. - PolicyID *string `json:"policy_id" validate:"required"` + PolicyID *string `json:"policy_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The condition of the rule. - Condition *string `json:"condition,omitempty"` - - // HTTP header field. This is only applicable to "header" rule type. - Field *string `json:"field,omitempty"` - - // The type of the rule. - Type *string `json:"type,omitempty"` - - // Value to be matched for rule condition. - Value *string `json:"value,omitempty"` + // The listener policy rule patch. + LoadBalancerListenerPolicyRulePatch map[string]interface{} `json:"LoadBalancerListenerPolicyRule_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateLoadBalancerListenerPolicyRuleOptions.Condition property. -// The condition of the rule. -const ( - UpdateLoadBalancerListenerPolicyRuleOptionsConditionContainsConst = "contains" - UpdateLoadBalancerListenerPolicyRuleOptionsConditionEqualsConst = "equals" - UpdateLoadBalancerListenerPolicyRuleOptionsConditionMatchesRegexConst = "matches_regex" -) - -// Constants associated with the UpdateLoadBalancerListenerPolicyRuleOptions.Type property. -// The type of the rule. -const ( - UpdateLoadBalancerListenerPolicyRuleOptionsTypeHeaderConst = "header" - UpdateLoadBalancerListenerPolicyRuleOptionsTypeHostnameConst = "hostname" - UpdateLoadBalancerListenerPolicyRuleOptionsTypePathConst = "path" -) - // NewUpdateLoadBalancerListenerPolicyRuleOptions : Instantiate UpdateLoadBalancerListenerPolicyRuleOptions -func (*VpcV1) NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string) *UpdateLoadBalancerListenerPolicyRuleOptions { +func (*VpcV1) NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID string, listenerID string, policyID string, id string, loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions { return &UpdateLoadBalancerListenerPolicyRuleOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ListenerID: core.StringPtr(listenerID), - PolicyID: core.StringPtr(policyID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ListenerID: core.StringPtr(listenerID), + PolicyID: core.StringPtr(policyID), + ID: core.StringPtr(id), + LoadBalancerListenerPolicyRulePatch: loadBalancerListenerPolicyRulePatch, } } @@ -29978,27 +30793,9 @@ func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetID(id string) *Up return options } -// SetCondition : Allow user to set Condition -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetCondition(condition string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Condition = core.StringPtr(condition) - return options -} - -// SetField : Allow user to set Field -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetField(field string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Field = core.StringPtr(field) - return options -} - -// SetType : Allow user to set Type -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetType(typeVar string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Type = core.StringPtr(typeVar) - return options -} - -// SetValue : Allow user to set Value -func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetValue(value string) *UpdateLoadBalancerListenerPolicyRuleOptions { - options.Value = core.StringPtr(value) +// SetLoadBalancerListenerPolicyRulePatch : Allow user to set LoadBalancerListenerPolicyRulePatch +func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetLoadBalancerListenerPolicyRulePatch(loadBalancerListenerPolicyRulePatch map[string]interface{}) *UpdateLoadBalancerListenerPolicyRuleOptions { + options.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatch return options } @@ -30011,19 +30808,20 @@ func (options *UpdateLoadBalancerListenerPolicyRuleOptions) SetHeaders(param map // UpdateLoadBalancerOptions : The UpdateLoadBalancer options. type UpdateLoadBalancerOptions struct { // The load balancer identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this load balancer. - Name *string `json:"name,omitempty"` + // The load balancer patch. + LoadBalancerPatch map[string]interface{} `json:"LoadBalancer_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateLoadBalancerOptions : Instantiate UpdateLoadBalancerOptions -func (*VpcV1) NewUpdateLoadBalancerOptions(id string) *UpdateLoadBalancerOptions { +func (*VpcV1) NewUpdateLoadBalancerOptions(id string, loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions { return &UpdateLoadBalancerOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + LoadBalancerPatch: loadBalancerPatch, } } @@ -30033,9 +30831,9 @@ func (options *UpdateLoadBalancerOptions) SetID(id string) *UpdateLoadBalancerOp return options } -// SetName : Allow user to set Name -func (options *UpdateLoadBalancerOptions) SetName(name string) *UpdateLoadBalancerOptions { - options.Name = core.StringPtr(name) +// SetLoadBalancerPatch : Allow user to set LoadBalancerPatch +func (options *UpdateLoadBalancerOptions) SetLoadBalancerPatch(loadBalancerPatch map[string]interface{}) *UpdateLoadBalancerOptions { + options.LoadBalancerPatch = loadBalancerPatch return options } @@ -30048,36 +30846,28 @@ func (options *UpdateLoadBalancerOptions) SetHeaders(param map[string]string) *U // UpdateLoadBalancerPoolMemberOptions : The UpdateLoadBalancerPoolMember options. type UpdateLoadBalancerPoolMemberOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - PoolID *string `json:"pool_id" validate:"required"` + PoolID *string `json:"pool_id" validate:"required,ne="` // The member identifier. - ID *string `json:"id" validate:"required"` - - // The port number of the application running in the server member. - Port *int64 `json:"port,omitempty"` - - // Weight of the server member. This takes effect only when the load balancing algorithm of its belonging pool is - // `weighted_round_robin`. - Weight *int64 `json:"weight,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The pool member target. Load balancers in the `network` family - // support instances. Load balancers in the `application` family support - // IP addresses. - Target LoadBalancerPoolMemberTargetPrototypeIntf `json:"target,omitempty"` + // The load balancer pool member patch. + LoadBalancerPoolMemberPatch map[string]interface{} `json:"LoadBalancerPoolMember_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateLoadBalancerPoolMemberOptions : Instantiate UpdateLoadBalancerPoolMemberOptions -func (*VpcV1) NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string) *UpdateLoadBalancerPoolMemberOptions { +func (*VpcV1) NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID string, poolID string, id string, loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions { return &UpdateLoadBalancerPoolMemberOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - PoolID: core.StringPtr(poolID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + PoolID: core.StringPtr(poolID), + ID: core.StringPtr(id), + LoadBalancerPoolMemberPatch: loadBalancerPoolMemberPatch, } } @@ -30099,21 +30889,9 @@ func (options *UpdateLoadBalancerPoolMemberOptions) SetID(id string) *UpdateLoad return options } -// SetPort : Allow user to set Port -func (options *UpdateLoadBalancerPoolMemberOptions) SetPort(port int64) *UpdateLoadBalancerPoolMemberOptions { - options.Port = core.Int64Ptr(port) - return options -} - -// SetWeight : Allow user to set Weight -func (options *UpdateLoadBalancerPoolMemberOptions) SetWeight(weight int64) *UpdateLoadBalancerPoolMemberOptions { - options.Weight = core.Int64Ptr(weight) - return options -} - -// SetTarget : Allow user to set Target -func (options *UpdateLoadBalancerPoolMemberOptions) SetTarget(target LoadBalancerPoolMemberTargetPrototypeIntf) *UpdateLoadBalancerPoolMemberOptions { - options.Target = target +// SetLoadBalancerPoolMemberPatch : Allow user to set LoadBalancerPoolMemberPatch +func (options *UpdateLoadBalancerPoolMemberOptions) SetLoadBalancerPoolMemberPatch(loadBalancerPoolMemberPatch map[string]interface{}) *UpdateLoadBalancerPoolMemberOptions { + options.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatch return options } @@ -30126,59 +30904,24 @@ func (options *UpdateLoadBalancerPoolMemberOptions) SetHeaders(param map[string] // UpdateLoadBalancerPoolOptions : The UpdateLoadBalancerPool options. type UpdateLoadBalancerPoolOptions struct { // The load balancer identifier. - LoadBalancerID *string `json:"load_balancer_id" validate:"required"` + LoadBalancerID *string `json:"load_balancer_id" validate:"required,ne="` // The pool identifier. - ID *string `json:"id" validate:"required"` - - // The user-defined name for this load balancer pool. - Name *string `json:"name,omitempty"` - - // The load balancing algorithm. - Algorithm *string `json:"algorithm,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The protocol used for this load balancer pool. - // - // 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 pool on which the - // unexpected property value was encountered. - Protocol *string `json:"protocol,omitempty"` - - // The health monitor of this pool. - HealthMonitor *LoadBalancerPoolHealthMonitorPatch `json:"health_monitor,omitempty"` - - // The session persistence of this pool. - SessionPersistence *LoadBalancerPoolSessionPersistencePatch `json:"session_persistence,omitempty"` + // The load balancer pool patch. + LoadBalancerPoolPatch map[string]interface{} `json:"LoadBalancerPool_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateLoadBalancerPoolOptions.Algorithm property. -// The load balancing algorithm. -const ( - UpdateLoadBalancerPoolOptionsAlgorithmLeastConnectionsConst = "least_connections" - UpdateLoadBalancerPoolOptionsAlgorithmRoundRobinConst = "round_robin" - UpdateLoadBalancerPoolOptionsAlgorithmWeightedRoundRobinConst = "weighted_round_robin" -) - -// Constants associated with the UpdateLoadBalancerPoolOptions.Protocol property. -// The protocol used for this load balancer pool. -// -// 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 pool on which the -// unexpected property value was encountered. -const ( - UpdateLoadBalancerPoolOptionsProtocolHTTPConst = "http" - UpdateLoadBalancerPoolOptionsProtocolHTTPSConst = "https" - UpdateLoadBalancerPoolOptionsProtocolTCPConst = "tcp" -) - // NewUpdateLoadBalancerPoolOptions : Instantiate UpdateLoadBalancerPoolOptions -func (*VpcV1) NewUpdateLoadBalancerPoolOptions(loadBalancerID string, id string) *UpdateLoadBalancerPoolOptions { +func (*VpcV1) NewUpdateLoadBalancerPoolOptions(loadBalancerID string, id string, loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions { return &UpdateLoadBalancerPoolOptions{ - LoadBalancerID: core.StringPtr(loadBalancerID), - ID: core.StringPtr(id), + LoadBalancerID: core.StringPtr(loadBalancerID), + ID: core.StringPtr(id), + LoadBalancerPoolPatch: loadBalancerPoolPatch, } } @@ -30194,33 +30937,9 @@ func (options *UpdateLoadBalancerPoolOptions) SetID(id string) *UpdateLoadBalanc return options } -// SetName : Allow user to set Name -func (options *UpdateLoadBalancerPoolOptions) SetName(name string) *UpdateLoadBalancerPoolOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetAlgorithm : Allow user to set Algorithm -func (options *UpdateLoadBalancerPoolOptions) SetAlgorithm(algorithm string) *UpdateLoadBalancerPoolOptions { - options.Algorithm = core.StringPtr(algorithm) - return options -} - -// SetProtocol : Allow user to set Protocol -func (options *UpdateLoadBalancerPoolOptions) SetProtocol(protocol string) *UpdateLoadBalancerPoolOptions { - options.Protocol = core.StringPtr(protocol) - return options -} - -// SetHealthMonitor : Allow user to set HealthMonitor -func (options *UpdateLoadBalancerPoolOptions) SetHealthMonitor(healthMonitor *LoadBalancerPoolHealthMonitorPatch) *UpdateLoadBalancerPoolOptions { - options.HealthMonitor = healthMonitor - return options -} - -// SetSessionPersistence : Allow user to set SessionPersistence -func (options *UpdateLoadBalancerPoolOptions) SetSessionPersistence(sessionPersistence *LoadBalancerPoolSessionPersistencePatch) *UpdateLoadBalancerPoolOptions { - options.SessionPersistence = sessionPersistence +// SetLoadBalancerPoolPatch : Allow user to set LoadBalancerPoolPatch +func (options *UpdateLoadBalancerPoolOptions) SetLoadBalancerPoolPatch(loadBalancerPoolPatch map[string]interface{}) *UpdateLoadBalancerPoolOptions { + options.LoadBalancerPoolPatch = loadBalancerPoolPatch return options } @@ -30233,19 +30952,20 @@ func (options *UpdateLoadBalancerPoolOptions) SetHeaders(param map[string]string // UpdateNetworkACLOptions : The UpdateNetworkACL options. type UpdateNetworkACLOptions struct { // The network ACL identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this network ACL. Names must be unique within the VPC the Network ACL resides in. - Name *string `json:"name,omitempty"` + // The network ACL patch. + NetworkACLPatch map[string]interface{} `json:"NetworkACL_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateNetworkACLOptions : Instantiate UpdateNetworkACLOptions -func (*VpcV1) NewUpdateNetworkACLOptions(id string) *UpdateNetworkACLOptions { +func (*VpcV1) NewUpdateNetworkACLOptions(id string, networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions { return &UpdateNetworkACLOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + NetworkACLPatch: networkACLPatch, } } @@ -30255,9 +30975,9 @@ func (options *UpdateNetworkACLOptions) SetID(id string) *UpdateNetworkACLOption return options } -// SetName : Allow user to set Name -func (options *UpdateNetworkACLOptions) SetName(name string) *UpdateNetworkACLOptions { - options.Name = core.StringPtr(name) +// SetNetworkACLPatch : Allow user to set NetworkACLPatch +func (options *UpdateNetworkACLOptions) SetNetworkACLPatch(networkACLPatch map[string]interface{}) *UpdateNetworkACLOptions { + options.NetworkACLPatch = networkACLPatch return options } @@ -30270,71 +30990,24 @@ func (options *UpdateNetworkACLOptions) SetHeaders(param map[string]string) *Upd // UpdateNetworkACLRuleOptions : The UpdateNetworkACLRule options. type UpdateNetworkACLRuleOptions struct { // The network ACL identifier. - NetworkACLID *string `json:"network_acl_id" validate:"required"` + NetworkACLID *string `json:"network_acl_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this rule. Names must be unique within the network ACL the rule resides in. - Name *string `json:"name,omitempty"` - - // Whether to allow or deny matching traffic. - Action *string `json:"action,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"` - - // Whether the traffic to be matched is `inbound` or `outbound`. - Direction *string `json:"direction,omitempty"` - - // 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. - DestinationPortMax *int64 `json:"destination_port_max,omitempty"` - - // The inclusive lower bound of TCP/UDP destination port range. - DestinationPortMin *int64 `json:"destination_port_min,omitempty"` - - // The inclusive upper bound of TCP/UDP source port range. - SourcePortMax *int64 `json:"source_port_max,omitempty"` - - // The inclusive lower bound of TCP/UDP source port range. - SourcePortMin *int64 `json:"source_port_min,omitempty"` - - // The ICMP traffic code to allow. - Code *int64 `json:"code,omitempty"` - - // The ICMP traffic type to allow. - Type *int64 `json:"type,omitempty"` - - // The rule to move this rule immediately before. Specify `null` to move this rule after - // all existing rules. - Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` + // The network ACL rule patch. + NetworkACLRulePatch map[string]interface{} `json:"NetworkACLRule_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateNetworkACLRuleOptions.Action property. -// Whether to allow or deny matching traffic. -const ( - UpdateNetworkACLRuleOptionsActionAllowConst = "allow" - UpdateNetworkACLRuleOptionsActionDenyConst = "deny" -) - -// Constants associated with the UpdateNetworkACLRuleOptions.Direction property. -// Whether the traffic to be matched is `inbound` or `outbound`. -const ( - UpdateNetworkACLRuleOptionsDirectionInboundConst = "inbound" - UpdateNetworkACLRuleOptionsDirectionOutboundConst = "outbound" -) - // NewUpdateNetworkACLRuleOptions : Instantiate UpdateNetworkACLRuleOptions -func (*VpcV1) NewUpdateNetworkACLRuleOptions(networkACLID string, id string) *UpdateNetworkACLRuleOptions { +func (*VpcV1) NewUpdateNetworkACLRuleOptions(networkACLID string, id string, networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions { return &UpdateNetworkACLRuleOptions{ - NetworkACLID: core.StringPtr(networkACLID), - ID: core.StringPtr(id), + NetworkACLID: core.StringPtr(networkACLID), + ID: core.StringPtr(id), + NetworkACLRulePatch: networkACLRulePatch, } } @@ -30350,75 +31023,9 @@ func (options *UpdateNetworkACLRuleOptions) SetID(id string) *UpdateNetworkACLRu return options } -// SetName : Allow user to set Name -func (options *UpdateNetworkACLRuleOptions) SetName(name string) *UpdateNetworkACLRuleOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetAction : Allow user to set Action -func (options *UpdateNetworkACLRuleOptions) SetAction(action string) *UpdateNetworkACLRuleOptions { - options.Action = core.StringPtr(action) - return options -} - -// SetDestination : Allow user to set Destination -func (options *UpdateNetworkACLRuleOptions) SetDestination(destination string) *UpdateNetworkACLRuleOptions { - options.Destination = core.StringPtr(destination) - return options -} - -// SetDirection : Allow user to set Direction -func (options *UpdateNetworkACLRuleOptions) SetDirection(direction string) *UpdateNetworkACLRuleOptions { - options.Direction = core.StringPtr(direction) - return options -} - -// SetSource : Allow user to set Source -func (options *UpdateNetworkACLRuleOptions) SetSource(source string) *UpdateNetworkACLRuleOptions { - options.Source = core.StringPtr(source) - return options -} - -// SetDestinationPortMax : Allow user to set DestinationPortMax -func (options *UpdateNetworkACLRuleOptions) SetDestinationPortMax(destinationPortMax int64) *UpdateNetworkACLRuleOptions { - options.DestinationPortMax = core.Int64Ptr(destinationPortMax) - return options -} - -// SetDestinationPortMin : Allow user to set DestinationPortMin -func (options *UpdateNetworkACLRuleOptions) SetDestinationPortMin(destinationPortMin int64) *UpdateNetworkACLRuleOptions { - options.DestinationPortMin = core.Int64Ptr(destinationPortMin) - return options -} - -// SetSourcePortMax : Allow user to set SourcePortMax -func (options *UpdateNetworkACLRuleOptions) SetSourcePortMax(sourcePortMax int64) *UpdateNetworkACLRuleOptions { - options.SourcePortMax = core.Int64Ptr(sourcePortMax) - return options -} - -// SetSourcePortMin : Allow user to set SourcePortMin -func (options *UpdateNetworkACLRuleOptions) SetSourcePortMin(sourcePortMin int64) *UpdateNetworkACLRuleOptions { - options.SourcePortMin = core.Int64Ptr(sourcePortMin) - return options -} - -// SetCode : Allow user to set Code -func (options *UpdateNetworkACLRuleOptions) SetCode(code int64) *UpdateNetworkACLRuleOptions { - options.Code = core.Int64Ptr(code) - return options -} - -// SetType : Allow user to set Type -func (options *UpdateNetworkACLRuleOptions) SetType(typeVar int64) *UpdateNetworkACLRuleOptions { - options.Type = core.Int64Ptr(typeVar) - return options -} - -// SetBefore : Allow user to set Before -func (options *UpdateNetworkACLRuleOptions) SetBefore(before NetworkACLRuleIdentityIntf) *UpdateNetworkACLRuleOptions { - options.Before = before +// SetNetworkACLRulePatch : Allow user to set NetworkACLRulePatch +func (options *UpdateNetworkACLRuleOptions) SetNetworkACLRulePatch(networkACLRulePatch map[string]interface{}) *UpdateNetworkACLRuleOptions { + options.NetworkACLRulePatch = networkACLRulePatch return options } @@ -30431,19 +31038,20 @@ func (options *UpdateNetworkACLRuleOptions) SetHeaders(param map[string]string) // UpdatePublicGatewayOptions : The UpdatePublicGateway options. type UpdatePublicGatewayOptions struct { // The public gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this public gateway. Names must be unique within the VPC the public gateway resides in. - Name *string `json:"name,omitempty"` + // The public gateway patch. + PublicGatewayPatch map[string]interface{} `json:"PublicGateway_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdatePublicGatewayOptions : Instantiate UpdatePublicGatewayOptions -func (*VpcV1) NewUpdatePublicGatewayOptions(id string) *UpdatePublicGatewayOptions { +func (*VpcV1) NewUpdatePublicGatewayOptions(id string, publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions { return &UpdatePublicGatewayOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + PublicGatewayPatch: publicGatewayPatch, } } @@ -30453,9 +31061,9 @@ func (options *UpdatePublicGatewayOptions) SetID(id string) *UpdatePublicGateway return options } -// SetName : Allow user to set Name -func (options *UpdatePublicGatewayOptions) SetName(name string) *UpdatePublicGatewayOptions { - options.Name = core.StringPtr(name) +// SetPublicGatewayPatch : Allow user to set PublicGatewayPatch +func (options *UpdatePublicGatewayOptions) SetPublicGatewayPatch(publicGatewayPatch map[string]interface{}) *UpdatePublicGatewayOptions { + options.PublicGatewayPatch = publicGatewayPatch return options } @@ -30468,19 +31076,20 @@ func (options *UpdatePublicGatewayOptions) SetHeaders(param map[string]string) * // UpdateSecurityGroupOptions : The UpdateSecurityGroup options. type UpdateSecurityGroupOptions struct { // The security group identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this security group. Names must be unique within the VPC the security group resides in. - Name *string `json:"name,omitempty"` + // The security group patch. + SecurityGroupPatch map[string]interface{} `json:"SecurityGroup_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateSecurityGroupOptions : Instantiate UpdateSecurityGroupOptions -func (*VpcV1) NewUpdateSecurityGroupOptions(id string) *UpdateSecurityGroupOptions { +func (*VpcV1) NewUpdateSecurityGroupOptions(id string, securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions { return &UpdateSecurityGroupOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + SecurityGroupPatch: securityGroupPatch, } } @@ -30490,9 +31099,9 @@ func (options *UpdateSecurityGroupOptions) SetID(id string) *UpdateSecurityGroup return options } -// SetName : Allow user to set Name -func (options *UpdateSecurityGroupOptions) SetName(name string) *UpdateSecurityGroupOptions { - options.Name = core.StringPtr(name) +// SetSecurityGroupPatch : Allow user to set SecurityGroupPatch +func (options *UpdateSecurityGroupOptions) SetSecurityGroupPatch(securityGroupPatch map[string]interface{}) *UpdateSecurityGroupOptions { + options.SecurityGroupPatch = securityGroupPatch return options } @@ -30505,61 +31114,24 @@ func (options *UpdateSecurityGroupOptions) SetHeaders(param map[string]string) * // UpdateSecurityGroupRuleOptions : The UpdateSecurityGroupRule options. type UpdateSecurityGroupRuleOptions struct { // The security group identifier. - SecurityGroupID *string `json:"security_group_id" validate:"required"` + SecurityGroupID *string `json:"security_group_id" validate:"required,ne="` // The rule identifier. - ID *string `json:"id" 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. A CIDR block of `0.0.0.0/0` will allow traffic from any source (or to - // any source, for outbound rules). - Remote SecurityGroupRulePatchRemoteIntf `json:"remote,omitempty"` - - // The direction of traffic to enforce, either `inbound` or `outbound`. - Direction *string `json:"direction,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // 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 ICMP traffic code to allow. - Code *int64 `json:"code,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"` - - // The ICMP traffic type to allow. - Type *int64 `json:"type,omitempty"` + // The security group rule patch. + SecurityGroupRulePatch map[string]interface{} `json:"SecurityGroupRule_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } -// Constants associated with the UpdateSecurityGroupRuleOptions.Direction property. -// The direction of traffic to enforce, either `inbound` or `outbound`. -const ( - UpdateSecurityGroupRuleOptionsDirectionInboundConst = "inbound" - UpdateSecurityGroupRuleOptionsDirectionOutboundConst = "outbound" -) - -// Constants associated with the UpdateSecurityGroupRuleOptions.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 ( - UpdateSecurityGroupRuleOptionsIPVersionIpv4Const = "ipv4" -) - // NewUpdateSecurityGroupRuleOptions : Instantiate UpdateSecurityGroupRuleOptions -func (*VpcV1) NewUpdateSecurityGroupRuleOptions(securityGroupID string, id string) *UpdateSecurityGroupRuleOptions { +func (*VpcV1) NewUpdateSecurityGroupRuleOptions(securityGroupID string, id string, securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions { return &UpdateSecurityGroupRuleOptions{ - SecurityGroupID: core.StringPtr(securityGroupID), - ID: core.StringPtr(id), + SecurityGroupID: core.StringPtr(securityGroupID), + ID: core.StringPtr(id), + SecurityGroupRulePatch: securityGroupRulePatch, } } @@ -30575,45 +31147,9 @@ func (options *UpdateSecurityGroupRuleOptions) SetID(id string) *UpdateSecurityG return options } -// SetRemote : Allow user to set Remote -func (options *UpdateSecurityGroupRuleOptions) SetRemote(remote SecurityGroupRulePatchRemoteIntf) *UpdateSecurityGroupRuleOptions { - options.Remote = remote - return options -} - -// SetDirection : Allow user to set Direction -func (options *UpdateSecurityGroupRuleOptions) SetDirection(direction string) *UpdateSecurityGroupRuleOptions { - options.Direction = core.StringPtr(direction) - return options -} - -// SetIPVersion : Allow user to set IPVersion -func (options *UpdateSecurityGroupRuleOptions) SetIPVersion(ipVersion string) *UpdateSecurityGroupRuleOptions { - options.IPVersion = core.StringPtr(ipVersion) - return options -} - -// SetCode : Allow user to set Code -func (options *UpdateSecurityGroupRuleOptions) SetCode(code int64) *UpdateSecurityGroupRuleOptions { - options.Code = core.Int64Ptr(code) - return options -} - -// SetPortMax : Allow user to set PortMax -func (options *UpdateSecurityGroupRuleOptions) SetPortMax(portMax int64) *UpdateSecurityGroupRuleOptions { - options.PortMax = core.Int64Ptr(portMax) - return options -} - -// SetPortMin : Allow user to set PortMin -func (options *UpdateSecurityGroupRuleOptions) SetPortMin(portMin int64) *UpdateSecurityGroupRuleOptions { - options.PortMin = core.Int64Ptr(portMin) - return options -} - -// SetType : Allow user to set Type -func (options *UpdateSecurityGroupRuleOptions) SetType(typeVar int64) *UpdateSecurityGroupRuleOptions { - options.Type = core.Int64Ptr(typeVar) +// SetSecurityGroupRulePatch : Allow user to set SecurityGroupRulePatch +func (options *UpdateSecurityGroupRuleOptions) SetSecurityGroupRulePatch(securityGroupRulePatch map[string]interface{}) *UpdateSecurityGroupRuleOptions { + options.SecurityGroupRulePatch = securityGroupRulePatch return options } @@ -30626,25 +31162,20 @@ func (options *UpdateSecurityGroupRuleOptions) SetHeaders(param map[string]strin // UpdateSubnetOptions : The UpdateSubnet options. type UpdateSubnetOptions struct { // The subnet identifier. - ID *string `json:"id" validate:"required"` - - // The user-defined name for this subnet. Names must be unique within the VPC the subnet resides in. - Name *string `json:"name,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // The network ACL to use for this subnet. - NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` - - // The public gateway to handle internet bound traffic for this subnet. - PublicGateway PublicGatewayIdentityIntf `json:"public_gateway,omitempty"` + // The subnet patch. + SubnetPatch map[string]interface{} `json:"Subnet_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateSubnetOptions : Instantiate UpdateSubnetOptions -func (*VpcV1) NewUpdateSubnetOptions(id string) *UpdateSubnetOptions { +func (*VpcV1) NewUpdateSubnetOptions(id string, subnetPatch map[string]interface{}) *UpdateSubnetOptions { return &UpdateSubnetOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + SubnetPatch: subnetPatch, } } @@ -30654,21 +31185,9 @@ func (options *UpdateSubnetOptions) SetID(id string) *UpdateSubnetOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateSubnetOptions) SetName(name string) *UpdateSubnetOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetNetworkACL : Allow user to set NetworkACL -func (options *UpdateSubnetOptions) SetNetworkACL(networkACL NetworkACLIdentityIntf) *UpdateSubnetOptions { - options.NetworkACL = networkACL - return options -} - -// SetPublicGateway : Allow user to set PublicGateway -func (options *UpdateSubnetOptions) SetPublicGateway(publicGateway PublicGatewayIdentityIntf) *UpdateSubnetOptions { - options.PublicGateway = publicGateway +// SetSubnetPatch : Allow user to set SubnetPatch +func (options *UpdateSubnetOptions) SetSubnetPatch(subnetPatch map[string]interface{}) *UpdateSubnetOptions { + options.SubnetPatch = subnetPatch return options } @@ -30681,19 +31200,20 @@ func (options *UpdateSubnetOptions) SetHeaders(param map[string]string) *UpdateS // UpdateVolumeOptions : The UpdateVolume options. type UpdateVolumeOptions struct { // The volume identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this volume. - Name *string `json:"name,omitempty"` + // The volume patch. + VolumePatch map[string]interface{} `json:"Volume_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVolumeOptions : Instantiate UpdateVolumeOptions -func (*VpcV1) NewUpdateVolumeOptions(id string) *UpdateVolumeOptions { +func (*VpcV1) NewUpdateVolumeOptions(id string, volumePatch map[string]interface{}) *UpdateVolumeOptions { return &UpdateVolumeOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + VolumePatch: volumePatch, } } @@ -30703,9 +31223,9 @@ func (options *UpdateVolumeOptions) SetID(id string) *UpdateVolumeOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateVolumeOptions) SetName(name string) *UpdateVolumeOptions { - options.Name = core.StringPtr(name) +// SetVolumePatch : Allow user to set VolumePatch +func (options *UpdateVolumeOptions) SetVolumePatch(volumePatch map[string]interface{}) *UpdateVolumeOptions { + options.VolumePatch = volumePatch return options } @@ -30718,28 +31238,24 @@ func (options *UpdateVolumeOptions) SetHeaders(param map[string]string) *UpdateV // UpdateVPCAddressPrefixOptions : The UpdateVPCAddressPrefix options. type UpdateVPCAddressPrefixOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The prefix identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this address prefix. Names must be unique within the VPC the address prefix resides in. - Name *string `json:"name,omitempty"` - - // Indicates whether this is the default prefix for this zone in this VPC. Updating to true makes this prefix the - // default prefix for this zone in this VPC, provided the VPC currently has no default address prefix for this zone. - // Updating to false removes the default prefix for this zone in this VPC. - IsDefault *bool `json:"is_default,omitempty"` + // The prefix patch. + AddressPrefixPatch map[string]interface{} `json:"AddressPrefix_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPCAddressPrefixOptions : Instantiate UpdateVPCAddressPrefixOptions -func (*VpcV1) NewUpdateVPCAddressPrefixOptions(vpcID string, id string) *UpdateVPCAddressPrefixOptions { +func (*VpcV1) NewUpdateVPCAddressPrefixOptions(vpcID string, id string, addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions { return &UpdateVPCAddressPrefixOptions{ - VPCID: core.StringPtr(vpcID), - ID: core.StringPtr(id), + VPCID: core.StringPtr(vpcID), + ID: core.StringPtr(id), + AddressPrefixPatch: addressPrefixPatch, } } @@ -30755,15 +31271,9 @@ func (options *UpdateVPCAddressPrefixOptions) SetID(id string) *UpdateVPCAddress return options } -// SetName : Allow user to set Name -func (options *UpdateVPCAddressPrefixOptions) SetName(name string) *UpdateVPCAddressPrefixOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetIsDefault : Allow user to set IsDefault -func (options *UpdateVPCAddressPrefixOptions) SetIsDefault(isDefault bool) *UpdateVPCAddressPrefixOptions { - options.IsDefault = core.BoolPtr(isDefault) +// SetAddressPrefixPatch : Allow user to set AddressPrefixPatch +func (options *UpdateVPCAddressPrefixOptions) SetAddressPrefixPatch(addressPrefixPatch map[string]interface{}) *UpdateVPCAddressPrefixOptions { + options.AddressPrefixPatch = addressPrefixPatch return options } @@ -30776,19 +31286,20 @@ func (options *UpdateVPCAddressPrefixOptions) SetHeaders(param map[string]string // UpdateVPCOptions : The UpdateVPC options. type UpdateVPCOptions struct { // The VPC identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The unique user-defined name for this VPC. - Name *string `json:"name,omitempty"` + // The VPC patch. + VPCPatch map[string]interface{} `json:"VPC_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPCOptions : Instantiate UpdateVPCOptions -func (*VpcV1) NewUpdateVPCOptions(id string) *UpdateVPCOptions { +func (*VpcV1) NewUpdateVPCOptions(id string, vpcPatch map[string]interface{}) *UpdateVPCOptions { return &UpdateVPCOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + VPCPatch: vpcPatch, } } @@ -30798,9 +31309,9 @@ func (options *UpdateVPCOptions) SetID(id string) *UpdateVPCOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateVPCOptions) SetName(name string) *UpdateVPCOptions { - options.Name = core.StringPtr(name) +// SetVPCPatch : Allow user to set VPCPatch +func (options *UpdateVPCOptions) SetVPCPatch(vpcPatch map[string]interface{}) *UpdateVPCOptions { + options.VPCPatch = vpcPatch return options } @@ -30813,23 +31324,24 @@ func (options *UpdateVPCOptions) SetHeaders(param map[string]string) *UpdateVPCO // UpdateVPCRouteOptions : The UpdateVPCRoute options. type UpdateVPCRouteOptions struct { // The VPC identifier. - VPCID *string `json:"vpc_id" validate:"required"` + VPCID *string `json:"vpc_id" validate:"required,ne="` // The route identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this route. Names must be unique within the VPC routing table the route resides in. - Name *string `json:"name,omitempty"` + // The route patch. + RoutePatch map[string]interface{} `json:"Route_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPCRouteOptions : Instantiate UpdateVPCRouteOptions -func (*VpcV1) NewUpdateVPCRouteOptions(vpcID string, id string) *UpdateVPCRouteOptions { +func (*VpcV1) NewUpdateVPCRouteOptions(vpcID string, id string, routePatch map[string]interface{}) *UpdateVPCRouteOptions { return &UpdateVPCRouteOptions{ - VPCID: core.StringPtr(vpcID), - ID: core.StringPtr(id), + VPCID: core.StringPtr(vpcID), + ID: core.StringPtr(id), + RoutePatch: routePatch, } } @@ -30845,9 +31357,9 @@ func (options *UpdateVPCRouteOptions) SetID(id string) *UpdateVPCRouteOptions { return options } -// SetName : Allow user to set Name -func (options *UpdateVPCRouteOptions) SetName(name string) *UpdateVPCRouteOptions { - options.Name = core.StringPtr(name) +// SetRoutePatch : Allow user to set RoutePatch +func (options *UpdateVPCRouteOptions) SetRoutePatch(routePatch map[string]interface{}) *UpdateVPCRouteOptions { + options.RoutePatch = routePatch return options } @@ -30860,42 +31372,24 @@ func (options *UpdateVPCRouteOptions) SetHeaders(param map[string]string) *Updat // UpdateVPNGatewayConnectionOptions : The UpdateVPNGatewayConnection options. type UpdateVPNGatewayConnectionOptions struct { // The VPN gateway identifier. - VPNGatewayID *string `json:"vpn_gateway_id" validate:"required"` + VPNGatewayID *string `json:"vpn_gateway_id" validate:"required,ne="` // The VPN gateway connection identifier. - ID *string `json:"id" validate:"required"` - - // If set to false, the VPN connection is shut down. - AdminStateUp *bool `json:"admin_state_up,omitempty"` - - // The IP address of the peer VPN gateway. - PeerAddress *string `json:"peer_address,omitempty"` - - // The user-defined name for this VPN gateway connection. - Name *string `json:"name,omitempty"` - - // The preshared key. - Psk *string `json:"psk,omitempty"` - - // The Dead Peer Detection settings. - DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + ID *string `json:"id" validate:"required,ne="` - // Optional IKE policy configuration. The absence of a policy indicates autonegotiation. - IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"` - - // Optional IPsec policy configuration. The absence of a policy indicates - // autonegotiation. - IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` + // The VPN gateway connection patch. + VPNGatewayConnectionPatch map[string]interface{} `json:"VPNGatewayConnection_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPNGatewayConnectionOptions : Instantiate UpdateVPNGatewayConnectionOptions -func (*VpcV1) NewUpdateVPNGatewayConnectionOptions(vpnGatewayID string, id string) *UpdateVPNGatewayConnectionOptions { +func (*VpcV1) NewUpdateVPNGatewayConnectionOptions(vpnGatewayID string, id string, vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions { return &UpdateVPNGatewayConnectionOptions{ - VPNGatewayID: core.StringPtr(vpnGatewayID), - ID: core.StringPtr(id), + VPNGatewayID: core.StringPtr(vpnGatewayID), + ID: core.StringPtr(id), + VPNGatewayConnectionPatch: vpnGatewayConnectionPatch, } } @@ -30911,45 +31405,9 @@ func (options *UpdateVPNGatewayConnectionOptions) SetID(id string) *UpdateVPNGat return options } -// SetAdminStateUp : Allow user to set AdminStateUp -func (options *UpdateVPNGatewayConnectionOptions) SetAdminStateUp(adminStateUp bool) *UpdateVPNGatewayConnectionOptions { - options.AdminStateUp = core.BoolPtr(adminStateUp) - return options -} - -// SetPeerAddress : Allow user to set PeerAddress -func (options *UpdateVPNGatewayConnectionOptions) SetPeerAddress(peerAddress string) *UpdateVPNGatewayConnectionOptions { - options.PeerAddress = core.StringPtr(peerAddress) - return options -} - -// SetName : Allow user to set Name -func (options *UpdateVPNGatewayConnectionOptions) SetName(name string) *UpdateVPNGatewayConnectionOptions { - options.Name = core.StringPtr(name) - return options -} - -// SetPsk : Allow user to set Psk -func (options *UpdateVPNGatewayConnectionOptions) SetPsk(psk string) *UpdateVPNGatewayConnectionOptions { - options.Psk = core.StringPtr(psk) - return options -} - -// SetDeadPeerDetection : Allow user to set DeadPeerDetection -func (options *UpdateVPNGatewayConnectionOptions) SetDeadPeerDetection(deadPeerDetection *VPNGatewayConnectionDpdPrototype) *UpdateVPNGatewayConnectionOptions { - options.DeadPeerDetection = deadPeerDetection - return options -} - -// SetIkePolicy : Allow user to set IkePolicy -func (options *UpdateVPNGatewayConnectionOptions) SetIkePolicy(ikePolicy IkePolicyIdentityIntf) *UpdateVPNGatewayConnectionOptions { - options.IkePolicy = ikePolicy - return options -} - -// SetIpsecPolicy : Allow user to set IpsecPolicy -func (options *UpdateVPNGatewayConnectionOptions) SetIpsecPolicy(ipsecPolicy IPsecPolicyIdentityIntf) *UpdateVPNGatewayConnectionOptions { - options.IpsecPolicy = ipsecPolicy +// SetVPNGatewayConnectionPatch : Allow user to set VPNGatewayConnectionPatch +func (options *UpdateVPNGatewayConnectionOptions) SetVPNGatewayConnectionPatch(vpnGatewayConnectionPatch map[string]interface{}) *UpdateVPNGatewayConnectionOptions { + options.VPNGatewayConnectionPatch = vpnGatewayConnectionPatch return options } @@ -30962,19 +31420,20 @@ func (options *UpdateVPNGatewayConnectionOptions) SetHeaders(param map[string]st // UpdateVPNGatewayOptions : The UpdateVPNGateway options. type UpdateVPNGatewayOptions struct { // The VPN gateway identifier. - ID *string `json:"id" validate:"required"` + ID *string `json:"id" validate:"required,ne="` - // The user-defined name for this VPN gateway. - Name *string `json:"name,omitempty"` + // The VPN gateway patch. + VPNGatewayPatch map[string]interface{} `json:"VPNGateway_patch" validate:"required"` // Allows users to set headers on API requests Headers map[string]string } // NewUpdateVPNGatewayOptions : Instantiate UpdateVPNGatewayOptions -func (*VpcV1) NewUpdateVPNGatewayOptions(id string) *UpdateVPNGatewayOptions { +func (*VpcV1) NewUpdateVPNGatewayOptions(id string, vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions { return &UpdateVPNGatewayOptions{ - ID: core.StringPtr(id), + ID: core.StringPtr(id), + VPNGatewayPatch: vpnGatewayPatch, } } @@ -30984,9 +31443,9 @@ func (options *UpdateVPNGatewayOptions) SetID(id string) *UpdateVPNGatewayOption return options } -// SetName : Allow user to set Name -func (options *UpdateVPNGatewayOptions) SetName(name string) *UpdateVPNGatewayOptions { - options.Name = core.StringPtr(name) +// SetVPNGatewayPatch : Allow user to set VPNGatewayPatch +func (options *UpdateVPNGatewayOptions) SetVPNGatewayPatch(vpnGatewayPatch map[string]interface{}) *UpdateVPNGatewayOptions { + options.VPNGatewayPatch = vpnGatewayPatch return options } @@ -31242,6 +31701,33 @@ func UnmarshalVPCIdentity(m map[string]json.RawMessage, result interface{}) (err return } +// VPCPatch : VPCPatch struct +type VPCPatch struct { + // The unique user-defined name for this VPC. + Name *string `json:"name,omitempty"` +} + +// UnmarshalVPCPatch unmarshals an instance of VPCPatch from the specified map of raw messages. +func UnmarshalVPCPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPCPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VPCPatch +func (vpcPatch *VPCPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(vpcPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VPCReference : VPCReference struct type VPCReference struct { // The unique identifier for this VPC. @@ -31723,6 +32209,76 @@ func UnmarshalVPNGatewayConnectionLocalCIDRs(m map[string]json.RawMessage, resul return } +// VPNGatewayConnectionPatch : VPNGatewayConnectionPatch struct +type VPNGatewayConnectionPatch struct { + // If set to false, the VPN connection is shut down. + AdminStateUp *bool `json:"admin_state_up,omitempty"` + + // The IP address of the peer VPN gateway. + PeerAddress *string `json:"peer_address,omitempty"` + + // The user-defined name for this VPN gateway connection. + Name *string `json:"name,omitempty"` + + // The preshared key. + Psk *string `json:"psk,omitempty"` + + // The Dead Peer Detection settings. + DeadPeerDetection *VPNGatewayConnectionDpdPrototype `json:"dead_peer_detection,omitempty"` + + // Optional IKE policy configuration. The absence of a policy indicates autonegotiation. + IkePolicy IkePolicyIdentityIntf `json:"ike_policy,omitempty"` + + // Optional IPsec policy configuration. The absence of a policy indicates + // autonegotiation. + IpsecPolicy IPsecPolicyIdentityIntf `json:"ipsec_policy,omitempty"` +} + +// UnmarshalVPNGatewayConnectionPatch unmarshals an instance of VPNGatewayConnectionPatch from the specified map of raw messages. +func UnmarshalVPNGatewayConnectionPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayConnectionPatch) + err = core.UnmarshalPrimitive(m, "admin_state_up", &obj.AdminStateUp) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "peer_address", &obj.PeerAddress) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "psk", &obj.Psk) + if err != nil { + return + } + err = core.UnmarshalModel(m, "dead_peer_detection", &obj.DeadPeerDetection, UnmarshalVPNGatewayConnectionDpdPrototype) + if err != nil { + return + } + err = core.UnmarshalModel(m, "ike_policy", &obj.IkePolicy, UnmarshalIkePolicyIdentity) + if err != nil { + return + } + err = core.UnmarshalModel(m, "ipsec_policy", &obj.IpsecPolicy, UnmarshalIPsecPolicyIdentity) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VPNGatewayConnectionPatch +func (vpnGatewayConnectionPatch *VPNGatewayConnectionPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(vpnGatewayConnectionPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VPNGatewayConnectionPeerCIDRs : VPNGatewayConnectionPeerCIDRs struct type VPNGatewayConnectionPeerCIDRs struct { // A collection of peer CIDRs for this resource. @@ -31784,6 +32340,33 @@ func UnmarshalVPNGatewayConnectionReference(m map[string]json.RawMessage, result return } +// VPNGatewayPatch : VPNGatewayPatch struct +type VPNGatewayPatch struct { + // The user-defined name for this VPN gateway. + Name *string `json:"name,omitempty"` +} + +// UnmarshalVPNGatewayPatch unmarshals an instance of VPNGatewayPatch from the specified map of raw messages. +func UnmarshalVPNGatewayPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VPNGatewayPatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VPNGatewayPatch +func (vpnGatewayPatch *VPNGatewayPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(vpnGatewayPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VPNGatewayPublicIP : The public IP address assigned to this VPN gateway. type VPNGatewayPublicIP struct { // The IP address. This property may add support for IPv6 addresses in the future. When processing a value in this @@ -31933,12 +32516,12 @@ func UnmarshalVolume(m map[string]json.RawMessage, result interface{}) (err erro // VolumeAttachment : VolumeAttachment struct type VolumeAttachment struct { - // The user-defined name for this volume attachment. - Name *string `json:"name" validate:"required"` - // If set to true, when deleting the instance the volume will also be deleted. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. + Name *string `json:"name" validate:"required"` + // The unique identifier for this volume attachment. ID *string `json:"id" validate:"required"` @@ -31981,11 +32564,11 @@ const ( // UnmarshalVolumeAttachment unmarshals an instance of VolumeAttachment from the specified map of raw messages. func UnmarshalVolumeAttachment(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachment) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } - err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -32055,16 +32638,49 @@ func UnmarshalVolumeAttachmentDevice(m map[string]json.RawMessage, result interf return } -// VolumeAttachmentPrototypeInstanceByImageContext : VolumeAttachmentPrototypeInstanceByImageContext struct -type VolumeAttachmentPrototypeInstanceByImageContext struct { +// VolumeAttachmentPatch : VolumeAttachmentPatch struct +type VolumeAttachmentPatch struct { + // If set to true, when deleting the instance the volume will also be deleted. + DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. Name *string `json:"name,omitempty"` +} + +// UnmarshalVolumeAttachmentPatch unmarshals an instance of VolumeAttachmentPatch from the specified map of raw messages. +func UnmarshalVolumeAttachmentPatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VolumeAttachmentPatch) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VolumeAttachmentPatch +func (volumeAttachmentPatch *VolumeAttachmentPatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(volumeAttachmentPatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} +// VolumeAttachmentPrototypeInstanceByImageContext : VolumeAttachmentPrototypeInstanceByImageContext struct +type VolumeAttachmentPrototypeInstanceByImageContext struct { // If set to true, when deleting the instance the volume will also be deleted. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` - // The identity of the volume to attach to the instance, or a prototype object for a - // new volume. + // The user-defined name for this volume attachment. + Name *string `json:"name,omitempty"` + + // A prototype object for a new volume. Volume *VolumePrototypeInstanceByImageContext `json:"volume" validate:"required"` } @@ -32080,11 +32696,11 @@ func (*VpcV1) NewVolumeAttachmentPrototypeInstanceByImageContext(volume *VolumeP // UnmarshalVolumeAttachmentPrototypeInstanceByImageContext unmarshals an instance of VolumeAttachmentPrototypeInstanceByImageContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceByImageContext) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } - err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -32098,12 +32714,12 @@ func UnmarshalVolumeAttachmentPrototypeInstanceByImageContext(m map[string]json. // VolumeAttachmentPrototypeInstanceContext : VolumeAttachmentPrototypeInstanceContext struct type VolumeAttachmentPrototypeInstanceContext struct { - // The user-defined name for this volume attachment. - Name *string `json:"name,omitempty"` - // If set to true, when deleting the instance the volume will also be deleted. DeleteVolumeOnInstanceDelete *bool `json:"delete_volume_on_instance_delete,omitempty"` + // The user-defined name for this volume attachment. + Name *string `json:"name,omitempty"` + // The identity of the volume to attach to the instance, or a prototype object for a new // volume. Volume VolumeAttachmentPrototypeInstanceContextVolumeIntf `json:"volume" validate:"required"` @@ -32121,11 +32737,11 @@ func (*VpcV1) NewVolumeAttachmentPrototypeInstanceContext(volume VolumeAttachmen // UnmarshalVolumeAttachmentPrototypeInstanceContext unmarshals an instance of VolumeAttachmentPrototypeInstanceContext from the specified map of raw messages. func UnmarshalVolumeAttachmentPrototypeInstanceContext(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(VolumeAttachmentPrototypeInstanceContext) - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) if err != nil { return } - err = core.UnmarshalPrimitive(m, "delete_volume_on_instance_delete", &obj.DeleteVolumeOnInstanceDelete) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -32449,6 +33065,33 @@ func UnmarshalVolumeIdentity(m map[string]json.RawMessage, result interface{}) ( return } +// VolumePatch : VolumePatch struct +type VolumePatch struct { + // The unique user-defined name for this volume. + Name *string `json:"name,omitempty"` +} + +// UnmarshalVolumePatch unmarshals an instance of VolumePatch from the specified map of raw messages. +func UnmarshalVolumePatch(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(VolumePatch) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// AsPatch returns a generic map representation of the VolumePatch +func (volumePatch *VolumePatch) AsPatch() (patch map[string]interface{}, err error) { + var jsonData []byte + jsonData, err = json.Marshal(volumePatch) + if err == nil { + err = json.Unmarshal(jsonData, &patch) + } + return +} + // VolumeProfile : VolumeProfile struct type VolumeProfile struct { // The name for this volume profile. @@ -32703,8 +33346,9 @@ type VolumePrototypeInstanceByImageContext 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`. + // If this property is not provided but the image is encrypted, the image's + // `encryption_key` will be used. Otherwise, the `encryption` type for the + // volume will be `provider_managed`. EncryptionKey EncryptionKeyIdentityIntf `json:"encryption_key,omitempty"` // The capacity of the volume in gigabytes. Note that the specified minimum and maximum capacity values for creating or @@ -33137,8 +33781,6 @@ type FloatingIPPrototypeFloatingIPByTarget struct { // randomly-selected words. Name *string `json:"name,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The network interface this floating IP is to be bound to. @@ -33184,8 +33826,6 @@ type FloatingIPPrototypeFloatingIPByZone struct { // randomly-selected words. Name *string `json:"name,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The identity of the zone to provision a floating IP in. @@ -33926,8 +34566,22 @@ type ImagePrototypeImageByFile struct { // will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. + // A base64-encoded, encrypted representation of the key that was used to encrypt the data for this image. + // + // That representation is created by wrapping the key's value with the `encryption_key` root key (which must also be + // provided), using either [Key Protect](https://cloud.ibm.com/docs/key-protect?topic=key-protect-wrap-keys) or the + // [Hyper Protect Crypto Service](https://cloud.ibm.com/docs/services/hs-crypto?topic=hs-crypto-wrap-keys). + // + // If this property is not provided, the imported image is treated as unencrypted. + EncryptedDataKey *string `json:"encrypted_data_key,omitempty"` + + // A reference to the root key that was used to wrap the data key (which is ultimately represented as + // `encrypted_data_key`). Additionally, the root key will be used to encrypt volumes created from this image (unless an + // alternate `encryption_key` is provided at volume creation). + // + // If this property is not provided, the imported image is treated as unencrypted. + EncryptionKey *EncryptionKeyReference `json:"encryption_key,omitempty"` + ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The file from which to create the image. @@ -33960,6 +34614,14 @@ func UnmarshalImagePrototypeImageByFile(m map[string]json.RawMessage, result int if err != nil { return } + err = core.UnmarshalPrimitive(m, "encrypted_data_key", &obj.EncryptedDataKey) + if err != nil { + return + } + err = core.UnmarshalModel(m, "encryption_key", &obj.EncryptionKey, UnmarshalEncryptionKeyReference) + if err != nil { + return + } err = core.UnmarshalModel(m, "resource_group", &obj.ResourceGroup, UnmarshalResourceGroupIdentity) if err != nil { return @@ -34837,12 +35499,10 @@ type InstancePrototypeInstanceByImage struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Primary network interface. @@ -34955,12 +35615,10 @@ type InstancePrototypeInstanceBySourceTemplate struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Primary network interface. @@ -35171,12 +35829,10 @@ type InstanceTemplatePrototypeInstanceByImage struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Primary network interface. @@ -35289,12 +35945,10 @@ type InstanceTemplatePrototypeInstanceBySourceTemplate struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Primary network interface. @@ -35420,8 +36074,8 @@ type InstanceTemplateInstanceByImage struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The date and time that the instance template was created. @@ -35553,8 +36207,8 @@ type InstanceTemplateInstanceBySourceTemplate struct { // Collection of volume attachments. VolumeAttachments []VolumeAttachmentPrototypeInstanceContext `json:"volume_attachments,omitempty"` - // The VPC the virtual server instance is to be a part of. If provided, must match the - // VPC tied to the subnets of the instance's network interfaces. + // The VPC the virtual server instance is to be a part of. If provided, must match the VPC tied to the subnets of the + // instance's network interfaces. VPC VPCIdentityIntf `json:"vpc,omitempty"` // The date and time that the instance template was created. @@ -36100,9 +36754,9 @@ func UnmarshalLoadBalancerListenerPolicyPrototypeTargetLoadBalancerPoolIdentity( return } -// LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL struct -// This model "extends" LoadBalancerListenerPolicyTargetReference -type LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL struct { +// LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL : LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct +// This model "extends" LoadBalancerListenerPolicyTarget +type LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL struct { // The http status code in the redirect response. HTTPStatusCode *int64 `json:"http_status_code" validate:"required"` @@ -36110,13 +36764,13 @@ type LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirect URL *string `json:"url" validate:"required"` } -func (*LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL) isaLoadBalancerListenerPolicyTargetReference() bool { +func (*LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) isaLoadBalancerListenerPolicyTarget() bool { return true } -// UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL unmarshals an instance of LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL from the specified map of raw messages. -func UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolicyRedirectURL) +// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyTargetLoadBalancerListenerPolicyRedirectURL) err = core.UnmarshalPrimitive(m, "http_status_code", &obj.HTTPStatusCode) if err != nil { return @@ -36129,9 +36783,9 @@ func UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerListenerPolic return } -// LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference : LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference struct -// This model "extends" LoadBalancerListenerPolicyTargetReference -type LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference struct { +// LoadBalancerListenerPolicyTargetLoadBalancerPoolReference : LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct +// This model "extends" LoadBalancerListenerPolicyTarget +type LoadBalancerListenerPolicyTargetLoadBalancerPoolReference struct { // The unique identifier for this load balancer pool. ID *string `json:"id" validate:"required"` @@ -36142,13 +36796,13 @@ type LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference struct { Name *string `json:"name" validate:"required"` } -func (*LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference) isaLoadBalancerListenerPolicyTargetReference() bool { +func (*LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) isaLoadBalancerListenerPolicyTarget() bool { return true } -// UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference unmarshals an instance of LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference from the specified map of raw messages. -func UnmarshalLoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(LoadBalancerListenerPolicyTargetReferenceLoadBalancerPoolReference) +// UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference unmarshals an instance of LoadBalancerListenerPolicyTargetLoadBalancerPoolReference from the specified map of raw messages. +func UnmarshalLoadBalancerListenerPolicyTargetLoadBalancerPoolReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(LoadBalancerListenerPolicyTargetLoadBalancerPoolReference) err = core.UnmarshalPrimitive(m, "id", &obj.ID) if err != nil { return @@ -36541,8 +37195,6 @@ type NetworkACLPrototypeNetworkACLByRules struct { // The VPC this network ACL is to be a part of. VPC VPCIdentityIntf `json:"vpc" validate:"required"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Array of prototype objects for rules to create along with this network ACL. If unspecified, no rules will be @@ -36550,15 +37202,6 @@ type NetworkACLPrototypeNetworkACLByRules struct { Rules []NetworkACLRulePrototypeNetworkACLContextIntf `json:"rules,omitempty"` } -// NewNetworkACLPrototypeNetworkACLByRules : Instantiate NetworkACLPrototypeNetworkACLByRules (Generic Model Constructor) -func (*VpcV1) NewNetworkACLPrototypeNetworkACLByRules(vpc VPCIdentityIntf) (model *NetworkACLPrototypeNetworkACLByRules, err error) { - model = &NetworkACLPrototypeNetworkACLByRules{ - VPC: vpc, - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLPrototypeNetworkACLByRules) isaNetworkACLPrototype() bool { return true } @@ -36596,8 +37239,6 @@ type NetworkACLPrototypeNetworkACLBySourceNetworkACL struct { // The VPC this network ACL is to be a part of. VPC VPCIdentityIntf `json:"vpc" validate:"required"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // Network ACL to copy rules from. @@ -36731,8 +37372,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol" 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. + // 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. @@ -36855,8 +37496,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol" 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. + // 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. @@ -36994,8 +37635,8 @@ type NetworkACLRuleItemNetworkACLRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol" 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. + // 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. @@ -37164,19 +37805,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -37265,19 +37893,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -37379,19 +37994,6 @@ const ( NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototypeNetworkACLContext() bool { return true } @@ -37465,8 +38067,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolAll struct { // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` - // The rule to insert this rule immediately before. If omitted, this rule will be - // inserted after all existing rules. + // The rule to insert this rule immediately before. If omitted, this rule will be inserted after all existing rules. Before NetworkACLRuleIdentityIntf `json:"before,omitempty"` } @@ -37493,19 +38094,6 @@ const ( NetworkACLRulePrototypeNetworkACLRuleProtocolAllProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolAll (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolAll, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolAll{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLRuleProtocolAll) isaNetworkACLRulePrototype() bool { return true } @@ -37567,8 +38155,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp struct { // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` - // The rule to insert this rule immediately before. If omitted, this rule will be - // inserted after all existing rules. + // 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 ICMP traffic code to allow. If unspecified, all codes are allowed. This can only be specified if type is also @@ -37602,19 +38189,6 @@ const ( NetworkACLRulePrototypeNetworkACLRuleProtocolIcmpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLRuleProtocolIcmp) isaNetworkACLRulePrototype() bool { return true } @@ -37684,8 +38258,7 @@ type NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp struct { // The protocol to enforce. Protocol *string `json:"protocol" validate:"required"` - // The rule to insert this rule immediately before. If omitted, this rule will be - // inserted after all existing rules. + // 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 inclusive upper bound of TCP/UDP destination port range. @@ -37724,19 +38297,6 @@ const ( NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudpProtocolUDPConst = "udp" ) -// NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp : Instantiate NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp (Generic Model Constructor) -func (*VpcV1) NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action string, destination string, direction string, source string, protocol string) (model *NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp, err error) { - model = &NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp{ - Action: core.StringPtr(action), - Destination: core.StringPtr(destination), - Direction: core.StringPtr(direction), - Source: core.StringPtr(source), - Protocol: core.StringPtr(protocol), - } - err = core.ValidateStruct(model, "required parameters") - return -} - func (*NetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp) isaNetworkACLRulePrototype() bool { return true } @@ -38873,10 +39433,6 @@ 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 SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` } @@ -38904,15 +39460,6 @@ const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolAllProtocolUDPConst = "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 { return true } @@ -38957,10 +39504,6 @@ 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 SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The ICMP traffic code to allow. @@ -38994,15 +39537,6 @@ const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmpProtocolUDPConst = "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 { return true } @@ -39054,10 +39588,6 @@ 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 SecurityGroupRulePrototypeRemoteIntf `json:"remote,omitempty"` // The inclusive upper bound of TCP/UDP port range. @@ -39091,15 +39621,6 @@ const ( SecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudpProtocolUDPConst = "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 { return true } @@ -39247,10 +39768,6 @@ type SecurityGroupRuleSecurityGroupRuleProtocolAll 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 SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` } @@ -39336,10 +39853,6 @@ type SecurityGroupRuleSecurityGroupRuleProtocolIcmp 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 SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The ICMP traffic code to allow. @@ -39438,10 +39951,6 @@ type SecurityGroupRuleSecurityGroupRuleProtocolTcpudp 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 SecurityGroupRuleRemoteIntf `json:"remote" validate:"required"` // The inclusive upper bound of TCP/UDP port range. @@ -39618,7 +40127,7 @@ type SubnetPrototypeSubnetByCIDR struct { // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The network ACL to use for this subnet. + // The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used. NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` // The public gateway to handle internet bound traffic for this subnet. @@ -39627,8 +40136,6 @@ type SubnetPrototypeSubnetByCIDR struct { // The IP version(s) to support for this subnet. IPVersion *string `json:"ip_version,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The VPC the subnet is to be a part of. @@ -39710,7 +40217,7 @@ type SubnetPrototypeSubnetByTotalCount struct { // the name will be a hyphenated list of randomly-selected words. Name *string `json:"name,omitempty"` - // The network ACL to use for this subnet. + // The network ACL to use for this subnet. If unspecified, the default network ACL for the VPC is used. NetworkACL NetworkACLIdentityIntf `json:"network_acl,omitempty"` // The public gateway to handle internet bound traffic for this subnet. @@ -39719,8 +40226,6 @@ type SubnetPrototypeSubnetByTotalCount struct { // The IP version(s) to support for this subnet. IPVersion *string `json:"ip_version,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The VPC the subnet is to be a part of. @@ -40174,8 +40679,6 @@ type VolumePrototypeVolumeByCapacity struct { // The bandwidth for the volume. Iops *int64 `json:"iops,omitempty"` - // The resource group to use. If unspecified, the account's [default resource - // group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used. ResourceGroup ResourceGroupIdentityIntf `json:"resource_group,omitempty"` // The location of the volume. diff --git a/vpcv1/vpc_v1_integration_utils_test.go b/vpcv1/vpc_v1_integration_utils_test.go index dc2f272..f35a536 100644 --- a/vpcv1/vpc_v1_integration_utils_test.go +++ b/vpcv1/vpc_v1_integration_utils_test.go @@ -134,10 +134,15 @@ func ReleaseFloatingIP(vpcService *vpcv1.VpcV1, id string) (response *core.Detai // /floating_ips/{id} // Update the specified floating IP func UpdateFloatingIP(vpcService *vpcv1.VpcV1, id, name string) (floatingIP *vpcv1.FloatingIP, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateFloatingIPOptions{ - ID: &id, + body := &vpcv1.FloatingIPPatch{ Name: &name, } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateFloatingIPOptions{ + ID: &id, + FloatingIPPatch: patchBody, + } + floatingIP, response, err = vpcService.UpdateFloatingIP(options) return } @@ -185,9 +190,11 @@ func GetSSHKey(vpcService *vpcv1.VpcV1, id string) (key *vpcv1.Key, response *co // /keys/{id} // Update specified key func UpdateSSHKey(vpcService *vpcv1.VpcV1, id, name string) (key *vpcv1.Key, response *core.DetailedResponse, err error) { - updateKeyOptions := &vpcv1.UpdateKeyOptions{} - updateKeyOptions.SetID(id) - updateKeyOptions.SetName(name) + body := &vpcv1.KeyPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + updateKeyOptions := vpcService.NewUpdateKeyOptions(id, patchBody) key, response, err = vpcService.UpdateKey(updateKeyOptions) return } @@ -251,10 +258,11 @@ func DeleteVPC(vpcService *vpcv1.VpcV1, id string) (response *core.DetailedRespo // /vpcs/{id} // Update specified VPC func UpdateVPC(vpcService *vpcv1.VpcV1, id, name string) (vpc *vpcv1.VPC, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateVPCOptions{ + body := &vpcv1.VPCPatch{ Name: &name, } - options.SetID(id) + patchBody, _ := body.AsPatch() + options := vpcService.NewUpdateVPCOptions(id, patchBody) vpc, response, err = vpcService.UpdateVPC(options) return } @@ -359,10 +367,11 @@ func DeleteVpcAddressPrefix(vpcService *vpcv1.VpcV1, vpcID, addressPrefixID stri // /vpcs/{vpc_id}/address_prefixes/{id} // Update an address pool prefix func UpdateVpcAddressPrefix(vpcService *vpcv1.VpcV1, vpcID, addressPrefixID, name string) (addressPrefix *vpcv1.AddressPrefix, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateVPCAddressPrefixOptions{} - options.SetVPCID(vpcID) - options.SetID(addressPrefixID) - options.SetName(name) + body := &vpcv1.AddressPrefixPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := vpcService.NewUpdateVPCAddressPrefixOptions(vpcID, addressPrefixID, patchBody) addressPrefix, response, err = vpcService.UpdateVPCAddressPrefix(options) return } @@ -426,10 +435,15 @@ func DeleteVpcRoute(vpcService *vpcv1.VpcV1, vpcID, routeID string) (response *c // /vpcs/{vpc_id}/routes/{id} // Update a route func UpdateVpcRoute(vpcService *vpcv1.VpcV1, vpcID, routeID, name string) (route *vpcv1.Route, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateVPCRouteOptions{} - options.SetVPCID(vpcID) - options.SetID(routeID) - options.SetName(name) + body := &vpcv1.RoutePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateVPCRouteOptions{ + RoutePatch: patchBody, + VPCID: &vpcID, + ID: &routeID, + } route, response, err = vpcService.UpdateVPCRoute(options) return } @@ -491,9 +505,14 @@ func DeleteVolume(vpcService *vpcv1.VpcV1, id string) (response *core.DetailedRe // /volumes/{id} // Update specified volume func UpdateVolume(vpcService *vpcv1.VpcV1, id, name string) (volume *vpcv1.Volume, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateVolumeOptions{} - options.SetID(id) - options.SetName(name) + body := &vpcv1.AddressPrefixPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateVolumeOptions{ + VolumePatch: patchBody, + ID: &id, + } volume, response, err = vpcService.UpdateVolume(options) return } @@ -555,9 +574,14 @@ func DeleteSubnet(vpcService *vpcv1.VpcV1, id string) (response *core.DetailedRe // /subnets/{id} // Update specified subnet func UpdateSubnet(vpcService *vpcv1.VpcV1, id, name string) (subnet *vpcv1.Subnet, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateSubnetOptions{} + body := &vpcv1.SubnetPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateSubnetOptions{ + SubnetPatch: patchBody, + } options.SetID(id) - options.SetName(name) subnet, response, err = vpcService.UpdateSubnet(options) return } @@ -685,9 +709,14 @@ func DeleteImage(vpcService *vpcv1.VpcV1, id string) (response *core.DetailedRes // /images/{id} // Update specified image func UpdateImage(vpcService *vpcv1.VpcV1, id, name string) (image *vpcv1.Image, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateImageOptions{} + body := &vpcv1.ImagePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateImageOptions{ + ImagePatch: patchBody, + } options.SetID(id) - options.SetName(name) image, response, err = vpcService.UpdateImage(options) return } @@ -775,9 +804,14 @@ func DeleteInstance(vpcService *vpcv1.VpcV1, id string) (response *core.Detailed // /instances/{id} // Update specified instance func UpdateInstance(vpcService *vpcv1.VpcV1, id, name string) (instance *vpcv1.Instance, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceOptions{} - options.SetID(id) - options.SetName(name) + body := &vpcv1.InstancePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceOptions{ + InstancePatch: patchBody, + ID: &id, + } instance, response, err = vpcService.UpdateInstance(options) return } @@ -887,10 +921,15 @@ func GetNetworkInterface(vpcService *vpcv1.VpcV1, instanceID, networkID string) // /instances/{instance_id}/network_interfaces/{id} // Update a network interface func UpdateNetworkInterface(vpcService *vpcv1.VpcV1, instanceID, networkID, name string) (networkInterface *vpcv1.NetworkInterface, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceNetworkInterfaceOptions{} - options.SetID(networkID) - options.SetInstanceID(instanceID) - options.SetName(name) + body := &vpcv1.NetworkInterfacePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceNetworkInterfaceOptions{ + NetworkInterfacePatch: patchBody, + ID: &networkID, + InstanceID: &instanceID, + } networkInterface, response, err = vpcService.UpdateInstanceNetworkInterface(options) return } @@ -993,10 +1032,15 @@ func GetVolumeAttachment(vpcService *vpcv1.VpcV1, instanceID, volumeID string) ( // /instances/{instance_id}/volume_attachments/{id} // Update a volume attachment func UpdateVolumeAttachment(vpcService *vpcv1.VpcV1, instanceID, volumeID, name string) (volumeAttachment *vpcv1.VolumeAttachment, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceVolumeAttachmentOptions{} - options.SetInstanceID(instanceID) - options.SetID(volumeID) - options.SetName(name) + body := &vpcv1.VolumeAttachmentPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceVolumeAttachmentOptions{ + VolumeAttachmentPatch: patchBody, + InstanceID: &instanceID, + ID: &volumeID, + } volumeAttachment, response, err = vpcService.UpdateInstanceVolumeAttachment(options) return } @@ -1054,9 +1098,14 @@ func GetPublicGateway(vpcService *vpcv1.VpcV1, id string) (pgw *vpcv1.PublicGate // /public_gateways/{id} // Update a public gateway's name func UpdatePublicGateway(vpcService *vpcv1.VpcV1, id, name string) (pgw *vpcv1.PublicGateway, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdatePublicGatewayOptions{} - options.SetID(id) - options.SetName(name) + body := &vpcv1.PublicGatewayPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdatePublicGatewayOptions{ + PublicGatewayPatch: patchBody, + ID: &id, + } pgw, response, err = vpcService.UpdatePublicGateway(options) return } @@ -1117,9 +1166,14 @@ func GetNetworkAcl(vpcService *vpcv1.VpcV1, ID string) (networkACL *vpcv1.Networ // /network_acls/{id} // Update a network ACL func UpdateNetworkAcl(vpcService *vpcv1.VpcV1, id, name string) (networkACL *vpcv1.NetworkACL, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateNetworkACLOptions{} - options.SetID(id) - options.SetName(name) + body := &vpcv1.NetworkACLPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateNetworkACLOptions{ + NetworkACLPatch: patchBody, + ID: &id, + } networkACL, response, err = vpcService.UpdateNetworkACL(options) return } @@ -1178,10 +1232,15 @@ func GetNetworkAclRule(vpcService *vpcv1.VpcV1, aclID, ruleID string) (rule vpcv // /network_acls/{network_acl_id}/rules/{id} // Update a rule func UpdateNetworkAclRule(vpcService *vpcv1.VpcV1, aclID, ruleID, name string) (rule vpcv1.NetworkACLRuleIntf, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateNetworkACLRuleOptions{} - options.SetID(ruleID) - options.SetNetworkACLID(aclID) - options.SetName(name) + body := &vpcv1.NetworkACLRulePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateNetworkACLRuleOptions{ + NetworkACLRulePatch: patchBody, + ID: &ruleID, + NetworkACLID: &aclID, + } rule, response, err = vpcService.UpdateNetworkACLRule(options) return } @@ -1237,9 +1296,14 @@ func GetSecurityGroup(vpcService *vpcv1.VpcV1, id string) (securityGroup *vpcv1. // /security_groups/{id} // Update a security group func UpdateSecurityGroup(vpcService *vpcv1.VpcV1, id, name string) (securityGroup *vpcv1.SecurityGroup, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateSecurityGroupOptions{} - options.SetID(id) - options.SetName(name) + body := &vpcv1.SecurityGroupPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateSecurityGroupOptions{ + SecurityGroupPatch: patchBody, + ID: &id, + } securityGroup, response, err = vpcService.UpdateSecurityGroup(options) return } @@ -1339,12 +1403,17 @@ func GetSecurityGroupRule(vpcService *vpcv1.VpcV1, sgID, sgRuleID string) (rule // /security_groups/{security_group_id}/rules/{id} // Update a security group rule func UpdateSecurityGroupRule(vpcService *vpcv1.VpcV1, sgID, sgRuleID string) (rule vpcv1.SecurityGroupRuleIntf, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateSecurityGroupRuleOptions{} + body := &vpcv1.SecurityGroupRulePatch{ + Remote: &vpcv1.SecurityGroupRulePatchRemote{ + Address: core.StringPtr("1.1.1.11"), + }, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateSecurityGroupRuleOptions{ + SecurityGroupRulePatch: patchBody, + } options.SetSecurityGroupID(sgID) options.SetID(sgRuleID) - options.SetRemote(&vpcv1.SecurityGroupRulePatchRemote{ - Address: core.StringPtr("1.1.1.11"), - }) rule, response, err = vpcService.UpdateSecurityGroupRule(options) return } @@ -1417,10 +1486,14 @@ func GetLoadBalancer(vpcService *vpcv1.VpcV1, id string) (lb *vpcv1.LoadBalancer // /load_balancers/{id} // Update a load balancer func UpdateLoadBalancer(vpcService *vpcv1.VpcV1, id, name string) (lb *vpcv1.LoadBalancer, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateLoadBalancerOptions{ + body := &vpcv1.AddressPrefixPatch{ Name: &name, } - options.SetID(id) + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateLoadBalancerOptions{ + LoadBalancerPatch: patchBody, + ID: &id, + } lb, response, err = vpcService.UpdateLoadBalancer(options) return } @@ -1483,10 +1556,15 @@ func GetLoadBalancerListener(vpcService *vpcv1.VpcV1, lbID, listenerID string) ( // /load_balancers/{load_balancer_id}/listeners/{id} // Update a listener func UpdateLoadBalancerListener(vpcService *vpcv1.VpcV1, lbID, listenerID string) (listener *vpcv1.LoadBalancerListener, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateLoadBalancerListenerOptions{} - options.SetLoadBalancerID(lbID) - options.SetID(listenerID) - options.SetProtocol("tcp") + body := &vpcv1.LoadBalancerListenerPatch{ + Protocol: core.StringPtr("http"), + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateLoadBalancerListenerOptions{ + LoadBalancerListenerPatch: patchBody, + LoadBalancerID: &lbID, + ID: &listenerID, + } listener, response, err = vpcService.UpdateLoadBalancerListener(options) return } @@ -1542,16 +1620,22 @@ func GetLoadBalancerListenerPolicy(vpcService *vpcv1.VpcV1, lbID, listenerID, po // /load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{id} // Update a policy of the load balancer listener func UpdateLoadBalancerListenerPolicy(vpcService *vpcv1.VpcV1, lbID, listenerID, policyID, targetPoolID string) (policy *vpcv1.LoadBalancerListenerPolicy, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateLoadBalancerListenerPolicyOptions{} - options.SetLoadBalancerID(lbID) - options.SetListenerID(listenerID) - options.SetID(policyID) - options.SetPriority(4) - options.SetName("some-name") target := &vpcv1.LoadBalancerListenerPolicyPatchTarget{ ID: &targetPoolID, } - options.SetTarget(target) + body := &vpcv1.LoadBalancerListenerPolicyPatch{ + Name: core.StringPtr("my-loadblanacer-listner-policy"), + Priority: core.Int64Ptr(4), + Target: target, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateLoadBalancerListenerPolicyOptions{ + LoadBalancerListenerPolicyPatch: patchBody, + } + options.SetLoadBalancerID(lbID) + options.SetListenerID(listenerID) + options.SetID(policyID) + policy, response, err = vpcService.UpdateLoadBalancerListenerPolicy(options) return } @@ -1613,15 +1697,20 @@ func GetLoadBalancerListenerPolicyRule(vpcService *vpcv1.VpcV1, lbID, listenerID // /load_balancers/{load_balancer_id}/listeners/{listener_id}/policies/{policy_id}/rules/{id} // Update a rule of the load balancer listener policy func UpdateLoadBalancerListenerPolicyRule(vpcService *vpcv1.VpcV1, lbID, listenerID, policyID, ruleID string) (rule *vpcv1.LoadBalancerListenerPolicyRule, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateLoadBalancerListenerPolicyRuleOptions{} + body := &vpcv1.LoadBalancerListenerPolicyRulePatch{ + Condition: core.StringPtr("equals"), + Type: core.StringPtr("header"), + Value: core.StringPtr("1"), + Field: core.StringPtr("field-1"), + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateLoadBalancerListenerPolicyRuleOptions{ + LoadBalancerListenerPolicyRulePatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetListenerID(listenerID) options.SetPolicyID(policyID) options.SetID(ruleID) - options.SetCondition("equals") - options.SetType("header") - options.SetValue("1") - options.SetField("some-name") rule, response, err = vpcService.UpdateLoadBalancerListenerPolicyRule(options) return } @@ -1681,10 +1770,15 @@ func GetLoadBalancerPool(vpcService *vpcv1.VpcV1, lbID, poolID string) (pool *vp // /load_balancers/{load_balancer_id}/pools/{id} // Update a load balancer pool func UpdateLoadBalancerPool(vpcService *vpcv1.VpcV1, lbID, poolID string) (pool *vpcv1.LoadBalancerPool, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateLoadBalancerPoolOptions{} + body := &vpcv1.LoadBalancerPoolPatch{ + Protocol: core.StringPtr("tcp"), + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateLoadBalancerPoolOptions{ + LoadBalancerPoolPatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetID(poolID) - options.SetProtocol("tcp") pool, response, err = vpcService.UpdateLoadBalancerPool(options) return } @@ -1761,11 +1855,15 @@ func GetLoadBalancerPoolMember(vpcService *vpcv1.VpcV1, lbID, poolID, memberID s // UpdateLoadBalancerPoolMember PATCH // /load_balancers/{load_balancer_id}/pools/{pool_id}/members/{id} func UpdateLoadBalancerPoolMember(vpcService *vpcv1.VpcV1, lbID, poolID, memberID string) (member *vpcv1.LoadBalancerPoolMember, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateLoadBalancerPoolMemberOptions{} + body := &vpcv1.LoadBalancerPoolMemberPatch{ + Port: core.Int64Ptr(3434), + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateLoadBalancerPoolMemberOptions{ + LoadBalancerPoolMemberPatch: patchBody, + } options.SetLoadBalancerID(lbID) options.SetPoolID(poolID) - options.SetID(memberID) - options.SetPort(3434) member, response, err = vpcService.UpdateLoadBalancerPoolMember(options) return } @@ -1820,10 +1918,14 @@ func GetIkePolicy(vpcService *vpcv1.VpcV1, id string) (ikePolicy *vpcv1.IkePolic // /ike_policies/{id} // Update an IKE policy func UpdateIkePolicy(vpcService *vpcv1.VpcV1, id string) (ikePolicy *vpcv1.IkePolicy, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateIkePolicyOptions{ - ID: &id, - DhGroup: core.Int64Ptr(5), + body := &vpcv1.IkePolicyPatch{ Name: core.StringPtr("go-ike-policy-2"), + DhGroup: core.Int64Ptr(5), + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateIkePolicyOptions{ + ID: &id, + IkePolicyPatch: patchBody, } ikePolicy, response, err = vpcService.UpdateIkePolicy(options) return @@ -1884,10 +1986,14 @@ func GetIpsecPolicy(vpcService *vpcv1.VpcV1, id string) (ipsecPolicy *vpcv1.IPse // /ipsec_policies/{id} // Update an IPsec policy func UpdateIpsecPolicy(vpcService *vpcv1.VpcV1, id string) (ipsecPolicy *vpcv1.IPsecPolicy, response *core.DetailedResponse, err error) { + body := &vpcv1.IPsecPolicyPatch{ + EncryptionAlgorithm: core.StringPtr("3des"), + } + patchBody, _ := body.AsPatch() options := &vpcv1.UpdateIpsecPolicyOptions{ - ID: &id, + ID: &id, + IPsecPolicyPatch: patchBody, } - options.SetEncryptionAlgorithm("3des") ipsecPolicy, response, err = vpcService.UpdateIpsecPolicy(options) return } @@ -1947,10 +2053,14 @@ func GetVPNGateway(vpcService *vpcv1.VpcV1, id string) (gateway *vpcv1.VPNGatewa // /VPN_gateways/{id} // Update a VPN gateway func UpdateVPNGateway(vpcService *vpcv1.VpcV1, id, name string) (gateway *vpcv1.VPNGateway, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateVPNGatewayOptions{ - ID: &id, + body := &vpcv1.VPNGatewayPatch{ Name: &name, } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateVPNGatewayOptions{ + ID: &id, + VPNGatewayPatch: patchBody, + } gateway, response, err = vpcService.UpdateVPNGateway(options) return } @@ -2008,10 +2118,14 @@ func GetVPNGatewayConnection(vpcService *vpcv1.VpcV1, gatewayID, connID string) // /VPN_gateways/{VPN_gateway_id}/connections/{id} // Update a VPN connection func UpdateVPNGatewayConnection(vpcService *vpcv1.VpcV1, gatewayID, connID, name string) (connection *vpcv1.VPNGatewayConnection, response *core.DetailedResponse, err error) { + body := &vpcv1.VPNGatewayConnectionPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() options := &vpcv1.UpdateVPNGatewayConnectionOptions{ - ID: &connID, - VPNGatewayID: &gatewayID, - Name: &name, + ID: &connID, + VPNGatewayID: &gatewayID, + VPNGatewayConnectionPatch: patchBody, } connection, response, err = vpcService.UpdateVPNGatewayConnection(options) return @@ -2151,9 +2265,14 @@ func DeleteFlowLogCollector(vpcService *vpcv1.VpcV1, id string) (response *core. // /flow_log_collectors/{id} // Update specified flow log collector func UpdateFlowLogCollector(vpcService *vpcv1.VpcV1, id, name string) (flowLog *vpcv1.FlowLogCollector, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateFlowLogCollectorOptions{} - options.SetID(id) - options.SetName(name) + model := &vpcv1.FlowLogCollectorPatch{ + Name: &name, + } + patch, _ := model.AsPatch() + options := &vpcv1.UpdateFlowLogCollectorOptions{ + FlowLogCollectorPatch: patch, + ID: &id, + } flowLog, response, err = vpcService.UpdateFlowLogCollector(options) return } @@ -2238,9 +2357,14 @@ func GetInstanceTemplate(vpcService *vpcv1.VpcV1, id string) (template vpcv1.Ins // /instance/templates/{id} // Update specified instance template func UpdateInstanceTemplate(vpcService *vpcv1.VpcV1, id, name string) (template vpcv1.InstanceTemplateIntf, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceTemplateOptions{} + body := &vpcv1.InstanceTemplatePatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceTemplateOptions{ + InstanceTemplatePatch: patchBody, + } options.SetID(id) - options.SetName(name) template, response, err = vpcService.UpdateInstanceTemplate(options) return } @@ -2300,9 +2424,14 @@ func GetInstanceGroup(vpcService *vpcv1.VpcV1, id string) (ig *vpcv1.InstanceGro // /instance_groups/{id} // Update specified instance group func UpdateInstanceGroup(vpcService *vpcv1.VpcV1, id, name string) (template *vpcv1.InstanceGroup, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceGroupOptions{} + body := &vpcv1.InstanceGroupPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceGroupOptions{ + InstanceGroupPatch: patchBody, + } options.SetID(id) - options.SetName(name) template, response, err = vpcService.UpdateInstanceGroup(options) return } @@ -2372,10 +2501,15 @@ func GetInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (man // /instance_groups/{instance_group_id}/managers/{id} // Update specified instance group manager func UpdateInstanceGroupManager(vpcService *vpcv1.VpcV1, gID, id, name string) (manager *vpcv1.InstanceGroupManager, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceGroupManagerOptions{} + body := &vpcv1.InstanceGroupManagerPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceGroupManagerOptions{ + InstanceGroupManagerPatch: patchBody, + } options.SetInstanceGroupID(gID) options.SetID(id) - options.SetCooldown(300) manager, response, err = vpcService.UpdateInstanceGroupManager(options) return } @@ -2440,11 +2574,17 @@ func GetInstanceGroupManagerPolicy(vpcService *vpcv1.VpcV1, gID, mID, id string) // /instance_groups/{instance_group_id}/managers/{instance_group_manager_id}/policies/{id} // Update specified instance group manager policy func UpdateInstanceGroupManagerPolicy(vpcService *vpcv1.VpcV1, igID, mID, id, name string) (template vpcv1.InstanceGroupManagerPolicyIntf, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceGroupManagerPolicyOptions{} + body := &vpcv1.InstanceGroupManagerPolicyPatch{ + MetricType: core.StringPtr("cpu"), + MetricValue: core.Int64Ptr(80), + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceGroupManagerPolicyOptions{ + InstanceGroupManagerPolicyPatch: patchBody, + } options.SetID(id) options.SetInstanceGroupID(igID) options.SetInstanceGroupManagerID(mID) - options.SetName(name) template, response, err = vpcService.UpdateInstanceGroupManagerPolicy(options) return } @@ -2495,12 +2635,17 @@ func GetInstanceGroupMembership(vpcService *vpcv1.VpcV1, igID, id string) (membe // PATCH // /instance_groups/{instance_group_id}/memberships/{id} // Update specified instance group membership -func UpdateInstanceGroupMembership(vpcService *vpcv1.VpcV1, igID, id, name string) (template *vpcv1.InstanceGroupMembership, response *core.DetailedResponse, err error) { - options := &vpcv1.UpdateInstanceGroupMembershipOptions{} +func UpdateInstanceGroupMembership(vpcService *vpcv1.VpcV1, igID, id, name string) (membership *vpcv1.InstanceGroupMembership, response *core.DetailedResponse, err error) { + body := &vpcv1.InstanceGroupMembershipPatch{ + Name: &name, + } + patchBody, _ := body.AsPatch() + options := &vpcv1.UpdateInstanceGroupMembershipOptions{ + InstanceGroupMembershipPatch: patchBody, + } options.SetID(id) - options.SetName(name) options.SetInstanceGroupID(igID) - template, response, err = vpcService.UpdateInstanceGroupMembership(options) + membership, response, err = vpcService.UpdateInstanceGroupMembership(options) return } diff --git a/vpcv1/vpc_v1_test.go b/vpcv1/vpc_v1_test.go index 06c6742..3812818 100644 --- a/vpcv1/vpc_v1_test.go +++ b/vpcv1/vpc_v1_test.go @@ -159,7 +159,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVpcsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVpcsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -215,7 +215,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVpcsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVpcsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -302,7 +302,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -354,7 +354,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -442,7 +442,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPCPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -516,7 +516,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -561,7 +561,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -641,7 +641,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -661,10 +661,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VPCPatch model + vpcPatchModel := new(vpcv1.VPCPatch) + vpcPatchModel.Name = core.StringPtr("my-vpc") + vpcPatchModelAsPatch, asPatchErr := vpcPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCOptions model updateVPCOptionsModel := new(vpcv1.UpdateVPCOptions) updateVPCOptionsModel.ID = core.StringPtr("testString") - updateVPCOptionsModel.Name = core.StringPtr("my-vpc") + updateVPCOptionsModel.VPCPatch = vpcPatchModelAsPatch updateVPCOptionsModel.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 := vpcService.UpdateVPC(updateVPCOptionsModel) @@ -687,7 +693,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -713,10 +719,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VPCPatch model + vpcPatchModel := new(vpcv1.VPCPatch) + vpcPatchModel.Name = core.StringPtr("my-vpc") + vpcPatchModelAsPatch, asPatchErr := vpcPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCOptions model updateVPCOptionsModel := new(vpcv1.UpdateVPCOptions) updateVPCOptionsModel.ID = core.StringPtr("testString") - updateVPCOptionsModel.Name = core.StringPtr("my-vpc") + updateVPCOptionsModel.VPCPatch = vpcPatchModelAsPatch updateVPCOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -734,10 +746,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VPCPatch model + vpcPatchModel := new(vpcv1.VPCPatch) + vpcPatchModel.Name = core.StringPtr("my-vpc") + vpcPatchModelAsPatch, asPatchErr := vpcPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCOptions model updateVPCOptionsModel := new(vpcv1.UpdateVPCOptions) updateVPCOptionsModel.ID = core.StringPtr("testString") - updateVPCOptionsModel.Name = core.StringPtr("my-vpc") + updateVPCOptionsModel.VPCPatch = vpcPatchModelAsPatch updateVPCOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -769,7 +787,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCDefaultNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -814,7 +832,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCDefaultNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -894,7 +912,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCDefaultSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -939,7 +957,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCDefaultSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCDefaultSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1019,7 +1037,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCAddressPrefixesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCAddressPrefixesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1070,7 +1088,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCAddressPrefixesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCAddressPrefixesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1158,7 +1176,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCAddressPrefixPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1211,7 +1229,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCAddressPrefixPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1308,7 +1326,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPCAddressPrefixPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1384,7 +1402,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCAddressPrefixPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1430,7 +1448,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCAddressPrefixPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1512,7 +1530,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCAddressPrefixPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1532,12 +1550,18 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the AddressPrefixPatch model + addressPrefixPatchModel := new(vpcv1.AddressPrefixPatch) + addressPrefixPatchModel.Name = core.StringPtr("my-address-prefix-2") + addressPrefixPatchModel.IsDefault = core.BoolPtr(false) + addressPrefixPatchModelAsPatch, asPatchErr := addressPrefixPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCAddressPrefixOptions model updateVPCAddressPrefixOptionsModel := new(vpcv1.UpdateVPCAddressPrefixOptions) updateVPCAddressPrefixOptionsModel.VPCID = core.StringPtr("testString") updateVPCAddressPrefixOptionsModel.ID = core.StringPtr("testString") - updateVPCAddressPrefixOptionsModel.Name = core.StringPtr("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.IsDefault = core.BoolPtr(false) + updateVPCAddressPrefixOptionsModel.AddressPrefixPatch = addressPrefixPatchModelAsPatch updateVPCAddressPrefixOptionsModel.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 := vpcService.UpdateVPCAddressPrefix(updateVPCAddressPrefixOptionsModel) @@ -1560,7 +1584,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCAddressPrefixPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCAddressPrefixPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1586,12 +1610,18 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the AddressPrefixPatch model + addressPrefixPatchModel := new(vpcv1.AddressPrefixPatch) + addressPrefixPatchModel.Name = core.StringPtr("my-address-prefix-2") + addressPrefixPatchModel.IsDefault = core.BoolPtr(false) + addressPrefixPatchModelAsPatch, asPatchErr := addressPrefixPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCAddressPrefixOptions model updateVPCAddressPrefixOptionsModel := new(vpcv1.UpdateVPCAddressPrefixOptions) updateVPCAddressPrefixOptionsModel.VPCID = core.StringPtr("testString") updateVPCAddressPrefixOptionsModel.ID = core.StringPtr("testString") - updateVPCAddressPrefixOptionsModel.Name = core.StringPtr("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.IsDefault = core.BoolPtr(false) + updateVPCAddressPrefixOptionsModel.AddressPrefixPatch = addressPrefixPatchModelAsPatch updateVPCAddressPrefixOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -1609,12 +1639,18 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the AddressPrefixPatch model + addressPrefixPatchModel := new(vpcv1.AddressPrefixPatch) + addressPrefixPatchModel.Name = core.StringPtr("my-address-prefix-2") + addressPrefixPatchModel.IsDefault = core.BoolPtr(false) + addressPrefixPatchModelAsPatch, asPatchErr := addressPrefixPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCAddressPrefixOptions model updateVPCAddressPrefixOptionsModel := new(vpcv1.UpdateVPCAddressPrefixOptions) updateVPCAddressPrefixOptionsModel.VPCID = core.StringPtr("testString") updateVPCAddressPrefixOptionsModel.ID = core.StringPtr("testString") - updateVPCAddressPrefixOptionsModel.Name = core.StringPtr("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.IsDefault = core.BoolPtr(false) + updateVPCAddressPrefixOptionsModel.AddressPrefixPatch = addressPrefixPatchModelAsPatch updateVPCAddressPrefixOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -1646,7 +1682,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCRoutesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1694,7 +1730,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPCRoutesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPCRoutesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1778,7 +1814,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1835,7 +1871,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPCRoutePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -1940,7 +1976,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPCRoutePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2016,7 +2052,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2062,7 +2098,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPCRoutePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2144,7 +2180,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2164,11 +2200,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the RoutePatch model + routePatchModel := new(vpcv1.RoutePatch) + routePatchModel.Name = core.StringPtr("my-route-2") + routePatchModelAsPatch, asPatchErr := routePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCRouteOptions model updateVPCRouteOptionsModel := new(vpcv1.UpdateVPCRouteOptions) updateVPCRouteOptionsModel.VPCID = core.StringPtr("testString") updateVPCRouteOptionsModel.ID = core.StringPtr("testString") - updateVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + updateVPCRouteOptionsModel.RoutePatch = routePatchModelAsPatch updateVPCRouteOptionsModel.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 := vpcService.UpdateVPCRoute(updateVPCRouteOptionsModel) @@ -2191,7 +2233,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPCRoutePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPCRoutePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2217,11 +2259,17 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the RoutePatch model + routePatchModel := new(vpcv1.RoutePatch) + routePatchModel.Name = core.StringPtr("my-route-2") + routePatchModelAsPatch, asPatchErr := routePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCRouteOptions model updateVPCRouteOptionsModel := new(vpcv1.UpdateVPCRouteOptions) updateVPCRouteOptionsModel.VPCID = core.StringPtr("testString") updateVPCRouteOptionsModel.ID = core.StringPtr("testString") - updateVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + updateVPCRouteOptionsModel.RoutePatch = routePatchModelAsPatch updateVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -2239,11 +2287,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the RoutePatch model + routePatchModel := new(vpcv1.RoutePatch) + routePatchModel.Name = core.StringPtr("my-route-2") + routePatchModelAsPatch, asPatchErr := routePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPCRouteOptions model updateVPCRouteOptionsModel := new(vpcv1.UpdateVPCRouteOptions) updateVPCRouteOptionsModel.VPCID = core.StringPtr("testString") updateVPCRouteOptionsModel.ID = core.StringPtr("testString") - updateVPCRouteOptionsModel.Name = core.StringPtr("my-route-2") + updateVPCRouteOptionsModel.RoutePatch = routePatchModelAsPatch updateVPCRouteOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -2390,7 +2444,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSubnetsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSubnetsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2443,7 +2497,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSubnetsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSubnetsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2526,7 +2580,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSubnetPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2602,7 +2656,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSubnetPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2745,7 +2799,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteSubnetPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2819,7 +2873,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2864,7 +2918,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2944,7 +2998,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSubnetPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -2972,12 +3026,18 @@ var _ = Describe(`VpcV1`, func() { publicGatewayIdentityModel := new(vpcv1.PublicGatewayIdentityByID) publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the SubnetPatch model + subnetPatchModel := new(vpcv1.SubnetPatch) + subnetPatchModel.Name = core.StringPtr("my-subnet") + subnetPatchModel.NetworkACL = networkACLIdentityModel + subnetPatchModel.PublicGateway = publicGatewayIdentityModel + subnetPatchModelAsPatch, asPatchErr := subnetPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSubnetOptions model updateSubnetOptionsModel := new(vpcv1.UpdateSubnetOptions) updateSubnetOptionsModel.ID = core.StringPtr("testString") - updateSubnetOptionsModel.Name = core.StringPtr("my-subnet") - updateSubnetOptionsModel.NetworkACL = networkACLIdentityModel - updateSubnetOptionsModel.PublicGateway = publicGatewayIdentityModel + updateSubnetOptionsModel.SubnetPatch = subnetPatchModelAsPatch updateSubnetOptionsModel.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 := vpcService.UpdateSubnet(updateSubnetOptionsModel) @@ -3000,7 +3060,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSubnetPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSubnetPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3034,12 +3094,18 @@ var _ = Describe(`VpcV1`, func() { publicGatewayIdentityModel := new(vpcv1.PublicGatewayIdentityByID) publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the SubnetPatch model + subnetPatchModel := new(vpcv1.SubnetPatch) + subnetPatchModel.Name = core.StringPtr("my-subnet") + subnetPatchModel.NetworkACL = networkACLIdentityModel + subnetPatchModel.PublicGateway = publicGatewayIdentityModel + subnetPatchModelAsPatch, asPatchErr := subnetPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSubnetOptions model updateSubnetOptionsModel := new(vpcv1.UpdateSubnetOptions) updateSubnetOptionsModel.ID = core.StringPtr("testString") - updateSubnetOptionsModel.Name = core.StringPtr("my-subnet") - updateSubnetOptionsModel.NetworkACL = networkACLIdentityModel - updateSubnetOptionsModel.PublicGateway = publicGatewayIdentityModel + updateSubnetOptionsModel.SubnetPatch = subnetPatchModelAsPatch updateSubnetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -3065,12 +3131,18 @@ var _ = Describe(`VpcV1`, func() { publicGatewayIdentityModel := new(vpcv1.PublicGatewayIdentityByID) publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") + // Construct an instance of the SubnetPatch model + subnetPatchModel := new(vpcv1.SubnetPatch) + subnetPatchModel.Name = core.StringPtr("my-subnet") + subnetPatchModel.NetworkACL = networkACLIdentityModel + subnetPatchModel.PublicGateway = publicGatewayIdentityModel + subnetPatchModelAsPatch, asPatchErr := subnetPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSubnetOptions model updateSubnetOptionsModel := new(vpcv1.UpdateSubnetOptions) updateSubnetOptionsModel.ID = core.StringPtr("testString") - updateSubnetOptionsModel.Name = core.StringPtr("my-subnet") - updateSubnetOptionsModel.NetworkACL = networkACLIdentityModel - updateSubnetOptionsModel.PublicGateway = publicGatewayIdentityModel + updateSubnetOptionsModel.SubnetPatch = subnetPatchModelAsPatch updateSubnetOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -3102,7 +3174,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3147,7 +3219,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3227,7 +3299,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceSubnetNetworkACLPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3277,7 +3349,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceSubnetNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceSubnetNetworkACLPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3368,7 +3440,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(unsetSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(unsetSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3442,7 +3514,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3487,7 +3559,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3567,7 +3639,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(setSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(setSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3617,7 +3689,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(setSubnetPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(setSubnetPublicGatewayPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3822,7 +3894,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listImagesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listImagesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3881,7 +3953,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listImagesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listImagesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3899,7 +3971,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "images": [{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/images?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "images": [{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}]}`) })) }) It(`Invoke ListImages successfully`, func() { @@ -3972,7 +4044,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(createImagePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -3992,21 +4064,27 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the EncryptionKeyReference model + encryptionKeyReferenceModel := new(vpcv1.EncryptionKeyReference) + encryptionKeyReferenceModel.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") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) - imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/my-bucket/my-image.qcow2") // Construct an instance of the OperatingSystemIdentityByName model operatingSystemIdentityModel := new(vpcv1.OperatingSystemIdentityByName) - operatingSystemIdentityModel.Name = core.StringPtr("ubuntu-16-amd64") + operatingSystemIdentityModel.Name = core.StringPtr("debian-9-amd64") // Construct an instance of the ImagePrototypeImageByFile model imagePrototypeModel := new(vpcv1.ImagePrototypeImageByFile) imagePrototypeModel.Name = core.StringPtr("my-image") + imagePrototypeModel.EncryptedDataKey = core.StringPtr("testString") + imagePrototypeModel.EncryptionKey = encryptionKeyReferenceModel imagePrototypeModel.ResourceGroup = resourceGroupIdentityModel imagePrototypeModel.File = imageFilePrototypeModel imagePrototypeModel.OperatingSystem = operatingSystemIdentityModel @@ -4036,7 +4114,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(createImagePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4044,7 +4122,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}`) })) }) It(`Invoke CreateImage successfully`, func() { @@ -4062,21 +4140,27 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the EncryptionKeyReference model + encryptionKeyReferenceModel := new(vpcv1.EncryptionKeyReference) + encryptionKeyReferenceModel.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") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) - imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/my-bucket/my-image.qcow2") // Construct an instance of the OperatingSystemIdentityByName model operatingSystemIdentityModel := new(vpcv1.OperatingSystemIdentityByName) - operatingSystemIdentityModel.Name = core.StringPtr("ubuntu-16-amd64") + operatingSystemIdentityModel.Name = core.StringPtr("debian-9-amd64") // Construct an instance of the ImagePrototypeImageByFile model imagePrototypeModel := new(vpcv1.ImagePrototypeImageByFile) imagePrototypeModel.Name = core.StringPtr("my-image") + imagePrototypeModel.EncryptedDataKey = core.StringPtr("testString") + imagePrototypeModel.EncryptionKey = encryptionKeyReferenceModel imagePrototypeModel.ResourceGroup = resourceGroupIdentityModel imagePrototypeModel.File = imageFilePrototypeModel imagePrototypeModel.OperatingSystem = operatingSystemIdentityModel @@ -4101,21 +4185,27 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the EncryptionKeyReference model + encryptionKeyReferenceModel := new(vpcv1.EncryptionKeyReference) + encryptionKeyReferenceModel.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") // Construct an instance of the ImageFilePrototype model imageFilePrototypeModel := new(vpcv1.ImageFilePrototype) - imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/custom-image-vpc-bucket/customImage-0.vhd") + imageFilePrototypeModel.Href = core.StringPtr("cos://us-south/my-bucket/my-image.qcow2") // Construct an instance of the OperatingSystemIdentityByName model operatingSystemIdentityModel := new(vpcv1.OperatingSystemIdentityByName) - operatingSystemIdentityModel.Name = core.StringPtr("ubuntu-16-amd64") + operatingSystemIdentityModel.Name = core.StringPtr("debian-9-amd64") // Construct an instance of the ImagePrototypeImageByFile model imagePrototypeModel := new(vpcv1.ImagePrototypeImageByFile) imagePrototypeModel.Name = core.StringPtr("my-image") + imagePrototypeModel.EncryptedDataKey = core.StringPtr("testString") + imagePrototypeModel.EncryptionKey = encryptionKeyReferenceModel imagePrototypeModel.ResourceGroup = resourceGroupIdentityModel imagePrototypeModel.File = imageFilePrototypeModel imagePrototypeModel.OperatingSystem = operatingSystemIdentityModel @@ -4155,7 +4245,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteImagePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4229,7 +4319,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(getImagePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4274,7 +4364,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(getImagePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4282,7 +4372,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}`) })) }) It(`Invoke GetImage successfully`, func() { @@ -4354,7 +4444,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateImagePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4374,10 +4464,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the ImagePatch model + imagePatchModel := new(vpcv1.ImagePatch) + imagePatchModel.Name = core.StringPtr("my-image") + imagePatchModelAsPatch, asPatchErr := imagePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateImageOptions model updateImageOptionsModel := new(vpcv1.UpdateImageOptions) updateImageOptionsModel.ID = core.StringPtr("testString") - updateImageOptionsModel.Name = core.StringPtr("my-image") + updateImageOptionsModel.ImagePatch = imagePatchModelAsPatch updateImageOptionsModel.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 := vpcService.UpdateImage(updateImageOptionsModel) @@ -4400,7 +4496,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateImagePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateImagePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4408,7 +4504,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}`) + fmt.Fprintf(res, "%s", `{"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "crn": "crn:v1:bluemix:public:is:us-south:a/123456::image:72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "href": "https://us-south.iaas.cloud.ibm.com/v1/images/72b27b5c-f4b0-48bb-b954-5becc7c1dcb8", "name": "my-image", "minimum_provisioned_size": 22, "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "encryption": "user_managed", "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "created_at": "2019-01-01T12:00:00", "file": {"size": 1}, "operating_system": {"name": "ubuntu-16-amd64", "href": "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64", "architecture": "amd64", "display_name": "Ubuntu Server 16.04 LTS amd64", "family": "Ubuntu Server", "vendor": "Canonical", "version": "16.04 LTS"}, "status": "available", "visibility": "private"}`) })) }) It(`Invoke UpdateImage successfully`, func() { @@ -4426,10 +4522,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the ImagePatch model + imagePatchModel := new(vpcv1.ImagePatch) + imagePatchModel.Name = core.StringPtr("my-image") + imagePatchModelAsPatch, asPatchErr := imagePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateImageOptions model updateImageOptionsModel := new(vpcv1.UpdateImageOptions) updateImageOptionsModel.ID = core.StringPtr("testString") - updateImageOptionsModel.Name = core.StringPtr("my-image") + updateImageOptionsModel.ImagePatch = imagePatchModelAsPatch updateImageOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -4447,10 +4549,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the ImagePatch model + imagePatchModel := new(vpcv1.ImagePatch) + imagePatchModel.Name = core.StringPtr("my-image") + imagePatchModelAsPatch, asPatchErr := imagePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateImageOptions model updateImageOptionsModel := new(vpcv1.UpdateImageOptions) updateImageOptionsModel.ID = core.StringPtr("testString") - updateImageOptionsModel.Name = core.StringPtr("my-image") + updateImageOptionsModel.ImagePatch = imagePatchModelAsPatch updateImageOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -4482,7 +4590,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listOperatingSystemsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listOperatingSystemsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4532,7 +4640,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listOperatingSystemsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listOperatingSystemsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4611,7 +4719,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getOperatingSystemPath)) + Expect(req.URL.EscapedPath()).To(Equal(getOperatingSystemPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4656,7 +4764,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getOperatingSystemPath)) + Expect(req.URL.EscapedPath()).To(Equal(getOperatingSystemPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4851,7 +4959,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listKeysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listKeysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4898,7 +5006,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listKeysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listKeysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -4973,7 +5081,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createKeyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5025,7 +5133,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createKeyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5120,7 +5228,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteKeyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5194,7 +5302,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getKeyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5239,7 +5347,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getKeyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5319,7 +5427,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateKeyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5339,10 +5447,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the KeyPatch model + keyPatchModel := new(vpcv1.KeyPatch) + keyPatchModel.Name = core.StringPtr("my-key") + keyPatchModelAsPatch, asPatchErr := keyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateKeyOptions model updateKeyOptionsModel := new(vpcv1.UpdateKeyOptions) updateKeyOptionsModel.ID = core.StringPtr("testString") - updateKeyOptionsModel.Name = core.StringPtr("my-key") + updateKeyOptionsModel.KeyPatch = keyPatchModelAsPatch updateKeyOptionsModel.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 := vpcService.UpdateKey(updateKeyOptionsModel) @@ -5365,7 +5479,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateKeyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateKeyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5391,10 +5505,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the KeyPatch model + keyPatchModel := new(vpcv1.KeyPatch) + keyPatchModel.Name = core.StringPtr("my-key") + keyPatchModelAsPatch, asPatchErr := keyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateKeyOptions model updateKeyOptionsModel := new(vpcv1.UpdateKeyOptions) updateKeyOptionsModel.ID = core.StringPtr("testString") - updateKeyOptionsModel.Name = core.StringPtr("my-key") + updateKeyOptionsModel.KeyPatch = keyPatchModelAsPatch updateKeyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -5412,10 +5532,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the KeyPatch model + keyPatchModel := new(vpcv1.KeyPatch) + keyPatchModel.Name = core.StringPtr("my-key") + keyPatchModelAsPatch, asPatchErr := keyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateKeyOptions model updateKeyOptionsModel := new(vpcv1.UpdateKeyOptions) updateKeyOptionsModel.ID = core.StringPtr("testString") - updateKeyOptionsModel.Name = core.StringPtr("my-key") + updateKeyOptionsModel.KeyPatch = keyPatchModelAsPatch updateKeyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -5562,7 +5688,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5606,7 +5732,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5677,7 +5803,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5722,7 +5848,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5802,7 +5928,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceTemplatesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceTemplatesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5846,7 +5972,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceTemplatesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceTemplatesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5854,7 +5980,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "templates": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}]}`) + fmt.Fprintf(res, "%s", `{"first": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?limit=20"}, "limit": 20, "next": {"href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates?start=9d5a91a3e2cbd233b5a5b33436855ed1&limit=20"}, "total_count": 132, "templates": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}]}`) })) }) It(`Invoke ListInstanceTemplates successfully`, func() { @@ -5917,7 +6043,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceTemplatePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -5937,9 +6063,9 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) @@ -5958,7 +6084,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeInstanceContextVolumeModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID) @@ -5966,8 +6092,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -6000,8 +6126,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -6048,7 +6174,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceTemplatePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6056,7 +6182,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}`) + fmt.Fprintf(res, "%s", `{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}`) })) }) It(`Invoke CreateInstanceTemplate successfully`, func() { @@ -6074,9 +6200,9 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) @@ -6095,7 +6221,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeInstanceContextVolumeModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID) @@ -6103,8 +6229,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -6137,8 +6263,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -6180,9 +6306,9 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:yxavE4CIOL2NlsqcurRO3xGjkP6m/0mp8ugojH5yxlY") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) @@ -6201,7 +6327,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeInstanceContextVolumeModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID) @@ -6209,8 +6335,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -6243,8 +6369,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -6301,7 +6427,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceTemplatePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6375,7 +6501,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceTemplatePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6420,7 +6546,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceTemplatePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6428,7 +6554,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}`) + fmt.Fprintf(res, "%s", `{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}`) })) }) It(`Invoke GetInstanceTemplate successfully`, func() { @@ -6500,7 +6626,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceTemplatePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6520,10 +6646,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceTemplatePatch model + instanceTemplatePatchModel := new(vpcv1.InstanceTemplatePatch) + instanceTemplatePatchModel.Name = core.StringPtr("my-instance-template") + instanceTemplatePatchModelAsPatch, asPatchErr := instanceTemplatePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceTemplateOptions model updateInstanceTemplateOptionsModel := new(vpcv1.UpdateInstanceTemplateOptions) updateInstanceTemplateOptionsModel.ID = core.StringPtr("testString") - updateInstanceTemplateOptionsModel.Name = core.StringPtr("my-instance-template") + updateInstanceTemplateOptionsModel.InstanceTemplatePatch = instanceTemplatePatchModelAsPatch updateInstanceTemplateOptionsModel.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 := vpcService.UpdateInstanceTemplate(updateInstanceTemplateOptionsModel) @@ -6546,7 +6678,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceTemplatePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceTemplatePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6554,7 +6686,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}`) + fmt.Fprintf(res, "%s", `{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803", "href": "https://us-south.iaas.cloud.ibm.com/v1/instance/templates/1e09281b-f177-46fb-baf1-bc152b2e391a", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::instance-template:1e09281b-f177-46fb-baf1-bc152b2e391a", "name": "my-instance-template", "keys": [{"id": "a6b1a881-2ce8-41a3-80fc-36316a73f803"}], "network_interfaces": [{"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}], "profile": {"name": "bc1-4x16"}, "user_data": "UserData", "volume_attachments": [{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5"}}], "vpc": {"id": "4727d842-f94f-4a2d-824a-9bc9b02c523b"}, "created_at": "2019-01-01T12:00:00", "resource_group": {"id": "fee82deba12e4c0fb69c3b09d1f12345", "name": "my-resource-group", "href": "https://resource-controller.cloud.ibm.com/v2/resource_groups/fee82deba12e4c0fb69c3b09d1f12345"}, "primary_network_interface": {"name": "my-network-interface", "primary_ipv4_address": "10.0.0.5", "security_groups": [{"id": "be5df5ca-12a0-494b-907e-aa6ec2bfa271"}], "subnet": {"id": "7ec86020-1c6e-4889-b3f0-a15f2e50f87e"}}, "zone": {"name": "us-south-1"}, "boot_volume_attachment": {"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "volume": {"name": "my-volume", "profile": {"name": "general-purpose"}, "encryption_key": {"crn": "crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179"}, "capacity": 100, "iops": 10000}}, "image": {"id": "72b27b5c-f4b0-48bb-b954-5becc7c1dcb8"}}`) })) }) It(`Invoke UpdateInstanceTemplate successfully`, func() { @@ -6572,10 +6704,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the InstanceTemplatePatch model + instanceTemplatePatchModel := new(vpcv1.InstanceTemplatePatch) + instanceTemplatePatchModel.Name = core.StringPtr("my-instance-template") + instanceTemplatePatchModelAsPatch, asPatchErr := instanceTemplatePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceTemplateOptions model updateInstanceTemplateOptionsModel := new(vpcv1.UpdateInstanceTemplateOptions) updateInstanceTemplateOptionsModel.ID = core.StringPtr("testString") - updateInstanceTemplateOptionsModel.Name = core.StringPtr("my-instance-template") + updateInstanceTemplateOptionsModel.InstanceTemplatePatch = instanceTemplatePatchModelAsPatch updateInstanceTemplateOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -6593,10 +6731,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceTemplatePatch model + instanceTemplatePatchModel := new(vpcv1.InstanceTemplatePatch) + instanceTemplatePatchModel.Name = core.StringPtr("my-instance-template") + instanceTemplatePatchModelAsPatch, asPatchErr := instanceTemplatePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceTemplateOptions model updateInstanceTemplateOptionsModel := new(vpcv1.UpdateInstanceTemplateOptions) updateInstanceTemplateOptionsModel.ID = core.StringPtr("testString") - updateInstanceTemplateOptionsModel.Name = core.StringPtr("my-instance-template") + updateInstanceTemplateOptionsModel.InstanceTemplatePatch = instanceTemplatePatchModelAsPatch updateInstanceTemplateOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -6628,7 +6772,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstancesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstancesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6693,7 +6837,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstancesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstancesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6792,7 +6936,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstancePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6812,9 +6956,9 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) @@ -6833,7 +6977,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeInstanceContextVolumeModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID) @@ -6841,8 +6985,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -6875,8 +7019,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -6923,7 +7067,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstancePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -6949,9 +7093,9 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) @@ -6970,7 +7114,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeInstanceContextVolumeModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID) @@ -6978,8 +7122,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -7012,8 +7156,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -7055,9 +7199,9 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) - // Construct an instance of the KeyIdentityByID model - keyIdentityModel := new(vpcv1.KeyIdentityByID) - keyIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") + // Construct an instance of the KeyIdentityKeyIdentityByFingerprint model + keyIdentityModel := new(vpcv1.KeyIdentityKeyIdentityByFingerprint) + keyIdentityModel.Fingerprint = core.StringPtr("SHA256:RJ+YWs2kupwFGiJuLqY85twmcdLOUcjIc9cA6IR8n8E") // Construct an instance of the SecurityGroupIdentityByID model securityGroupIdentityModel := new(vpcv1.SecurityGroupIdentityByID) @@ -7076,7 +7220,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the InstanceProfileIdentityByName model instanceProfileIdentityModel := new(vpcv1.InstanceProfileIdentityByName) - instanceProfileIdentityModel.Name = core.StringPtr("cc1-16x32") + instanceProfileIdentityModel.Name = core.StringPtr("gc.balanced.4x16") // Construct an instance of the VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID model volumeAttachmentPrototypeInstanceContextVolumeModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContextVolumeVolumeIdentityVolumeIdentityByID) @@ -7084,8 +7228,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel // Construct an instance of the VPCIdentityByID model @@ -7118,8 +7262,8 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel // Construct an instance of the ImageIdentityByID model @@ -7176,7 +7320,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstancePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7250,7 +7394,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstancePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7295,7 +7439,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstancePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7375,7 +7519,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstancePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7395,10 +7539,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstancePatch model + instancePatchModel := new(vpcv1.InstancePatch) + instancePatchModel.Name = core.StringPtr("my-instance") + instancePatchModelAsPatch, asPatchErr := instancePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceOptions model updateInstanceOptionsModel := new(vpcv1.UpdateInstanceOptions) updateInstanceOptionsModel.ID = core.StringPtr("testString") - updateInstanceOptionsModel.Name = core.StringPtr("my-instance") + updateInstanceOptionsModel.InstancePatch = instancePatchModelAsPatch updateInstanceOptionsModel.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 := vpcService.UpdateInstance(updateInstanceOptionsModel) @@ -7421,7 +7571,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstancePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstancePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7447,10 +7597,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the InstancePatch model + instancePatchModel := new(vpcv1.InstancePatch) + instancePatchModel.Name = core.StringPtr("my-instance") + instancePatchModelAsPatch, asPatchErr := instancePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceOptions model updateInstanceOptionsModel := new(vpcv1.UpdateInstanceOptions) updateInstanceOptionsModel.ID = core.StringPtr("testString") - updateInstanceOptionsModel.Name = core.StringPtr("my-instance") + updateInstanceOptionsModel.InstancePatch = instancePatchModelAsPatch updateInstanceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -7468,10 +7624,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstancePatch model + instancePatchModel := new(vpcv1.InstancePatch) + instancePatchModel.Name = core.StringPtr("my-instance") + instancePatchModelAsPatch, asPatchErr := instancePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceOptions model updateInstanceOptionsModel := new(vpcv1.UpdateInstanceOptions) updateInstanceOptionsModel.ID = core.StringPtr("testString") - updateInstanceOptionsModel.Name = core.StringPtr("my-instance") + updateInstanceOptionsModel.InstancePatch = instancePatchModelAsPatch updateInstanceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -7503,7 +7665,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceInitializationPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceInitializationPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7548,7 +7710,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceInitializationPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceInitializationPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7628,7 +7790,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceActionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceActionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7675,7 +7837,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceActionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceActionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7759,7 +7921,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7804,7 +7966,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7884,7 +8046,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -7941,7 +8103,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8046,7 +8208,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8122,7 +8284,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8168,7 +8330,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8250,7 +8412,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8270,11 +8432,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the NetworkInterfacePatch model + networkInterfacePatchModel := new(vpcv1.NetworkInterfacePatch) + networkInterfacePatchModel.Name = core.StringPtr("my-network-interface") + networkInterfacePatchModelAsPatch, asPatchErr := networkInterfacePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceNetworkInterfaceOptions model updateInstanceNetworkInterfaceOptionsModel := new(vpcv1.UpdateInstanceNetworkInterfaceOptions) updateInstanceNetworkInterfaceOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceNetworkInterfaceOptionsModel.ID = core.StringPtr("testString") - updateInstanceNetworkInterfaceOptionsModel.Name = core.StringPtr("my-network-interface") + updateInstanceNetworkInterfaceOptionsModel.NetworkInterfacePatch = networkInterfacePatchModelAsPatch updateInstanceNetworkInterfaceOptionsModel.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 := vpcService.UpdateInstanceNetworkInterface(updateInstanceNetworkInterfaceOptionsModel) @@ -8297,7 +8465,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceNetworkInterfacePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8323,11 +8491,17 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the NetworkInterfacePatch model + networkInterfacePatchModel := new(vpcv1.NetworkInterfacePatch) + networkInterfacePatchModel.Name = core.StringPtr("my-network-interface") + networkInterfacePatchModelAsPatch, asPatchErr := networkInterfacePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceNetworkInterfaceOptions model updateInstanceNetworkInterfaceOptionsModel := new(vpcv1.UpdateInstanceNetworkInterfaceOptions) updateInstanceNetworkInterfaceOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceNetworkInterfaceOptionsModel.ID = core.StringPtr("testString") - updateInstanceNetworkInterfaceOptionsModel.Name = core.StringPtr("my-network-interface") + updateInstanceNetworkInterfaceOptionsModel.NetworkInterfacePatch = networkInterfacePatchModelAsPatch updateInstanceNetworkInterfaceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -8345,11 +8519,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the NetworkInterfacePatch model + networkInterfacePatchModel := new(vpcv1.NetworkInterfacePatch) + networkInterfacePatchModel.Name = core.StringPtr("my-network-interface") + networkInterfacePatchModelAsPatch, asPatchErr := networkInterfacePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceNetworkInterfaceOptions model updateInstanceNetworkInterfaceOptionsModel := new(vpcv1.UpdateInstanceNetworkInterfaceOptions) updateInstanceNetworkInterfaceOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceNetworkInterfaceOptionsModel.ID = core.StringPtr("testString") - updateInstanceNetworkInterfaceOptionsModel.Name = core.StringPtr("my-network-interface") + updateInstanceNetworkInterfaceOptionsModel.NetworkInterfacePatch = networkInterfacePatchModelAsPatch updateInstanceNetworkInterfaceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -8381,7 +8561,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8427,7 +8607,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceNetworkInterfaceFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8510,7 +8690,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(removeInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8588,7 +8768,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8635,7 +8815,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8719,7 +8899,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8766,7 +8946,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(addInstanceNetworkInterfaceFloatingIPPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8850,7 +9030,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceVolumeAttachmentsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceVolumeAttachmentsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8895,7 +9075,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceVolumeAttachmentsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceVolumeAttachmentsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -8903,7 +9083,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"volume_attachments": [{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}]}`) + fmt.Fprintf(res, "%s", `{"volume_attachments": [{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}]}`) })) }) It(`Invoke ListInstanceVolumeAttachments successfully`, func() { @@ -8975,7 +9155,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9003,8 +9183,8 @@ var _ = Describe(`VpcV1`, func() { createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) createInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") createInstanceVolumeAttachmentOptionsModel.Volume = volumeIdentityModel - createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.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 := vpcService.CreateInstanceVolumeAttachment(createInstanceVolumeAttachmentOptionsModel) @@ -9027,7 +9207,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9035,7 +9215,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) + fmt.Fprintf(res, "%s", `{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) })) }) It(`Invoke CreateInstanceVolumeAttachment successfully`, func() { @@ -9061,8 +9241,8 @@ var _ = Describe(`VpcV1`, func() { createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) createInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") createInstanceVolumeAttachmentOptionsModel.Volume = volumeIdentityModel - createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -9088,8 +9268,8 @@ var _ = Describe(`VpcV1`, func() { createInstanceVolumeAttachmentOptionsModel := new(vpcv1.CreateInstanceVolumeAttachmentOptions) createInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") createInstanceVolumeAttachmentOptionsModel.Volume = volumeIdentityModel - createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + createInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -9122,7 +9302,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9198,7 +9378,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9244,7 +9424,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9252,7 +9432,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) + fmt.Fprintf(res, "%s", `{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) })) }) It(`Invoke GetInstanceVolumeAttachment successfully`, func() { @@ -9326,7 +9506,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9346,12 +9526,18 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VolumeAttachmentPatch model + volumeAttachmentPatchModel := new(vpcv1.VolumeAttachmentPatch) + volumeAttachmentPatchModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPatchModel.Name = core.StringPtr("my-volume-attachment") + volumeAttachmentPatchModelAsPatch, asPatchErr := volumeAttachmentPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model updateInstanceVolumeAttachmentOptionsModel := new(vpcv1.UpdateInstanceVolumeAttachmentOptions) updateInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceVolumeAttachmentOptionsModel.ID = core.StringPtr("testString") - updateInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch = volumeAttachmentPatchModelAsPatch updateInstanceVolumeAttachmentOptionsModel.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 := vpcService.UpdateInstanceVolumeAttachment(updateInstanceVolumeAttachmentOptionsModel) @@ -9374,7 +9560,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceVolumeAttachmentPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceVolumeAttachmentPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9382,7 +9568,7 @@ var _ = Describe(`VpcV1`, func() { res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"name": "my-volume-attachment", "delete_volume_on_instance_delete": true, "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) + fmt.Fprintf(res, "%s", `{"delete_volume_on_instance_delete": true, "name": "my-volume-attachment", "id": "82cbf856-9cbb-45fb-b62f-d7bcef32399a", "href": "https://us-south.iaas.cloud.ibm.com/v1/instances/1e09281b-f177-46fb-baf1-bc152b2e391a/volume_attachments/82cbf856-9cbb-45fb-b62f-d7bcef32399a", "device": {"id": "80b3e36e-41f4-40e9-bd56-beae81792a68"}, "volume": {"id": "1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "crn": "crn:v1:bluemix:public:is:us-south-1:a/123456::volume:1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "href": "https://us-south.iaas.cloud.ibm.com/v1/volumes/1a6b7274-678d-4dfb-8981-c71dd9d4daa5", "name": "my-volume"}, "created_at": "2019-01-01T12:00:00", "status": "attached", "type": "boot"}`) })) }) It(`Invoke UpdateInstanceVolumeAttachment successfully`, func() { @@ -9400,12 +9586,18 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VolumeAttachmentPatch model + volumeAttachmentPatchModel := new(vpcv1.VolumeAttachmentPatch) + volumeAttachmentPatchModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPatchModel.Name = core.StringPtr("my-volume-attachment") + volumeAttachmentPatchModelAsPatch, asPatchErr := volumeAttachmentPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model updateInstanceVolumeAttachmentOptionsModel := new(vpcv1.UpdateInstanceVolumeAttachmentOptions) updateInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceVolumeAttachmentOptionsModel.ID = core.StringPtr("testString") - updateInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch = volumeAttachmentPatchModelAsPatch updateInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -9423,12 +9615,18 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VolumeAttachmentPatch model + volumeAttachmentPatchModel := new(vpcv1.VolumeAttachmentPatch) + volumeAttachmentPatchModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPatchModel.Name = core.StringPtr("my-volume-attachment") + volumeAttachmentPatchModelAsPatch, asPatchErr := volumeAttachmentPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model updateInstanceVolumeAttachmentOptionsModel := new(vpcv1.UpdateInstanceVolumeAttachmentOptions) updateInstanceVolumeAttachmentOptionsModel.InstanceID = core.StringPtr("testString") updateInstanceVolumeAttachmentOptionsModel.ID = core.StringPtr("testString") - updateInstanceVolumeAttachmentOptionsModel.Name = core.StringPtr("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch = volumeAttachmentPatchModelAsPatch updateInstanceVolumeAttachmentOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -9575,7 +9773,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9625,7 +9823,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9704,7 +9902,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9776,7 +9974,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9911,7 +10109,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceGroupPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -9985,7 +10183,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10030,7 +10228,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10110,7 +10308,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10146,16 +10344,22 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the InstanceGroupPatch model + instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) + instanceGroupPatchModel.Name = core.StringPtr("my-instance-group") + instanceGroupPatchModel.MembershipCount = core.Int64Ptr(int64(10)) + instanceGroupPatchModel.InstanceTemplate = instanceTemplateIdentityModel + instanceGroupPatchModel.Subnets = []vpcv1.SubnetIdentityIntf{subnetIdentityModel} + instanceGroupPatchModel.ApplicationPort = core.Int64Ptr(int64(22)) + instanceGroupPatchModel.LoadBalancer = loadBalancerIdentityModel + instanceGroupPatchModel.LoadBalancerPool = loadBalancerPoolIdentityModel + instanceGroupPatchModelAsPatch, asPatchErr := instanceGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupOptions model updateInstanceGroupOptionsModel := new(vpcv1.UpdateInstanceGroupOptions) updateInstanceGroupOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupOptionsModel.Name = core.StringPtr("my-instance-group") - updateInstanceGroupOptionsModel.MembershipCount = core.Int64Ptr(int64(10)) - updateInstanceGroupOptionsModel.InstanceTemplate = instanceTemplateIdentityModel - updateInstanceGroupOptionsModel.Subnets = []vpcv1.SubnetIdentityIntf{subnetIdentityModel} - updateInstanceGroupOptionsModel.ApplicationPort = core.Int64Ptr(int64(22)) - updateInstanceGroupOptionsModel.LoadBalancer = loadBalancerIdentityModel - updateInstanceGroupOptionsModel.LoadBalancerPool = loadBalancerPoolIdentityModel + updateInstanceGroupOptionsModel.InstanceGroupPatch = instanceGroupPatchModelAsPatch updateInstanceGroupOptionsModel.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 := vpcService.UpdateInstanceGroup(updateInstanceGroupOptionsModel) @@ -10178,7 +10382,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10220,16 +10424,22 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the InstanceGroupPatch model + instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) + instanceGroupPatchModel.Name = core.StringPtr("my-instance-group") + instanceGroupPatchModel.MembershipCount = core.Int64Ptr(int64(10)) + instanceGroupPatchModel.InstanceTemplate = instanceTemplateIdentityModel + instanceGroupPatchModel.Subnets = []vpcv1.SubnetIdentityIntf{subnetIdentityModel} + instanceGroupPatchModel.ApplicationPort = core.Int64Ptr(int64(22)) + instanceGroupPatchModel.LoadBalancer = loadBalancerIdentityModel + instanceGroupPatchModel.LoadBalancerPool = loadBalancerPoolIdentityModel + instanceGroupPatchModelAsPatch, asPatchErr := instanceGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupOptions model updateInstanceGroupOptionsModel := new(vpcv1.UpdateInstanceGroupOptions) updateInstanceGroupOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupOptionsModel.Name = core.StringPtr("my-instance-group") - updateInstanceGroupOptionsModel.MembershipCount = core.Int64Ptr(int64(10)) - updateInstanceGroupOptionsModel.InstanceTemplate = instanceTemplateIdentityModel - updateInstanceGroupOptionsModel.Subnets = []vpcv1.SubnetIdentityIntf{subnetIdentityModel} - updateInstanceGroupOptionsModel.ApplicationPort = core.Int64Ptr(int64(22)) - updateInstanceGroupOptionsModel.LoadBalancer = loadBalancerIdentityModel - updateInstanceGroupOptionsModel.LoadBalancerPool = loadBalancerPoolIdentityModel + updateInstanceGroupOptionsModel.InstanceGroupPatch = instanceGroupPatchModelAsPatch updateInstanceGroupOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -10263,16 +10473,22 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the InstanceGroupPatch model + instanceGroupPatchModel := new(vpcv1.InstanceGroupPatch) + instanceGroupPatchModel.Name = core.StringPtr("my-instance-group") + instanceGroupPatchModel.MembershipCount = core.Int64Ptr(int64(10)) + instanceGroupPatchModel.InstanceTemplate = instanceTemplateIdentityModel + instanceGroupPatchModel.Subnets = []vpcv1.SubnetIdentityIntf{subnetIdentityModel} + instanceGroupPatchModel.ApplicationPort = core.Int64Ptr(int64(22)) + instanceGroupPatchModel.LoadBalancer = loadBalancerIdentityModel + instanceGroupPatchModel.LoadBalancerPool = loadBalancerPoolIdentityModel + instanceGroupPatchModelAsPatch, asPatchErr := instanceGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupOptions model updateInstanceGroupOptionsModel := new(vpcv1.UpdateInstanceGroupOptions) updateInstanceGroupOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupOptionsModel.Name = core.StringPtr("my-instance-group") - updateInstanceGroupOptionsModel.MembershipCount = core.Int64Ptr(int64(10)) - updateInstanceGroupOptionsModel.InstanceTemplate = instanceTemplateIdentityModel - updateInstanceGroupOptionsModel.Subnets = []vpcv1.SubnetIdentityIntf{subnetIdentityModel} - updateInstanceGroupOptionsModel.ApplicationPort = core.Int64Ptr(int64(22)) - updateInstanceGroupOptionsModel.LoadBalancer = loadBalancerIdentityModel - updateInstanceGroupOptionsModel.LoadBalancerPool = loadBalancerPoolIdentityModel + updateInstanceGroupOptionsModel.InstanceGroupPatch = instanceGroupPatchModelAsPatch updateInstanceGroupOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -10305,7 +10521,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceGroupLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceGroupLoadBalancerPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10379,7 +10595,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupManagersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupManagersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10424,7 +10640,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupManagersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupManagersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10504,7 +10720,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupManagerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10560,7 +10776,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupManagerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10663,7 +10879,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceGroupManagerPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10739,7 +10955,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupManagerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10785,7 +11001,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupManagerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10867,7 +11083,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupManagerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10887,16 +11103,22 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceGroupManagerPatch model + instanceGroupManagerPatchModel := new(vpcv1.InstanceGroupManagerPatch) + instanceGroupManagerPatchModel.Name = core.StringPtr("my-instance-group-manager") + instanceGroupManagerPatchModel.ManagementEnabled = core.BoolPtr(true) + instanceGroupManagerPatchModel.AggregationWindow = core.Int64Ptr(int64(120)) + instanceGroupManagerPatchModel.Cooldown = core.Int64Ptr(int64(210)) + instanceGroupManagerPatchModel.MaxMembershipCount = core.Int64Ptr(int64(10)) + instanceGroupManagerPatchModel.MinMembershipCount = core.Int64Ptr(int64(10)) + instanceGroupManagerPatchModelAsPatch, asPatchErr := instanceGroupManagerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupManagerOptions model updateInstanceGroupManagerOptionsModel := new(vpcv1.UpdateInstanceGroupManagerOptions) updateInstanceGroupManagerOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupManagerOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupManagerOptionsModel.Name = core.StringPtr("my-instance-group-manager") - updateInstanceGroupManagerOptionsModel.ManagementEnabled = core.BoolPtr(true) - updateInstanceGroupManagerOptionsModel.AggregationWindow = core.Int64Ptr(int64(120)) - updateInstanceGroupManagerOptionsModel.Cooldown = core.Int64Ptr(int64(210)) - updateInstanceGroupManagerOptionsModel.MaxMembershipCount = core.Int64Ptr(int64(10)) - updateInstanceGroupManagerOptionsModel.MinMembershipCount = core.Int64Ptr(int64(10)) + updateInstanceGroupManagerOptionsModel.InstanceGroupManagerPatch = instanceGroupManagerPatchModelAsPatch updateInstanceGroupManagerOptionsModel.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 := vpcService.UpdateInstanceGroupManager(updateInstanceGroupManagerOptionsModel) @@ -10919,7 +11141,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupManagerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupManagerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -10945,16 +11167,22 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the InstanceGroupManagerPatch model + instanceGroupManagerPatchModel := new(vpcv1.InstanceGroupManagerPatch) + instanceGroupManagerPatchModel.Name = core.StringPtr("my-instance-group-manager") + instanceGroupManagerPatchModel.ManagementEnabled = core.BoolPtr(true) + instanceGroupManagerPatchModel.AggregationWindow = core.Int64Ptr(int64(120)) + instanceGroupManagerPatchModel.Cooldown = core.Int64Ptr(int64(210)) + instanceGroupManagerPatchModel.MaxMembershipCount = core.Int64Ptr(int64(10)) + instanceGroupManagerPatchModel.MinMembershipCount = core.Int64Ptr(int64(10)) + instanceGroupManagerPatchModelAsPatch, asPatchErr := instanceGroupManagerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupManagerOptions model updateInstanceGroupManagerOptionsModel := new(vpcv1.UpdateInstanceGroupManagerOptions) updateInstanceGroupManagerOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupManagerOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupManagerOptionsModel.Name = core.StringPtr("my-instance-group-manager") - updateInstanceGroupManagerOptionsModel.ManagementEnabled = core.BoolPtr(true) - updateInstanceGroupManagerOptionsModel.AggregationWindow = core.Int64Ptr(int64(120)) - updateInstanceGroupManagerOptionsModel.Cooldown = core.Int64Ptr(int64(210)) - updateInstanceGroupManagerOptionsModel.MaxMembershipCount = core.Int64Ptr(int64(10)) - updateInstanceGroupManagerOptionsModel.MinMembershipCount = core.Int64Ptr(int64(10)) + updateInstanceGroupManagerOptionsModel.InstanceGroupManagerPatch = instanceGroupManagerPatchModelAsPatch updateInstanceGroupManagerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -10972,16 +11200,22 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceGroupManagerPatch model + instanceGroupManagerPatchModel := new(vpcv1.InstanceGroupManagerPatch) + instanceGroupManagerPatchModel.Name = core.StringPtr("my-instance-group-manager") + instanceGroupManagerPatchModel.ManagementEnabled = core.BoolPtr(true) + instanceGroupManagerPatchModel.AggregationWindow = core.Int64Ptr(int64(120)) + instanceGroupManagerPatchModel.Cooldown = core.Int64Ptr(int64(210)) + instanceGroupManagerPatchModel.MaxMembershipCount = core.Int64Ptr(int64(10)) + instanceGroupManagerPatchModel.MinMembershipCount = core.Int64Ptr(int64(10)) + instanceGroupManagerPatchModelAsPatch, asPatchErr := instanceGroupManagerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupManagerOptions model updateInstanceGroupManagerOptionsModel := new(vpcv1.UpdateInstanceGroupManagerOptions) updateInstanceGroupManagerOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupManagerOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupManagerOptionsModel.Name = core.StringPtr("my-instance-group-manager") - updateInstanceGroupManagerOptionsModel.ManagementEnabled = core.BoolPtr(true) - updateInstanceGroupManagerOptionsModel.AggregationWindow = core.Int64Ptr(int64(120)) - updateInstanceGroupManagerOptionsModel.Cooldown = core.Int64Ptr(int64(210)) - updateInstanceGroupManagerOptionsModel.MaxMembershipCount = core.Int64Ptr(int64(10)) - updateInstanceGroupManagerOptionsModel.MinMembershipCount = core.Int64Ptr(int64(10)) + updateInstanceGroupManagerOptionsModel.InstanceGroupManagerPatch = instanceGroupManagerPatchModelAsPatch updateInstanceGroupManagerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -11013,7 +11247,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupManagerPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupManagerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11059,7 +11293,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupManagerPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupManagerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11141,7 +11375,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11195,7 +11429,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11294,7 +11528,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11372,7 +11606,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11419,7 +11653,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11503,7 +11737,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11523,14 +11757,20 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceGroupManagerPolicyPatch model + instanceGroupManagerPolicyPatchModel := new(vpcv1.InstanceGroupManagerPolicyPatch) + instanceGroupManagerPolicyPatchModel.Name = core.StringPtr("my-instance-group-manager-policy") + instanceGroupManagerPolicyPatchModel.MetricType = core.StringPtr("cpu") + instanceGroupManagerPolicyPatchModel.MetricValue = core.Int64Ptr(int64(38)) + instanceGroupManagerPolicyPatchModelAsPatch, asPatchErr := instanceGroupManagerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupManagerPolicyOptions model updateInstanceGroupManagerPolicyOptionsModel := new(vpcv1.UpdateInstanceGroupManagerPolicyOptions) updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerID = core.StringPtr("testString") updateInstanceGroupManagerPolicyOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupManagerPolicyOptionsModel.Name = core.StringPtr("my-instance-group-manager-policy") - updateInstanceGroupManagerPolicyOptionsModel.MetricType = core.StringPtr("cpu") - updateInstanceGroupManagerPolicyOptionsModel.MetricValue = core.Int64Ptr(int64(38)) + updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatchModelAsPatch updateInstanceGroupManagerPolicyOptionsModel.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 := vpcService.UpdateInstanceGroupManagerPolicy(updateInstanceGroupManagerPolicyOptionsModel) @@ -11553,7 +11793,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupManagerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupManagerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11579,14 +11819,20 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the InstanceGroupManagerPolicyPatch model + instanceGroupManagerPolicyPatchModel := new(vpcv1.InstanceGroupManagerPolicyPatch) + instanceGroupManagerPolicyPatchModel.Name = core.StringPtr("my-instance-group-manager-policy") + instanceGroupManagerPolicyPatchModel.MetricType = core.StringPtr("cpu") + instanceGroupManagerPolicyPatchModel.MetricValue = core.Int64Ptr(int64(38)) + instanceGroupManagerPolicyPatchModelAsPatch, asPatchErr := instanceGroupManagerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupManagerPolicyOptions model updateInstanceGroupManagerPolicyOptionsModel := new(vpcv1.UpdateInstanceGroupManagerPolicyOptions) updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerID = core.StringPtr("testString") updateInstanceGroupManagerPolicyOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupManagerPolicyOptionsModel.Name = core.StringPtr("my-instance-group-manager-policy") - updateInstanceGroupManagerPolicyOptionsModel.MetricType = core.StringPtr("cpu") - updateInstanceGroupManagerPolicyOptionsModel.MetricValue = core.Int64Ptr(int64(38)) + updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatchModelAsPatch updateInstanceGroupManagerPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -11604,14 +11850,20 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceGroupManagerPolicyPatch model + instanceGroupManagerPolicyPatchModel := new(vpcv1.InstanceGroupManagerPolicyPatch) + instanceGroupManagerPolicyPatchModel.Name = core.StringPtr("my-instance-group-manager-policy") + instanceGroupManagerPolicyPatchModel.MetricType = core.StringPtr("cpu") + instanceGroupManagerPolicyPatchModel.MetricValue = core.Int64Ptr(int64(38)) + instanceGroupManagerPolicyPatchModelAsPatch, asPatchErr := instanceGroupManagerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupManagerPolicyOptions model updateInstanceGroupManagerPolicyOptionsModel := new(vpcv1.UpdateInstanceGroupManagerPolicyOptions) updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerID = core.StringPtr("testString") updateInstanceGroupManagerPolicyOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupManagerPolicyOptionsModel.Name = core.StringPtr("my-instance-group-manager-policy") - updateInstanceGroupManagerPolicyOptionsModel.MetricType = core.StringPtr("cpu") - updateInstanceGroupManagerPolicyOptionsModel.MetricValue = core.Int64Ptr(int64(38)) + updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerPolicyPatch = instanceGroupManagerPolicyPatchModelAsPatch updateInstanceGroupManagerPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -11644,7 +11896,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceGroupMembershipsPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceGroupMembershipsPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11718,7 +11970,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupMembershipsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupMembershipsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11763,7 +12015,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listInstanceGroupMembershipsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listInstanceGroupMembershipsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11844,7 +12096,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteInstanceGroupMembershipPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11920,7 +12172,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupMembershipPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -11966,7 +12218,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getInstanceGroupMembershipPath)) + Expect(req.URL.EscapedPath()).To(Equal(getInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12048,7 +12300,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupMembershipPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12068,11 +12320,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceGroupMembershipPatch model + instanceGroupMembershipPatchModel := new(vpcv1.InstanceGroupMembershipPatch) + instanceGroupMembershipPatchModel.Name = core.StringPtr("my-instance-group-membership") + instanceGroupMembershipPatchModelAsPatch, asPatchErr := instanceGroupMembershipPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupMembershipOptions model updateInstanceGroupMembershipOptionsModel := new(vpcv1.UpdateInstanceGroupMembershipOptions) updateInstanceGroupMembershipOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupMembershipOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupMembershipOptionsModel.Name = core.StringPtr("my-instance-group-membership") + updateInstanceGroupMembershipOptionsModel.InstanceGroupMembershipPatch = instanceGroupMembershipPatchModelAsPatch updateInstanceGroupMembershipOptionsModel.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 := vpcService.UpdateInstanceGroupMembership(updateInstanceGroupMembershipOptionsModel) @@ -12095,7 +12353,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateInstanceGroupMembershipPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateInstanceGroupMembershipPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12121,11 +12379,17 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the InstanceGroupMembershipPatch model + instanceGroupMembershipPatchModel := new(vpcv1.InstanceGroupMembershipPatch) + instanceGroupMembershipPatchModel.Name = core.StringPtr("my-instance-group-membership") + instanceGroupMembershipPatchModelAsPatch, asPatchErr := instanceGroupMembershipPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupMembershipOptions model updateInstanceGroupMembershipOptionsModel := new(vpcv1.UpdateInstanceGroupMembershipOptions) updateInstanceGroupMembershipOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupMembershipOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupMembershipOptionsModel.Name = core.StringPtr("my-instance-group-membership") + updateInstanceGroupMembershipOptionsModel.InstanceGroupMembershipPatch = instanceGroupMembershipPatchModelAsPatch updateInstanceGroupMembershipOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -12143,11 +12407,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the InstanceGroupMembershipPatch model + instanceGroupMembershipPatchModel := new(vpcv1.InstanceGroupMembershipPatch) + instanceGroupMembershipPatchModel.Name = core.StringPtr("my-instance-group-membership") + instanceGroupMembershipPatchModelAsPatch, asPatchErr := instanceGroupMembershipPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateInstanceGroupMembershipOptions model updateInstanceGroupMembershipOptionsModel := new(vpcv1.UpdateInstanceGroupMembershipOptions) updateInstanceGroupMembershipOptionsModel.InstanceGroupID = core.StringPtr("testString") updateInstanceGroupMembershipOptionsModel.ID = core.StringPtr("testString") - updateInstanceGroupMembershipOptionsModel.Name = core.StringPtr("my-instance-group-membership") + updateInstanceGroupMembershipOptionsModel.InstanceGroupMembershipPatch = instanceGroupMembershipPatchModelAsPatch updateInstanceGroupMembershipOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -12294,7 +12564,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumeProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumeProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12344,7 +12614,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumeProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumeProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12423,7 +12693,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumeProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumeProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12468,7 +12738,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumeProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumeProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12548,7 +12818,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12604,7 +12874,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVolumesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVolumesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12691,7 +12961,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVolumePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12762,7 +13032,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(createVolumePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12895,7 +13165,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVolumePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -12969,7 +13239,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13014,7 +13284,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(getVolumePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13094,7 +13364,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVolumePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13114,10 +13384,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VolumePatch model + volumePatchModel := new(vpcv1.VolumePatch) + volumePatchModel.Name = core.StringPtr("my-volume") + volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVolumeOptions model updateVolumeOptionsModel := new(vpcv1.UpdateVolumeOptions) updateVolumeOptionsModel.ID = core.StringPtr("testString") - updateVolumeOptionsModel.Name = core.StringPtr("my-volume") + updateVolumeOptionsModel.VolumePatch = volumePatchModelAsPatch updateVolumeOptionsModel.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 := vpcService.UpdateVolume(updateVolumeOptionsModel) @@ -13140,7 +13416,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVolumePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVolumePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13166,10 +13442,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VolumePatch model + volumePatchModel := new(vpcv1.VolumePatch) + volumePatchModel.Name = core.StringPtr("my-volume") + volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVolumeOptions model updateVolumeOptionsModel := new(vpcv1.UpdateVolumeOptions) updateVolumeOptionsModel.ID = core.StringPtr("testString") - updateVolumeOptionsModel.Name = core.StringPtr("my-volume") + updateVolumeOptionsModel.VolumePatch = volumePatchModelAsPatch updateVolumeOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -13187,10 +13469,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VolumePatch model + volumePatchModel := new(vpcv1.VolumePatch) + volumePatchModel.Name = core.StringPtr("my-volume") + volumePatchModelAsPatch, asPatchErr := volumePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVolumeOptions model updateVolumeOptionsModel := new(vpcv1.UpdateVolumeOptions) updateVolumeOptionsModel.ID = core.StringPtr("testString") - updateVolumeOptionsModel.Name = core.StringPtr("my-volume") + updateVolumeOptionsModel.VolumePatch = volumePatchModelAsPatch updateVolumeOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -13337,7 +13625,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13381,7 +13669,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13452,7 +13740,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13497,7 +13785,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13577,7 +13865,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionZonesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionZonesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13622,7 +13910,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listRegionZonesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listRegionZonesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13702,7 +13990,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionZonePath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionZonePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13748,7 +14036,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getRegionZonePath)) + Expect(req.URL.EscapedPath()).To(Equal(getRegionZonePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13945,7 +14233,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listPublicGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listPublicGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -13998,7 +14286,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listPublicGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listPublicGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14081,7 +14369,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createPublicGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14146,7 +14434,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createPublicGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14267,7 +14555,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deletePublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(deletePublicGatewayPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14341,7 +14629,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14386,7 +14674,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getPublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getPublicGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14466,7 +14754,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updatePublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updatePublicGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14486,10 +14774,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the PublicGatewayPatch model + publicGatewayPatchModel := new(vpcv1.PublicGatewayPatch) + publicGatewayPatchModel.Name = core.StringPtr("my-public-gateway") + publicGatewayPatchModelAsPatch, asPatchErr := publicGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdatePublicGatewayOptions model updatePublicGatewayOptionsModel := new(vpcv1.UpdatePublicGatewayOptions) updatePublicGatewayOptionsModel.ID = core.StringPtr("testString") - updatePublicGatewayOptionsModel.Name = core.StringPtr("my-public-gateway") + updatePublicGatewayOptionsModel.PublicGatewayPatch = publicGatewayPatchModelAsPatch updatePublicGatewayOptionsModel.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 := vpcService.UpdatePublicGateway(updatePublicGatewayOptionsModel) @@ -14512,7 +14806,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updatePublicGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updatePublicGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14538,10 +14832,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the PublicGatewayPatch model + publicGatewayPatchModel := new(vpcv1.PublicGatewayPatch) + publicGatewayPatchModel.Name = core.StringPtr("my-public-gateway") + publicGatewayPatchModelAsPatch, asPatchErr := publicGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdatePublicGatewayOptions model updatePublicGatewayOptionsModel := new(vpcv1.UpdatePublicGatewayOptions) updatePublicGatewayOptionsModel.ID = core.StringPtr("testString") - updatePublicGatewayOptionsModel.Name = core.StringPtr("my-public-gateway") + updatePublicGatewayOptionsModel.PublicGatewayPatch = publicGatewayPatchModelAsPatch updatePublicGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -14559,10 +14859,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the PublicGatewayPatch model + publicGatewayPatchModel := new(vpcv1.PublicGatewayPatch) + publicGatewayPatchModel.Name = core.StringPtr("my-public-gateway") + publicGatewayPatchModelAsPatch, asPatchErr := publicGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdatePublicGatewayOptions model updatePublicGatewayOptionsModel := new(vpcv1.UpdatePublicGatewayOptions) updatePublicGatewayOptionsModel.ID = core.StringPtr("testString") - updatePublicGatewayOptionsModel.Name = core.StringPtr("my-public-gateway") + updatePublicGatewayOptionsModel.PublicGatewayPatch = publicGatewayPatchModelAsPatch updatePublicGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -14709,7 +15015,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14762,7 +15068,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listFloatingIpsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listFloatingIpsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14845,7 +15151,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(createFloatingIPPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -14904,7 +15210,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(createFloatingIPPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15013,7 +15319,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteFloatingIPPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15087,7 +15393,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15132,7 +15438,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(getFloatingIPPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15212,7 +15518,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateFloatingIPPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15234,13 +15540,19 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + + // Construct an instance of the FloatingIPPatch model + floatingIPPatchModel := new(vpcv1.FloatingIPPatch) + floatingIPPatchModel.Name = core.StringPtr("my-floating-ip") + floatingIPPatchModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel + floatingIPPatchModelAsPatch, asPatchErr := floatingIPPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // 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 = floatingIPPatchTargetNetworkInterfaceIdentityModel + updateFloatingIPOptionsModel.FloatingIPPatch = floatingIPPatchModelAsPatch 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 := vpcService.UpdateFloatingIP(updateFloatingIPOptionsModel) @@ -15263,7 +15575,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateFloatingIPPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateFloatingIPPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15291,13 +15603,19 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + + // Construct an instance of the FloatingIPPatch model + floatingIPPatchModel := new(vpcv1.FloatingIPPatch) + floatingIPPatchModel.Name = core.StringPtr("my-floating-ip") + floatingIPPatchModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel + floatingIPPatchModelAsPatch, asPatchErr := floatingIPPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // 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 = floatingIPPatchTargetNetworkInterfaceIdentityModel + updateFloatingIPOptionsModel.FloatingIPPatch = floatingIPPatchModelAsPatch updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -15317,13 +15635,19 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("10c02d81-0ecb-4dc5-897d-28392913b81e") + floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + + // Construct an instance of the FloatingIPPatch model + floatingIPPatchModel := new(vpcv1.FloatingIPPatch) + floatingIPPatchModel.Name = core.StringPtr("my-floating-ip") + floatingIPPatchModel.Target = floatingIPPatchTargetNetworkInterfaceIdentityModel + floatingIPPatchModelAsPatch, asPatchErr := floatingIPPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) // 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 = floatingIPPatchTargetNetworkInterfaceIdentityModel + updateFloatingIPOptionsModel.FloatingIPPatch = floatingIPPatchModelAsPatch updateFloatingIPOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -15470,7 +15794,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkAclsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkAclsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15523,7 +15847,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkAclsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkAclsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15606,7 +15930,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15675,7 +15999,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15797,7 +16121,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteNetworkACLPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15871,7 +16195,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15916,7 +16240,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -15996,7 +16320,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16016,10 +16340,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the NetworkACLPatch model + networkACLPatchModel := new(vpcv1.NetworkACLPatch) + networkACLPatchModel.Name = core.StringPtr("my-network-acl") + networkACLPatchModelAsPatch, asPatchErr := networkACLPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLOptions model updateNetworkACLOptionsModel := new(vpcv1.UpdateNetworkACLOptions) updateNetworkACLOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLOptionsModel.Name = core.StringPtr("my-network-acl") + updateNetworkACLOptionsModel.NetworkACLPatch = networkACLPatchModelAsPatch updateNetworkACLOptionsModel.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 := vpcService.UpdateNetworkACL(updateNetworkACLOptionsModel) @@ -16042,7 +16372,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16068,10 +16398,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the NetworkACLPatch model + networkACLPatchModel := new(vpcv1.NetworkACLPatch) + networkACLPatchModel.Name = core.StringPtr("my-network-acl") + networkACLPatchModelAsPatch, asPatchErr := networkACLPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLOptions model updateNetworkACLOptionsModel := new(vpcv1.UpdateNetworkACLOptions) updateNetworkACLOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLOptionsModel.Name = core.StringPtr("my-network-acl") + updateNetworkACLOptionsModel.NetworkACLPatch = networkACLPatchModelAsPatch updateNetworkACLOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -16089,10 +16425,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the NetworkACLPatch model + networkACLPatchModel := new(vpcv1.NetworkACLPatch) + networkACLPatchModel.Name = core.StringPtr("my-network-acl") + networkACLPatchModelAsPatch, asPatchErr := networkACLPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLOptions model updateNetworkACLOptionsModel := new(vpcv1.UpdateNetworkACLOptions) updateNetworkACLOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLOptionsModel.Name = core.StringPtr("my-network-acl") + updateNetworkACLOptionsModel.NetworkACLPatch = networkACLPatchModelAsPatch updateNetworkACLOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -16124,7 +16466,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkACLRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkACLRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16178,7 +16520,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listNetworkACLRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listNetworkACLRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16270,7 +16612,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16330,7 +16672,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createNetworkACLRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16441,7 +16783,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteNetworkACLRulePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16517,7 +16859,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16563,7 +16905,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getNetworkACLRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16645,7 +16987,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16669,22 +17011,28 @@ var _ = Describe(`VpcV1`, func() { networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the NetworkACLRulePatch model + networkACLRulePatchModel := new(vpcv1.NetworkACLRulePatch) + networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") + networkACLRulePatchModel.Action = core.StringPtr("allow") + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") + networkACLRulePatchModel.Direction = core.StringPtr("inbound") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") + networkACLRulePatchModel.DestinationPortMax = core.Int64Ptr(int64(22)) + networkACLRulePatchModel.DestinationPortMin = core.Int64Ptr(int64(22)) + networkACLRulePatchModel.SourcePortMax = core.Int64Ptr(int64(65535)) + networkACLRulePatchModel.SourcePortMin = core.Int64Ptr(int64(49152)) + networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) + networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModelAsPatch, asPatchErr := networkACLRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLRuleOptionsModel.Name = core.StringPtr("my-rule-2") - updateNetworkACLRuleOptionsModel.Action = core.StringPtr("allow") - updateNetworkACLRuleOptionsModel.Destination = core.StringPtr("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.Direction = core.StringPtr("inbound") - updateNetworkACLRuleOptionsModel.Source = core.StringPtr("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.DestinationPortMax = core.Int64Ptr(int64(22)) - updateNetworkACLRuleOptionsModel.DestinationPortMin = core.Int64Ptr(int64(22)) - updateNetworkACLRuleOptionsModel.SourcePortMax = core.Int64Ptr(int64(65535)) - updateNetworkACLRuleOptionsModel.SourcePortMin = core.Int64Ptr(int64(49152)) - updateNetworkACLRuleOptionsModel.Code = core.Int64Ptr(int64(0)) - updateNetworkACLRuleOptionsModel.Type = core.Int64Ptr(int64(8)) - updateNetworkACLRuleOptionsModel.Before = networkACLRuleIdentityModel + updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModelAsPatch updateNetworkACLRuleOptionsModel.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 := vpcService.UpdateNetworkACLRule(updateNetworkACLRuleOptionsModel) @@ -16707,7 +17055,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateNetworkACLRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateNetworkACLRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16737,22 +17085,28 @@ var _ = Describe(`VpcV1`, func() { networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the NetworkACLRulePatch model + networkACLRulePatchModel := new(vpcv1.NetworkACLRulePatch) + networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") + networkACLRulePatchModel.Action = core.StringPtr("allow") + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") + networkACLRulePatchModel.Direction = core.StringPtr("inbound") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") + networkACLRulePatchModel.DestinationPortMax = core.Int64Ptr(int64(22)) + networkACLRulePatchModel.DestinationPortMin = core.Int64Ptr(int64(22)) + networkACLRulePatchModel.SourcePortMax = core.Int64Ptr(int64(65535)) + networkACLRulePatchModel.SourcePortMin = core.Int64Ptr(int64(49152)) + networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) + networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModelAsPatch, asPatchErr := networkACLRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLRuleOptionsModel.Name = core.StringPtr("my-rule-2") - updateNetworkACLRuleOptionsModel.Action = core.StringPtr("allow") - updateNetworkACLRuleOptionsModel.Destination = core.StringPtr("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.Direction = core.StringPtr("inbound") - updateNetworkACLRuleOptionsModel.Source = core.StringPtr("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.DestinationPortMax = core.Int64Ptr(int64(22)) - updateNetworkACLRuleOptionsModel.DestinationPortMin = core.Int64Ptr(int64(22)) - updateNetworkACLRuleOptionsModel.SourcePortMax = core.Int64Ptr(int64(65535)) - updateNetworkACLRuleOptionsModel.SourcePortMin = core.Int64Ptr(int64(49152)) - updateNetworkACLRuleOptionsModel.Code = core.Int64Ptr(int64(0)) - updateNetworkACLRuleOptionsModel.Type = core.Int64Ptr(int64(8)) - updateNetworkACLRuleOptionsModel.Before = networkACLRuleIdentityModel + updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModelAsPatch updateNetworkACLRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -16774,22 +17128,28 @@ var _ = Describe(`VpcV1`, func() { networkACLRuleIdentityModel := new(vpcv1.NetworkACLRuleIdentityByID) networkACLRuleIdentityModel.ID = core.StringPtr("8daca77a-4980-4d33-8f3e-7038797be8f9") + // Construct an instance of the NetworkACLRulePatch model + networkACLRulePatchModel := new(vpcv1.NetworkACLRulePatch) + networkACLRulePatchModel.Name = core.StringPtr("my-rule-2") + networkACLRulePatchModel.Action = core.StringPtr("allow") + networkACLRulePatchModel.Destination = core.StringPtr("192.168.3.2/32") + networkACLRulePatchModel.Direction = core.StringPtr("inbound") + networkACLRulePatchModel.Source = core.StringPtr("192.168.3.2/32") + networkACLRulePatchModel.DestinationPortMax = core.Int64Ptr(int64(22)) + networkACLRulePatchModel.DestinationPortMin = core.Int64Ptr(int64(22)) + networkACLRulePatchModel.SourcePortMax = core.Int64Ptr(int64(65535)) + networkACLRulePatchModel.SourcePortMin = core.Int64Ptr(int64(49152)) + networkACLRulePatchModel.Code = core.Int64Ptr(int64(0)) + networkACLRulePatchModel.Type = core.Int64Ptr(int64(8)) + networkACLRulePatchModel.Before = networkACLRuleIdentityModel + networkACLRulePatchModelAsPatch, asPatchErr := networkACLRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateNetworkACLRuleOptions model updateNetworkACLRuleOptionsModel := new(vpcv1.UpdateNetworkACLRuleOptions) updateNetworkACLRuleOptionsModel.NetworkACLID = core.StringPtr("testString") updateNetworkACLRuleOptionsModel.ID = core.StringPtr("testString") - updateNetworkACLRuleOptionsModel.Name = core.StringPtr("my-rule-2") - updateNetworkACLRuleOptionsModel.Action = core.StringPtr("allow") - updateNetworkACLRuleOptionsModel.Destination = core.StringPtr("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.Direction = core.StringPtr("inbound") - updateNetworkACLRuleOptionsModel.Source = core.StringPtr("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.DestinationPortMax = core.Int64Ptr(int64(22)) - updateNetworkACLRuleOptionsModel.DestinationPortMin = core.Int64Ptr(int64(22)) - updateNetworkACLRuleOptionsModel.SourcePortMax = core.Int64Ptr(int64(65535)) - updateNetworkACLRuleOptionsModel.SourcePortMin = core.Int64Ptr(int64(49152)) - updateNetworkACLRuleOptionsModel.Code = core.Int64Ptr(int64(0)) - updateNetworkACLRuleOptionsModel.Type = core.Int64Ptr(int64(8)) - updateNetworkACLRuleOptionsModel.Before = networkACLRuleIdentityModel + updateNetworkACLRuleOptionsModel.NetworkACLRulePatch = networkACLRulePatchModelAsPatch updateNetworkACLRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -16936,7 +17296,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -16998,7 +17358,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17093,7 +17453,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17162,7 +17522,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17291,7 +17651,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteSecurityGroupPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17365,7 +17725,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17410,7 +17770,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17490,7 +17850,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17510,10 +17870,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the SecurityGroupPatch model + securityGroupPatchModel := new(vpcv1.SecurityGroupPatch) + securityGroupPatchModel.Name = core.StringPtr("my-security-group") + securityGroupPatchModelAsPatch, asPatchErr := securityGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupOptions model updateSecurityGroupOptionsModel := new(vpcv1.UpdateSecurityGroupOptions) updateSecurityGroupOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupOptionsModel.Name = core.StringPtr("my-security-group") + updateSecurityGroupOptionsModel.SecurityGroupPatch = securityGroupPatchModelAsPatch updateSecurityGroupOptionsModel.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 := vpcService.UpdateSecurityGroup(updateSecurityGroupOptionsModel) @@ -17536,7 +17902,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17562,10 +17928,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the SecurityGroupPatch model + securityGroupPatchModel := new(vpcv1.SecurityGroupPatch) + securityGroupPatchModel.Name = core.StringPtr("my-security-group") + securityGroupPatchModelAsPatch, asPatchErr := securityGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupOptions model updateSecurityGroupOptionsModel := new(vpcv1.UpdateSecurityGroupOptions) updateSecurityGroupOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupOptionsModel.Name = core.StringPtr("my-security-group") + updateSecurityGroupOptionsModel.SecurityGroupPatch = securityGroupPatchModelAsPatch updateSecurityGroupOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -17583,10 +17955,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the SecurityGroupPatch model + securityGroupPatchModel := new(vpcv1.SecurityGroupPatch) + securityGroupPatchModel.Name = core.StringPtr("my-security-group") + securityGroupPatchModelAsPatch, asPatchErr := securityGroupPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupOptions model updateSecurityGroupOptionsModel := new(vpcv1.UpdateSecurityGroupOptions) updateSecurityGroupOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupOptionsModel.Name = core.StringPtr("my-security-group") + updateSecurityGroupOptionsModel.SecurityGroupPatch = securityGroupPatchModelAsPatch updateSecurityGroupOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -17618,7 +17996,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17669,7 +18047,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupNetworkInterfacesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupNetworkInterfacesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17758,7 +18136,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(removeSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17834,7 +18212,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17880,7 +18258,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -17962,7 +18340,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(addSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18008,7 +18386,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addSecurityGroupNetworkInterfacePath)) + Expect(req.URL.EscapedPath()).To(Equal(addSecurityGroupNetworkInterfacePath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18090,7 +18468,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18135,7 +18513,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listSecurityGroupRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listSecurityGroupRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18215,7 +18593,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18274,7 +18652,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createSecurityGroupRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18383,7 +18761,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteSecurityGroupRulePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18459,7 +18837,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18505,7 +18883,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getSecurityGroupRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18587,7 +18965,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18611,17 +18989,23 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePatchRemoteModel := new(vpcv1.SecurityGroupRulePatchRemoteIP) securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePatch model + securityGroupRulePatchModel := new(vpcv1.SecurityGroupRulePatch) + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel + securityGroupRulePatchModel.Direction = core.StringPtr("inbound") + securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") + securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) + securityGroupRulePatchModel.PortMax = core.Int64Ptr(int64(22)) + securityGroupRulePatchModel.PortMin = core.Int64Ptr(int64(22)) + securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) + securityGroupRulePatchModelAsPatch, asPatchErr := securityGroupRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupRuleOptions model updateSecurityGroupRuleOptionsModel := new(vpcv1.UpdateSecurityGroupRuleOptions) updateSecurityGroupRuleOptionsModel.SecurityGroupID = core.StringPtr("testString") updateSecurityGroupRuleOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupRuleOptionsModel.Remote = securityGroupRulePatchRemoteModel - updateSecurityGroupRuleOptionsModel.Direction = core.StringPtr("inbound") - updateSecurityGroupRuleOptionsModel.IPVersion = core.StringPtr("ipv4") - updateSecurityGroupRuleOptionsModel.Code = core.Int64Ptr(int64(0)) - updateSecurityGroupRuleOptionsModel.PortMax = core.Int64Ptr(int64(22)) - updateSecurityGroupRuleOptionsModel.PortMin = core.Int64Ptr(int64(22)) - updateSecurityGroupRuleOptionsModel.Type = core.Int64Ptr(int64(8)) + updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModelAsPatch updateSecurityGroupRuleOptionsModel.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 := vpcService.UpdateSecurityGroupRule(updateSecurityGroupRuleOptionsModel) @@ -18644,7 +19028,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateSecurityGroupRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateSecurityGroupRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18674,17 +19058,23 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePatchRemoteModel := new(vpcv1.SecurityGroupRulePatchRemoteIP) securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePatch model + securityGroupRulePatchModel := new(vpcv1.SecurityGroupRulePatch) + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel + securityGroupRulePatchModel.Direction = core.StringPtr("inbound") + securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") + securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) + securityGroupRulePatchModel.PortMax = core.Int64Ptr(int64(22)) + securityGroupRulePatchModel.PortMin = core.Int64Ptr(int64(22)) + securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) + securityGroupRulePatchModelAsPatch, asPatchErr := securityGroupRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupRuleOptions model updateSecurityGroupRuleOptionsModel := new(vpcv1.UpdateSecurityGroupRuleOptions) updateSecurityGroupRuleOptionsModel.SecurityGroupID = core.StringPtr("testString") updateSecurityGroupRuleOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupRuleOptionsModel.Remote = securityGroupRulePatchRemoteModel - updateSecurityGroupRuleOptionsModel.Direction = core.StringPtr("inbound") - updateSecurityGroupRuleOptionsModel.IPVersion = core.StringPtr("ipv4") - updateSecurityGroupRuleOptionsModel.Code = core.Int64Ptr(int64(0)) - updateSecurityGroupRuleOptionsModel.PortMax = core.Int64Ptr(int64(22)) - updateSecurityGroupRuleOptionsModel.PortMin = core.Int64Ptr(int64(22)) - updateSecurityGroupRuleOptionsModel.Type = core.Int64Ptr(int64(8)) + updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModelAsPatch updateSecurityGroupRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -18706,17 +19096,23 @@ var _ = Describe(`VpcV1`, func() { securityGroupRulePatchRemoteModel := new(vpcv1.SecurityGroupRulePatchRemoteIP) securityGroupRulePatchRemoteModel.Address = core.StringPtr("192.168.3.4") + // Construct an instance of the SecurityGroupRulePatch model + securityGroupRulePatchModel := new(vpcv1.SecurityGroupRulePatch) + securityGroupRulePatchModel.Remote = securityGroupRulePatchRemoteModel + securityGroupRulePatchModel.Direction = core.StringPtr("inbound") + securityGroupRulePatchModel.IPVersion = core.StringPtr("ipv4") + securityGroupRulePatchModel.Code = core.Int64Ptr(int64(0)) + securityGroupRulePatchModel.PortMax = core.Int64Ptr(int64(22)) + securityGroupRulePatchModel.PortMin = core.Int64Ptr(int64(22)) + securityGroupRulePatchModel.Type = core.Int64Ptr(int64(8)) + securityGroupRulePatchModelAsPatch, asPatchErr := securityGroupRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateSecurityGroupRuleOptions model updateSecurityGroupRuleOptionsModel := new(vpcv1.UpdateSecurityGroupRuleOptions) updateSecurityGroupRuleOptionsModel.SecurityGroupID = core.StringPtr("testString") updateSecurityGroupRuleOptionsModel.ID = core.StringPtr("testString") - updateSecurityGroupRuleOptionsModel.Remote = securityGroupRulePatchRemoteModel - updateSecurityGroupRuleOptionsModel.Direction = core.StringPtr("inbound") - updateSecurityGroupRuleOptionsModel.IPVersion = core.StringPtr("ipv4") - updateSecurityGroupRuleOptionsModel.Code = core.Int64Ptr(int64(0)) - updateSecurityGroupRuleOptionsModel.PortMax = core.Int64Ptr(int64(22)) - updateSecurityGroupRuleOptionsModel.PortMin = core.Int64Ptr(int64(22)) - updateSecurityGroupRuleOptionsModel.Type = core.Int64Ptr(int64(8)) + updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch = securityGroupRulePatchModelAsPatch updateSecurityGroupRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -18863,7 +19259,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18913,7 +19309,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -18992,7 +19388,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIkePolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19047,7 +19443,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIkePolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19148,7 +19544,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteIkePolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19222,7 +19618,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIkePolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19267,7 +19663,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIkePolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19347,7 +19743,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIkePolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19370,12 +19766,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the UpdateIkePolicyOptions model updateIkePolicyOptionsModel := new(vpcv1.UpdateIkePolicyOptions) updateIkePolicyOptionsModel.ID = core.StringPtr("testString") - updateIkePolicyOptionsModel.Name = core.StringPtr("my-ike-policy") - updateIkePolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIkePolicyOptionsModel.DhGroup = core.Int64Ptr(int64(2)) - updateIkePolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIkePolicyOptionsModel.IkeVersion = core.Int64Ptr(int64(1)) - updateIkePolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(28800)) + updateIkePolicyOptionsModel.IkePolicyPatch = make(map[string]interface{}) updateIkePolicyOptionsModel.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 := vpcService.UpdateIkePolicy(updateIkePolicyOptionsModel) @@ -19398,7 +19789,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIkePolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIkePolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19427,12 +19818,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the UpdateIkePolicyOptions model updateIkePolicyOptionsModel := new(vpcv1.UpdateIkePolicyOptions) updateIkePolicyOptionsModel.ID = core.StringPtr("testString") - updateIkePolicyOptionsModel.Name = core.StringPtr("my-ike-policy") - updateIkePolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIkePolicyOptionsModel.DhGroup = core.Int64Ptr(int64(2)) - updateIkePolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIkePolicyOptionsModel.IkeVersion = core.Int64Ptr(int64(1)) - updateIkePolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(28800)) + updateIkePolicyOptionsModel.IkePolicyPatch = make(map[string]interface{}) updateIkePolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -19453,12 +19839,7 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the UpdateIkePolicyOptions model updateIkePolicyOptionsModel := new(vpcv1.UpdateIkePolicyOptions) updateIkePolicyOptionsModel.ID = core.StringPtr("testString") - updateIkePolicyOptionsModel.Name = core.StringPtr("my-ike-policy") - updateIkePolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIkePolicyOptionsModel.DhGroup = core.Int64Ptr(int64(2)) - updateIkePolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIkePolicyOptionsModel.IkeVersion = core.Int64Ptr(int64(1)) - updateIkePolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(28800)) + updateIkePolicyOptionsModel.IkePolicyPatch = make(map[string]interface{}) updateIkePolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -19490,7 +19871,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19535,7 +19916,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIkePolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIkePolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19615,7 +19996,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19665,7 +20046,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19744,7 +20125,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIpsecPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19798,7 +20179,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createIpsecPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19897,7 +20278,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteIpsecPolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -19971,7 +20352,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIpsecPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20016,7 +20397,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getIpsecPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20096,7 +20477,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIpsecPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20116,14 +20497,20 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the IPsecPolicyPatch model + iPsecPolicyPatchModel := new(vpcv1.IPsecPolicyPatch) + iPsecPolicyPatchModel.Name = core.StringPtr("my-ipsec-policy") + iPsecPolicyPatchModel.AuthenticationAlgorithm = core.StringPtr("md5") + iPsecPolicyPatchModel.EncryptionAlgorithm = core.StringPtr("triple_des") + iPsecPolicyPatchModel.KeyLifetime = core.Int64Ptr(int64(3600)) + iPsecPolicyPatchModel.Pfs = core.StringPtr("disabled") + iPsecPolicyPatchModelAsPatch, asPatchErr := iPsecPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateIpsecPolicyOptions model updateIpsecPolicyOptionsModel := new(vpcv1.UpdateIpsecPolicyOptions) updateIpsecPolicyOptionsModel.ID = core.StringPtr("testString") - updateIpsecPolicyOptionsModel.Name = core.StringPtr("my-ipsec-policy") - updateIpsecPolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIpsecPolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIpsecPolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(3600)) - updateIpsecPolicyOptionsModel.Pfs = core.StringPtr("disabled") + updateIpsecPolicyOptionsModel.IPsecPolicyPatch = iPsecPolicyPatchModelAsPatch updateIpsecPolicyOptionsModel.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 := vpcService.UpdateIpsecPolicy(updateIpsecPolicyOptionsModel) @@ -20146,7 +20533,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateIpsecPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateIpsecPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20172,14 +20559,20 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the IPsecPolicyPatch model + iPsecPolicyPatchModel := new(vpcv1.IPsecPolicyPatch) + iPsecPolicyPatchModel.Name = core.StringPtr("my-ipsec-policy") + iPsecPolicyPatchModel.AuthenticationAlgorithm = core.StringPtr("md5") + iPsecPolicyPatchModel.EncryptionAlgorithm = core.StringPtr("triple_des") + iPsecPolicyPatchModel.KeyLifetime = core.Int64Ptr(int64(3600)) + iPsecPolicyPatchModel.Pfs = core.StringPtr("disabled") + iPsecPolicyPatchModelAsPatch, asPatchErr := iPsecPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateIpsecPolicyOptions model updateIpsecPolicyOptionsModel := new(vpcv1.UpdateIpsecPolicyOptions) updateIpsecPolicyOptionsModel.ID = core.StringPtr("testString") - updateIpsecPolicyOptionsModel.Name = core.StringPtr("my-ipsec-policy") - updateIpsecPolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIpsecPolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIpsecPolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(3600)) - updateIpsecPolicyOptionsModel.Pfs = core.StringPtr("disabled") + updateIpsecPolicyOptionsModel.IPsecPolicyPatch = iPsecPolicyPatchModelAsPatch updateIpsecPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -20197,14 +20590,20 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the IPsecPolicyPatch model + iPsecPolicyPatchModel := new(vpcv1.IPsecPolicyPatch) + iPsecPolicyPatchModel.Name = core.StringPtr("my-ipsec-policy") + iPsecPolicyPatchModel.AuthenticationAlgorithm = core.StringPtr("md5") + iPsecPolicyPatchModel.EncryptionAlgorithm = core.StringPtr("triple_des") + iPsecPolicyPatchModel.KeyLifetime = core.Int64Ptr(int64(3600)) + iPsecPolicyPatchModel.Pfs = core.StringPtr("disabled") + iPsecPolicyPatchModelAsPatch, asPatchErr := iPsecPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateIpsecPolicyOptions model updateIpsecPolicyOptionsModel := new(vpcv1.UpdateIpsecPolicyOptions) updateIpsecPolicyOptionsModel.ID = core.StringPtr("testString") - updateIpsecPolicyOptionsModel.Name = core.StringPtr("my-ipsec-policy") - updateIpsecPolicyOptionsModel.AuthenticationAlgorithm = core.StringPtr("md5") - updateIpsecPolicyOptionsModel.EncryptionAlgorithm = core.StringPtr("triple_des") - updateIpsecPolicyOptionsModel.KeyLifetime = core.Int64Ptr(int64(3600)) - updateIpsecPolicyOptionsModel.Pfs = core.StringPtr("disabled") + updateIpsecPolicyOptionsModel.IPsecPolicyPatch = iPsecPolicyPatchModelAsPatch updateIpsecPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -20236,7 +20635,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20281,7 +20680,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listIpsecPolicyConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listIpsecPolicyConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20361,7 +20760,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20414,7 +20813,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewaysPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewaysPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20497,7 +20896,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20552,7 +20951,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20653,7 +21052,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPNGatewayPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20727,7 +21126,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20772,7 +21171,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20852,7 +21251,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20872,10 +21271,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VPNGatewayPatch model + vpnGatewayPatchModel := new(vpcv1.VPNGatewayPatch) + vpnGatewayPatchModel.Name = core.StringPtr("my-vpn-gateway") + vpnGatewayPatchModelAsPatch, asPatchErr := vpnGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayOptions model updateVPNGatewayOptionsModel := new(vpcv1.UpdateVPNGatewayOptions) updateVPNGatewayOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayOptionsModel.Name = core.StringPtr("my-vpn-gateway") + updateVPNGatewayOptionsModel.VPNGatewayPatch = vpnGatewayPatchModelAsPatch updateVPNGatewayOptionsModel.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 := vpcService.UpdateVPNGateway(updateVPNGatewayOptionsModel) @@ -20898,7 +21303,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -20924,10 +21329,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the VPNGatewayPatch model + vpnGatewayPatchModel := new(vpcv1.VPNGatewayPatch) + vpnGatewayPatchModel.Name = core.StringPtr("my-vpn-gateway") + vpnGatewayPatchModelAsPatch, asPatchErr := vpnGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayOptions model updateVPNGatewayOptionsModel := new(vpcv1.UpdateVPNGatewayOptions) updateVPNGatewayOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayOptionsModel.Name = core.StringPtr("my-vpn-gateway") + updateVPNGatewayOptionsModel.VPNGatewayPatch = vpnGatewayPatchModelAsPatch updateVPNGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -20945,10 +21356,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the VPNGatewayPatch model + vpnGatewayPatchModel := new(vpcv1.VPNGatewayPatch) + vpnGatewayPatchModel.Name = core.StringPtr("my-vpn-gateway") + vpnGatewayPatchModelAsPatch, asPatchErr := vpnGatewayPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayOptions model updateVPNGatewayOptionsModel := new(vpcv1.UpdateVPNGatewayOptions) updateVPNGatewayOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayOptionsModel.Name = core.StringPtr("my-vpn-gateway") + updateVPNGatewayOptionsModel.VPNGatewayPatch = vpnGatewayPatchModelAsPatch updateVPNGatewayOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -20980,7 +21397,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21028,7 +21445,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21112,7 +21529,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21180,7 +21597,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(createVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21307,7 +21724,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21383,7 +21800,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21429,7 +21846,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(getVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21511,7 +21928,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21545,17 +21962,23 @@ var _ = Describe(`VpcV1`, func() { iPsecPolicyIdentityModel := new(vpcv1.IPsecPolicyIdentityByID) iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPatch model + vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) + vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) + vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") + vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPatchModel.IkePolicy = ikePolicyIdentityModel + vpnGatewayConnectionPatchModel.IpsecPolicy = iPsecPolicyIdentityModel + vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayConnectionOptions model updateVPNGatewayConnectionOptionsModel := new(vpcv1.UpdateVPNGatewayConnectionOptions) updateVPNGatewayConnectionOptionsModel.VPNGatewayID = core.StringPtr("testString") updateVPNGatewayConnectionOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayConnectionOptionsModel.AdminStateUp = core.BoolPtr(true) - updateVPNGatewayConnectionOptionsModel.PeerAddress = core.StringPtr("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel - updateVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel - updateVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel + updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch = vpnGatewayConnectionPatchModelAsPatch updateVPNGatewayConnectionOptionsModel.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 := vpcService.UpdateVPNGatewayConnection(updateVPNGatewayConnectionOptionsModel) @@ -21578,7 +22001,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateVPNGatewayConnectionPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateVPNGatewayConnectionPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21618,17 +22041,23 @@ var _ = Describe(`VpcV1`, func() { iPsecPolicyIdentityModel := new(vpcv1.IPsecPolicyIdentityByID) iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPatch model + vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) + vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) + vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") + vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPatchModel.IkePolicy = ikePolicyIdentityModel + vpnGatewayConnectionPatchModel.IpsecPolicy = iPsecPolicyIdentityModel + vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayConnectionOptions model updateVPNGatewayConnectionOptionsModel := new(vpcv1.UpdateVPNGatewayConnectionOptions) updateVPNGatewayConnectionOptionsModel.VPNGatewayID = core.StringPtr("testString") updateVPNGatewayConnectionOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayConnectionOptionsModel.AdminStateUp = core.BoolPtr(true) - updateVPNGatewayConnectionOptionsModel.PeerAddress = core.StringPtr("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel - updateVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel - updateVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel + updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch = vpnGatewayConnectionPatchModelAsPatch updateVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -21660,17 +22089,23 @@ var _ = Describe(`VpcV1`, func() { iPsecPolicyIdentityModel := new(vpcv1.IPsecPolicyIdentityByID) iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") + // Construct an instance of the VPNGatewayConnectionPatch model + vpnGatewayConnectionPatchModel := new(vpcv1.VPNGatewayConnectionPatch) + vpnGatewayConnectionPatchModel.AdminStateUp = core.BoolPtr(true) + vpnGatewayConnectionPatchModel.PeerAddress = core.StringPtr("169.21.50.5") + vpnGatewayConnectionPatchModel.Name = core.StringPtr("my-vpn-connection") + vpnGatewayConnectionPatchModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") + vpnGatewayConnectionPatchModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel + vpnGatewayConnectionPatchModel.IkePolicy = ikePolicyIdentityModel + vpnGatewayConnectionPatchModel.IpsecPolicy = iPsecPolicyIdentityModel + vpnGatewayConnectionPatchModelAsPatch, asPatchErr := vpnGatewayConnectionPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateVPNGatewayConnectionOptions model updateVPNGatewayConnectionOptionsModel := new(vpcv1.UpdateVPNGatewayConnectionOptions) updateVPNGatewayConnectionOptionsModel.VPNGatewayID = core.StringPtr("testString") updateVPNGatewayConnectionOptionsModel.ID = core.StringPtr("testString") - updateVPNGatewayConnectionOptionsModel.AdminStateUp = core.BoolPtr(true) - updateVPNGatewayConnectionOptionsModel.PeerAddress = core.StringPtr("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.Name = core.StringPtr("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.Psk = core.StringPtr("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.DeadPeerDetection = vpnGatewayConnectionDpdPrototypeModel - updateVPNGatewayConnectionOptionsModel.IkePolicy = ikePolicyIdentityModel - updateVPNGatewayConnectionOptionsModel.IpsecPolicy = iPsecPolicyIdentityModel + updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch = vpnGatewayConnectionPatchModelAsPatch updateVPNGatewayConnectionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -21702,7 +22137,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21748,7 +22183,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionLocalCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21831,7 +22266,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(removeVPNGatewayConnectionLocalCIDRPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21912,7 +22347,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(checkVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(checkVPNGatewayConnectionLocalCIDRPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -21993,7 +22428,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addVPNGatewayConnectionLocalCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(addVPNGatewayConnectionLocalCIDRPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22073,7 +22508,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22119,7 +22554,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listVPNGatewayConnectionPeerCIDRsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22202,7 +22637,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(removeVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(removeVPNGatewayConnectionPeerCIDRPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22283,7 +22718,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(checkVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(checkVPNGatewayConnectionPeerCIDRPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22364,7 +22799,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(addVPNGatewayConnectionPeerCIDRPath)) + Expect(req.URL.EscapedPath()).To(Equal(addVPNGatewayConnectionPeerCIDRPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22559,7 +22994,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22609,7 +23044,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerProfilesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerProfilesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22688,7 +23123,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22733,7 +23168,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerProfilePath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerProfilePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22813,7 +23248,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22857,7 +23292,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -22928,7 +23363,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23034,7 +23469,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23237,7 +23672,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23311,7 +23746,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23356,7 +23791,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23436,7 +23871,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23456,10 +23891,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerPatch model + loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) + loadBalancerPatchModel.Name = core.StringPtr("my-load-balancer") + loadBalancerPatchModelAsPatch, asPatchErr := loadBalancerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerOptions model updateLoadBalancerOptionsModel := new(vpcv1.UpdateLoadBalancerOptions) updateLoadBalancerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerOptionsModel.Name = core.StringPtr("my-load-balancer") + updateLoadBalancerOptionsModel.LoadBalancerPatch = loadBalancerPatchModelAsPatch updateLoadBalancerOptionsModel.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 := vpcService.UpdateLoadBalancer(updateLoadBalancerOptionsModel) @@ -23482,7 +23923,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23508,10 +23949,16 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the LoadBalancerPatch model + loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) + loadBalancerPatchModel.Name = core.StringPtr("my-load-balancer") + loadBalancerPatchModelAsPatch, asPatchErr := loadBalancerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerOptions model updateLoadBalancerOptionsModel := new(vpcv1.UpdateLoadBalancerOptions) updateLoadBalancerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerOptionsModel.Name = core.StringPtr("my-load-balancer") + updateLoadBalancerOptionsModel.LoadBalancerPatch = loadBalancerPatchModelAsPatch updateLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -23529,10 +23976,16 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerPatch model + loadBalancerPatchModel := new(vpcv1.LoadBalancerPatch) + loadBalancerPatchModel.Name = core.StringPtr("my-load-balancer") + loadBalancerPatchModelAsPatch, asPatchErr := loadBalancerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerOptions model updateLoadBalancerOptionsModel := new(vpcv1.UpdateLoadBalancerOptions) updateLoadBalancerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerOptionsModel.Name = core.StringPtr("my-load-balancer") + updateLoadBalancerOptionsModel.LoadBalancerPatch = loadBalancerPatchModelAsPatch updateLoadBalancerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -23564,7 +24017,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerStatisticsPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerStatisticsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23609,7 +24062,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerStatisticsPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerStatisticsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23689,7 +24142,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23734,7 +24187,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23814,7 +24267,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -23892,7 +24345,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24039,7 +24492,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerListenerPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24115,7 +24568,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24161,7 +24614,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24243,7 +24696,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24271,15 +24724,21 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPatch model + loadBalancerListenerPatchModel := new(vpcv1.LoadBalancerListenerPatch) + loadBalancerListenerPatchModel.ConnectionLimit = core.Int64Ptr(int64(2000)) + loadBalancerListenerPatchModel.Port = core.Int64Ptr(int64(443)) + loadBalancerListenerPatchModel.Protocol = core.StringPtr("http") + loadBalancerListenerPatchModel.CertificateInstance = certificateInstanceIdentityModel + loadBalancerListenerPatchModel.DefaultPool = loadBalancerPoolIdentityModel + loadBalancerListenerPatchModelAsPatch, asPatchErr := loadBalancerListenerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerOptions model updateLoadBalancerListenerOptionsModel := new(vpcv1.UpdateLoadBalancerListenerOptions) updateLoadBalancerListenerOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerOptionsModel.ConnectionLimit = core.Int64Ptr(int64(2000)) - updateLoadBalancerListenerOptionsModel.Port = core.Int64Ptr(int64(443)) - updateLoadBalancerListenerOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerListenerOptionsModel.CertificateInstance = certificateInstanceIdentityModel - updateLoadBalancerListenerOptionsModel.DefaultPool = loadBalancerPoolIdentityModel + updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch = loadBalancerListenerPatchModelAsPatch updateLoadBalancerListenerOptionsModel.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 := vpcService.UpdateLoadBalancerListener(updateLoadBalancerListenerOptionsModel) @@ -24302,7 +24761,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24336,15 +24795,21 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPatch model + loadBalancerListenerPatchModel := new(vpcv1.LoadBalancerListenerPatch) + loadBalancerListenerPatchModel.ConnectionLimit = core.Int64Ptr(int64(2000)) + loadBalancerListenerPatchModel.Port = core.Int64Ptr(int64(443)) + loadBalancerListenerPatchModel.Protocol = core.StringPtr("http") + loadBalancerListenerPatchModel.CertificateInstance = certificateInstanceIdentityModel + loadBalancerListenerPatchModel.DefaultPool = loadBalancerPoolIdentityModel + loadBalancerListenerPatchModelAsPatch, asPatchErr := loadBalancerListenerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerOptions model updateLoadBalancerListenerOptionsModel := new(vpcv1.UpdateLoadBalancerListenerOptions) updateLoadBalancerListenerOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerOptionsModel.ConnectionLimit = core.Int64Ptr(int64(2000)) - updateLoadBalancerListenerOptionsModel.Port = core.Int64Ptr(int64(443)) - updateLoadBalancerListenerOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerListenerOptionsModel.CertificateInstance = certificateInstanceIdentityModel - updateLoadBalancerListenerOptionsModel.DefaultPool = loadBalancerPoolIdentityModel + updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch = loadBalancerListenerPatchModelAsPatch updateLoadBalancerListenerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -24370,15 +24835,21 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPatch model + loadBalancerListenerPatchModel := new(vpcv1.LoadBalancerListenerPatch) + loadBalancerListenerPatchModel.ConnectionLimit = core.Int64Ptr(int64(2000)) + loadBalancerListenerPatchModel.Port = core.Int64Ptr(int64(443)) + loadBalancerListenerPatchModel.Protocol = core.StringPtr("http") + loadBalancerListenerPatchModel.CertificateInstance = certificateInstanceIdentityModel + loadBalancerListenerPatchModel.DefaultPool = loadBalancerPoolIdentityModel + loadBalancerListenerPatchModelAsPatch, asPatchErr := loadBalancerListenerPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerOptions model updateLoadBalancerListenerOptionsModel := new(vpcv1.UpdateLoadBalancerListenerOptions) updateLoadBalancerListenerOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerOptionsModel.ConnectionLimit = core.Int64Ptr(int64(2000)) - updateLoadBalancerListenerOptionsModel.Port = core.Int64Ptr(int64(443)) - updateLoadBalancerListenerOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerListenerOptionsModel.CertificateInstance = certificateInstanceIdentityModel - updateLoadBalancerListenerOptionsModel.DefaultPool = loadBalancerPoolIdentityModel + updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch = loadBalancerListenerPatchModelAsPatch updateLoadBalancerListenerOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -24410,7 +24881,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24456,7 +24927,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPoliciesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPoliciesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24538,7 +25009,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24600,7 +25071,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24715,7 +25186,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24793,7 +25264,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24840,7 +25311,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24924,7 +25395,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -24948,14 +25419,20 @@ var _ = Describe(`VpcV1`, func() { loadBalancerListenerPolicyPatchTargetModel := new(vpcv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPolicyPatch model + loadBalancerListenerPolicyPatchModel := new(vpcv1.LoadBalancerListenerPolicyPatch) + loadBalancerListenerPolicyPatchModel.Name = core.StringPtr("my-policy") + loadBalancerListenerPolicyPatchModel.Priority = core.Int64Ptr(int64(5)) + loadBalancerListenerPolicyPatchModel.Target = loadBalancerListenerPolicyPatchTargetModel + loadBalancerListenerPolicyPatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model updateLoadBalancerListenerPolicyOptionsModel := new(vpcv1.UpdateLoadBalancerListenerPolicyOptions) updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyOptionsModel.Name = core.StringPtr("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.Priority = core.Int64Ptr(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.Target = loadBalancerListenerPolicyPatchTargetModel + updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatchModelAsPatch updateLoadBalancerListenerPolicyOptionsModel.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 := vpcService.UpdateLoadBalancerListenerPolicy(updateLoadBalancerListenerPolicyOptionsModel) @@ -24978,7 +25455,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25008,14 +25485,20 @@ var _ = Describe(`VpcV1`, func() { loadBalancerListenerPolicyPatchTargetModel := new(vpcv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPolicyPatch model + loadBalancerListenerPolicyPatchModel := new(vpcv1.LoadBalancerListenerPolicyPatch) + loadBalancerListenerPolicyPatchModel.Name = core.StringPtr("my-policy") + loadBalancerListenerPolicyPatchModel.Priority = core.Int64Ptr(int64(5)) + loadBalancerListenerPolicyPatchModel.Target = loadBalancerListenerPolicyPatchTargetModel + loadBalancerListenerPolicyPatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model updateLoadBalancerListenerPolicyOptionsModel := new(vpcv1.UpdateLoadBalancerListenerPolicyOptions) updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyOptionsModel.Name = core.StringPtr("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.Priority = core.Int64Ptr(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.Target = loadBalancerListenerPolicyPatchTargetModel + updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatchModelAsPatch updateLoadBalancerListenerPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -25037,14 +25520,20 @@ var _ = Describe(`VpcV1`, func() { loadBalancerListenerPolicyPatchTargetModel := new(vpcv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") + // Construct an instance of the LoadBalancerListenerPolicyPatch model + loadBalancerListenerPolicyPatchModel := new(vpcv1.LoadBalancerListenerPolicyPatch) + loadBalancerListenerPolicyPatchModel.Name = core.StringPtr("my-policy") + loadBalancerListenerPolicyPatchModel.Priority = core.Int64Ptr(int64(5)) + loadBalancerListenerPolicyPatchModel.Target = loadBalancerListenerPolicyPatchTargetModel + loadBalancerListenerPolicyPatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model updateLoadBalancerListenerPolicyOptionsModel := new(vpcv1.UpdateLoadBalancerListenerPolicyOptions) updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyOptionsModel.Name = core.StringPtr("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.Priority = core.Int64Ptr(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.Target = loadBalancerListenerPolicyPatchTargetModel + updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch = loadBalancerListenerPolicyPatchModelAsPatch updateLoadBalancerListenerPolicyOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -25076,7 +25565,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPolicyRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPolicyRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25123,7 +25612,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerListenerPolicyRulesPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerListenerPolicyRulesPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25207,7 +25696,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25258,7 +25747,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25351,7 +25840,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25431,7 +25920,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25479,7 +25968,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25565,7 +26054,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25585,16 +26074,22 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + loadBalancerListenerPolicyRulePatchModel := new(vpcv1.LoadBalancerListenerPolicyRulePatch) + loadBalancerListenerPolicyRulePatchModel.Condition = core.StringPtr("contains") + loadBalancerListenerPolicyRulePatchModel.Field = core.StringPtr("MY-APP-HEADER") + loadBalancerListenerPolicyRulePatchModel.Type = core.StringPtr("header") + loadBalancerListenerPolicyRulePatchModel.Value = core.StringPtr("testString") + loadBalancerListenerPolicyRulePatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model updateLoadBalancerListenerPolicyRuleOptionsModel := new(vpcv1.UpdateLoadBalancerListenerPolicyRuleOptions) updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.Condition = core.StringPtr("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.Field = core.StringPtr("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.Type = core.StringPtr("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.Value = core.StringPtr("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatchModelAsPatch updateLoadBalancerListenerPolicyRuleOptionsModel.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 := vpcService.UpdateLoadBalancerListenerPolicyRule(updateLoadBalancerListenerPolicyRuleOptionsModel) @@ -25617,7 +26112,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerListenerPolicyRulePath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerListenerPolicyRulePath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25643,16 +26138,22 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + loadBalancerListenerPolicyRulePatchModel := new(vpcv1.LoadBalancerListenerPolicyRulePatch) + loadBalancerListenerPolicyRulePatchModel.Condition = core.StringPtr("contains") + loadBalancerListenerPolicyRulePatchModel.Field = core.StringPtr("MY-APP-HEADER") + loadBalancerListenerPolicyRulePatchModel.Type = core.StringPtr("header") + loadBalancerListenerPolicyRulePatchModel.Value = core.StringPtr("testString") + loadBalancerListenerPolicyRulePatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model updateLoadBalancerListenerPolicyRuleOptionsModel := new(vpcv1.UpdateLoadBalancerListenerPolicyRuleOptions) updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.Condition = core.StringPtr("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.Field = core.StringPtr("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.Type = core.StringPtr("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.Value = core.StringPtr("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatchModelAsPatch updateLoadBalancerListenerPolicyRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -25670,16 +26171,22 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the LoadBalancerListenerPolicyRulePatch model + loadBalancerListenerPolicyRulePatchModel := new(vpcv1.LoadBalancerListenerPolicyRulePatch) + loadBalancerListenerPolicyRulePatchModel.Condition = core.StringPtr("contains") + loadBalancerListenerPolicyRulePatchModel.Field = core.StringPtr("MY-APP-HEADER") + loadBalancerListenerPolicyRulePatchModel.Type = core.StringPtr("header") + loadBalancerListenerPolicyRulePatchModel.Value = core.StringPtr("testString") + loadBalancerListenerPolicyRulePatchModelAsPatch, asPatchErr := loadBalancerListenerPolicyRulePatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerListenerPolicyRuleOptions model updateLoadBalancerListenerPolicyRuleOptionsModel := new(vpcv1.UpdateLoadBalancerListenerPolicyRuleOptions) updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID = core.StringPtr("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.Condition = core.StringPtr("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.Field = core.StringPtr("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.Type = core.StringPtr("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.Value = core.StringPtr("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch = loadBalancerListenerPolicyRulePatchModelAsPatch updateLoadBalancerListenerPolicyRuleOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -25711,7 +26218,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25756,7 +26263,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25836,7 +26343,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -25910,7 +26417,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26049,7 +26556,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerPoolPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26125,7 +26632,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26171,7 +26678,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26253,7 +26760,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26286,15 +26793,21 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolSessionPersistencePatchModel := new(vpcv1.LoadBalancerPoolSessionPersistencePatch) loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") + // Construct an instance of the LoadBalancerPoolPatch model + loadBalancerPoolPatchModel := new(vpcv1.LoadBalancerPoolPatch) + loadBalancerPoolPatchModel.Name = core.StringPtr("my-load-balancer-pool") + loadBalancerPoolPatchModel.Algorithm = core.StringPtr("least_connections") + loadBalancerPoolPatchModel.Protocol = core.StringPtr("http") + loadBalancerPoolPatchModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel + loadBalancerPoolPatchModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + loadBalancerPoolPatchModelAsPatch, asPatchErr := loadBalancerPoolPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolOptions model updateLoadBalancerPoolOptionsModel := new(vpcv1.UpdateLoadBalancerPoolOptions) updateLoadBalancerPoolOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolOptionsModel.Name = core.StringPtr("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.Algorithm = core.StringPtr("least_connections") - updateLoadBalancerPoolOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerPoolOptionsModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel - updateLoadBalancerPoolOptionsModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch = loadBalancerPoolPatchModelAsPatch updateLoadBalancerPoolOptionsModel.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 := vpcService.UpdateLoadBalancerPool(updateLoadBalancerPoolOptionsModel) @@ -26317,7 +26830,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26356,15 +26869,21 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolSessionPersistencePatchModel := new(vpcv1.LoadBalancerPoolSessionPersistencePatch) loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") + // Construct an instance of the LoadBalancerPoolPatch model + loadBalancerPoolPatchModel := new(vpcv1.LoadBalancerPoolPatch) + loadBalancerPoolPatchModel.Name = core.StringPtr("my-load-balancer-pool") + loadBalancerPoolPatchModel.Algorithm = core.StringPtr("least_connections") + loadBalancerPoolPatchModel.Protocol = core.StringPtr("http") + loadBalancerPoolPatchModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel + loadBalancerPoolPatchModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + loadBalancerPoolPatchModelAsPatch, asPatchErr := loadBalancerPoolPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolOptions model updateLoadBalancerPoolOptionsModel := new(vpcv1.UpdateLoadBalancerPoolOptions) updateLoadBalancerPoolOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolOptionsModel.Name = core.StringPtr("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.Algorithm = core.StringPtr("least_connections") - updateLoadBalancerPoolOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerPoolOptionsModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel - updateLoadBalancerPoolOptionsModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch = loadBalancerPoolPatchModelAsPatch updateLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -26395,15 +26914,21 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolSessionPersistencePatchModel := new(vpcv1.LoadBalancerPoolSessionPersistencePatch) loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") + // Construct an instance of the LoadBalancerPoolPatch model + loadBalancerPoolPatchModel := new(vpcv1.LoadBalancerPoolPatch) + loadBalancerPoolPatchModel.Name = core.StringPtr("my-load-balancer-pool") + loadBalancerPoolPatchModel.Algorithm = core.StringPtr("least_connections") + loadBalancerPoolPatchModel.Protocol = core.StringPtr("http") + loadBalancerPoolPatchModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel + loadBalancerPoolPatchModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + loadBalancerPoolPatchModelAsPatch, asPatchErr := loadBalancerPoolPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolOptions model updateLoadBalancerPoolOptionsModel := new(vpcv1.UpdateLoadBalancerPoolOptions) updateLoadBalancerPoolOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolOptionsModel.Name = core.StringPtr("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.Algorithm = core.StringPtr("least_connections") - updateLoadBalancerPoolOptionsModel.Protocol = core.StringPtr("http") - updateLoadBalancerPoolOptionsModel.HealthMonitor = loadBalancerPoolHealthMonitorPatchModel - updateLoadBalancerPoolOptionsModel.SessionPersistence = loadBalancerPoolSessionPersistencePatchModel + updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch = loadBalancerPoolPatchModelAsPatch updateLoadBalancerPoolOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -26435,7 +26960,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26481,7 +27006,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(listLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26563,7 +27088,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26616,7 +27141,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(createLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26712,7 +27237,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26769,7 +27294,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(replaceLoadBalancerPoolMembersPath)) + Expect(req.URL.EscapedPath()).To(Equal(replaceLoadBalancerPoolMembersPath)) Expect(req.Method).To(Equal("PUT")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26874,7 +27399,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26952,7 +27477,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -26999,7 +27524,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(getLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27083,7 +27608,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27107,14 +27632,20 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + // Construct an instance of the LoadBalancerPoolMemberPatch model + loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) + loadBalancerPoolMemberPatchModel.Port = core.Int64Ptr(int64(80)) + loadBalancerPoolMemberPatchModel.Weight = core.Int64Ptr(int64(50)) + loadBalancerPoolMemberPatchModel.Target = loadBalancerPoolMemberTargetPrototypeModel + loadBalancerPoolMemberPatchModelAsPatch, asPatchErr := loadBalancerPoolMemberPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model updateLoadBalancerPoolMemberOptionsModel := new(vpcv1.UpdateLoadBalancerPoolMemberOptions) updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.PoolID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolMemberOptionsModel.Port = core.Int64Ptr(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.Weight = core.Int64Ptr(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.Target = loadBalancerPoolMemberTargetPrototypeModel + updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatchModelAsPatch updateLoadBalancerPoolMemberOptionsModel.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 := vpcService.UpdateLoadBalancerPoolMember(updateLoadBalancerPoolMemberOptionsModel) @@ -27137,7 +27668,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateLoadBalancerPoolMemberPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateLoadBalancerPoolMemberPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27167,14 +27698,20 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + // Construct an instance of the LoadBalancerPoolMemberPatch model + loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) + loadBalancerPoolMemberPatchModel.Port = core.Int64Ptr(int64(80)) + loadBalancerPoolMemberPatchModel.Weight = core.Int64Ptr(int64(50)) + loadBalancerPoolMemberPatchModel.Target = loadBalancerPoolMemberTargetPrototypeModel + loadBalancerPoolMemberPatchModelAsPatch, asPatchErr := loadBalancerPoolMemberPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model updateLoadBalancerPoolMemberOptionsModel := new(vpcv1.UpdateLoadBalancerPoolMemberOptions) updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.PoolID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolMemberOptionsModel.Port = core.Int64Ptr(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.Weight = core.Int64Ptr(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.Target = loadBalancerPoolMemberTargetPrototypeModel + updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatchModelAsPatch updateLoadBalancerPoolMemberOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -27196,14 +27733,20 @@ var _ = Describe(`VpcV1`, func() { loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") + // Construct an instance of the LoadBalancerPoolMemberPatch model + loadBalancerPoolMemberPatchModel := new(vpcv1.LoadBalancerPoolMemberPatch) + loadBalancerPoolMemberPatchModel.Port = core.Int64Ptr(int64(80)) + loadBalancerPoolMemberPatchModel.Weight = core.Int64Ptr(int64(50)) + loadBalancerPoolMemberPatchModel.Target = loadBalancerPoolMemberTargetPrototypeModel + loadBalancerPoolMemberPatchModelAsPatch, asPatchErr := loadBalancerPoolMemberPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model updateLoadBalancerPoolMemberOptionsModel := new(vpcv1.UpdateLoadBalancerPoolMemberOptions) updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.PoolID = core.StringPtr("testString") updateLoadBalancerPoolMemberOptionsModel.ID = core.StringPtr("testString") - updateLoadBalancerPoolMemberOptionsModel.Port = core.Int64Ptr(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.Weight = core.Int64Ptr(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.Target = loadBalancerPoolMemberTargetPrototypeModel + updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch = loadBalancerPoolMemberPatchModelAsPatch updateLoadBalancerPoolMemberOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -27350,7 +27893,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listFlowLogCollectorsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listFlowLogCollectorsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27421,7 +27964,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(listFlowLogCollectorsPath)) + Expect(req.URL.EscapedPath()).To(Equal(listFlowLogCollectorsPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27528,7 +28071,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(createFlowLogCollectorPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27589,7 +28132,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(createFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(createFlowLogCollectorPath)) Expect(req.Method).To(Equal("POST")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27702,7 +28245,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(deleteFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(deleteFlowLogCollectorPath)) Expect(req.Method).To(Equal("DELETE")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27776,7 +28319,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(getFlowLogCollectorPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27821,7 +28364,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(getFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(getFlowLogCollectorPath)) Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27901,7 +28444,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateFlowLogCollectorPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27921,11 +28464,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the FlowLogCollectorPatch model + flowLogCollectorPatchModel := new(vpcv1.FlowLogCollectorPatch) + flowLogCollectorPatchModel.Name = core.StringPtr("my-flow-log-collector") + flowLogCollectorPatchModel.Active = core.BoolPtr(true) + flowLogCollectorPatchModelAsPatch, asPatchErr := flowLogCollectorPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateFlowLogCollectorOptions model updateFlowLogCollectorOptionsModel := new(vpcv1.UpdateFlowLogCollectorOptions) updateFlowLogCollectorOptionsModel.ID = core.StringPtr("testString") - updateFlowLogCollectorOptionsModel.Name = core.StringPtr("my-flow-log-collector") - updateFlowLogCollectorOptionsModel.Active = core.BoolPtr(true) + updateFlowLogCollectorOptionsModel.FlowLogCollectorPatch = flowLogCollectorPatchModelAsPatch updateFlowLogCollectorOptionsModel.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 := vpcService.UpdateFlowLogCollector(updateFlowLogCollectorOptionsModel) @@ -27948,7 +28497,7 @@ var _ = Describe(`VpcV1`, func() { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.Path).To(Equal(updateFlowLogCollectorPath)) + Expect(req.URL.EscapedPath()).To(Equal(updateFlowLogCollectorPath)) Expect(req.Method).To(Equal("PATCH")) Expect(req.URL.Query()["version"]).To(Equal([]string{"testString"})) @@ -27974,11 +28523,17 @@ var _ = Describe(`VpcV1`, func() { Expect(response).To(BeNil()) Expect(result).To(BeNil()) + // Construct an instance of the FlowLogCollectorPatch model + flowLogCollectorPatchModel := new(vpcv1.FlowLogCollectorPatch) + flowLogCollectorPatchModel.Name = core.StringPtr("my-flow-log-collector") + flowLogCollectorPatchModel.Active = core.BoolPtr(true) + flowLogCollectorPatchModelAsPatch, asPatchErr := flowLogCollectorPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateFlowLogCollectorOptions model updateFlowLogCollectorOptionsModel := new(vpcv1.UpdateFlowLogCollectorOptions) updateFlowLogCollectorOptionsModel.ID = core.StringPtr("testString") - updateFlowLogCollectorOptionsModel.Name = core.StringPtr("my-flow-log-collector") - updateFlowLogCollectorOptionsModel.Active = core.BoolPtr(true) + updateFlowLogCollectorOptionsModel.FlowLogCollectorPatch = flowLogCollectorPatchModelAsPatch updateFlowLogCollectorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -27996,11 +28551,17 @@ var _ = Describe(`VpcV1`, func() { Expect(serviceErr).To(BeNil()) Expect(vpcService).ToNot(BeNil()) + // Construct an instance of the FlowLogCollectorPatch model + flowLogCollectorPatchModel := new(vpcv1.FlowLogCollectorPatch) + flowLogCollectorPatchModel.Name = core.StringPtr("my-flow-log-collector") + flowLogCollectorPatchModel.Active = core.BoolPtr(true) + flowLogCollectorPatchModelAsPatch, asPatchErr := flowLogCollectorPatchModel.AsPatch() + Expect(asPatchErr).To(BeNil()) + // Construct an instance of the UpdateFlowLogCollectorOptions model updateFlowLogCollectorOptionsModel := new(vpcv1.UpdateFlowLogCollectorOptions) updateFlowLogCollectorOptionsModel.ID = core.StringPtr("testString") - updateFlowLogCollectorOptionsModel.Name = core.StringPtr("my-flow-log-collector") - updateFlowLogCollectorOptionsModel.Active = core.BoolPtr(true) + updateFlowLogCollectorOptionsModel.FlowLogCollectorPatch = flowLogCollectorPatchModelAsPatch updateFlowLogCollectorOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := vpcService.SetServiceURL("") @@ -28143,21 +28704,21 @@ var _ = Describe(`VpcV1`, func() { resourceGroupIdentityModel.ID = core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345") Expect(resourceGroupIdentityModel.ID).To(Equal(core.StringPtr("fee82deba12e4c0fb69c3b09d1f12345"))) - // Construct an instance of the ZoneIdentityByName model - zoneIdentityModel := new(vpcv1.ZoneIdentityByName) - Expect(zoneIdentityModel).ToNot(BeNil()) - zoneIdentityModel.Name = core.StringPtr("us-south-1") - Expect(zoneIdentityModel.Name).To(Equal(core.StringPtr("us-south-1"))) + // Construct an instance of the FloatingIPByTargetTargetNetworkInterfaceIdentityByID model + floatingIPByTargetTargetModel := new(vpcv1.FloatingIPByTargetTargetNetworkInterfaceIdentityByID) + Expect(floatingIPByTargetTargetModel).ToNot(BeNil()) + floatingIPByTargetTargetModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") + Expect(floatingIPByTargetTargetModel.ID).To(Equal(core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793"))) - // Construct an instance of the FloatingIPPrototypeFloatingIPByZone model - floatingIPPrototypeModel := new(vpcv1.FloatingIPPrototypeFloatingIPByZone) + // Construct an instance of the FloatingIPPrototypeFloatingIPByTarget model + floatingIPPrototypeModel := new(vpcv1.FloatingIPPrototypeFloatingIPByTarget) Expect(floatingIPPrototypeModel).ToNot(BeNil()) floatingIPPrototypeModel.Name = core.StringPtr("my-new-floating-ip") floatingIPPrototypeModel.ResourceGroup = resourceGroupIdentityModel - floatingIPPrototypeModel.Zone = zoneIdentityModel + floatingIPPrototypeModel.Target = floatingIPByTargetTargetModel Expect(floatingIPPrototypeModel.Name).To(Equal(core.StringPtr("my-new-floating-ip"))) Expect(floatingIPPrototypeModel.ResourceGroup).To(Equal(resourceGroupIdentityModel)) - Expect(floatingIPPrototypeModel.Zone).To(Equal(zoneIdentityModel)) + Expect(floatingIPPrototypeModel.Target).To(Equal(floatingIPByTargetTargetModel)) // Construct an instance of the CreateFloatingIPOptions model var floatingIPPrototype vpcv1.FloatingIPPrototypeIntf = nil @@ -28237,6 +28798,12 @@ var _ = Describe(`VpcV1`, func() { Expect(createIkePolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateImageOptions successfully`, func() { + // Construct an instance of the EncryptionKeyReference model + encryptionKeyReferenceModel := new(vpcv1.EncryptionKeyReference) + Expect(encryptionKeyReferenceModel).ToNot(BeNil()) + encryptionKeyReferenceModel.CRN = core.StringPtr("crn:v1:bluemix:public:kms:us-south:a/dffc98a0f1f0f95f6613b3b752286b87:e4a29d1a-2ef0-42a6-8fd2-350deb1c647e:key:5437653b-c4b1-447f-9646-b2a2a4cd6179") + Expect(encryptionKeyReferenceModel.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()) @@ -28259,10 +28826,14 @@ var _ = Describe(`VpcV1`, func() { imagePrototypeModel := new(vpcv1.ImagePrototypeImageByFile) Expect(imagePrototypeModel).ToNot(BeNil()) imagePrototypeModel.Name = core.StringPtr("my-image") + imagePrototypeModel.EncryptedDataKey = core.StringPtr("testString") + imagePrototypeModel.EncryptionKey = encryptionKeyReferenceModel imagePrototypeModel.ResourceGroup = resourceGroupIdentityModel imagePrototypeModel.File = imageFilePrototypeModel imagePrototypeModel.OperatingSystem = operatingSystemIdentityModel Expect(imagePrototypeModel.Name).To(Equal(core.StringPtr("my-image"))) + Expect(imagePrototypeModel.EncryptedDataKey).To(Equal(core.StringPtr("testString"))) + Expect(imagePrototypeModel.EncryptionKey).To(Equal(encryptionKeyReferenceModel)) Expect(imagePrototypeModel.ResourceGroup).To(Equal(resourceGroupIdentityModel)) Expect(imagePrototypeModel.File).To(Equal(imageFilePrototypeModel)) Expect(imagePrototypeModel.OperatingSystem).To(Equal(operatingSystemIdentityModel)) @@ -28482,11 +29053,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) Expect(volumeAttachmentPrototypeInstanceContextModel).ToNot(BeNil()) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel - Expect(volumeAttachmentPrototypeInstanceContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(volumeAttachmentPrototypeInstanceContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceContextModel.Volume).To(Equal(volumeAttachmentPrototypeInstanceContextVolumeModel)) // Construct an instance of the VPCIdentityByID model @@ -28536,11 +29107,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) Expect(volumeAttachmentPrototypeInstanceByImageContextModel).ToNot(BeNil()) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel - Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Volume).To(Equal(volumePrototypeInstanceByImageContextModel)) // Construct an instance of the ImageIdentityByID model @@ -28632,11 +29203,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceContext model volumeAttachmentPrototypeInstanceContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceContext) Expect(volumeAttachmentPrototypeInstanceContextModel).ToNot(BeNil()) - volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceContextModel.Volume = volumeAttachmentPrototypeInstanceContextVolumeModel - Expect(volumeAttachmentPrototypeInstanceContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceContextModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(volumeAttachmentPrototypeInstanceContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceContextModel.Volume).To(Equal(volumeAttachmentPrototypeInstanceContextVolumeModel)) // Construct an instance of the VPCIdentityByID model @@ -28686,11 +29257,11 @@ var _ = Describe(`VpcV1`, func() { // Construct an instance of the VolumeAttachmentPrototypeInstanceByImageContext model volumeAttachmentPrototypeInstanceByImageContextModel := new(vpcv1.VolumeAttachmentPrototypeInstanceByImageContext) Expect(volumeAttachmentPrototypeInstanceByImageContextModel).ToNot(BeNil()) - volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete = core.BoolPtr(true) + volumeAttachmentPrototypeInstanceByImageContextModel.Name = core.StringPtr("my-volume-attachment") volumeAttachmentPrototypeInstanceByImageContextModel.Volume = volumePrototypeInstanceByImageContextModel - Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceByImageContextModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(volumeAttachmentPrototypeInstanceByImageContextModel.Volume).To(Equal(volumePrototypeInstanceByImageContextModel)) // Construct an instance of the ImageIdentityByID model @@ -28749,14 +29320,14 @@ var _ = Describe(`VpcV1`, func() { createInstanceVolumeAttachmentOptionsModel := vpcService.NewCreateInstanceVolumeAttachmentOptions(instanceID, createInstanceVolumeAttachmentOptionsVolume) createInstanceVolumeAttachmentOptionsModel.SetInstanceID("testString") createInstanceVolumeAttachmentOptionsModel.SetVolume(volumeIdentityModel) - createInstanceVolumeAttachmentOptionsModel.SetName("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.SetDeleteVolumeOnInstanceDelete(true) + createInstanceVolumeAttachmentOptionsModel.SetName("my-volume-attachment") createInstanceVolumeAttachmentOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createInstanceVolumeAttachmentOptionsModel).ToNot(BeNil()) Expect(createInstanceVolumeAttachmentOptionsModel.InstanceID).To(Equal(core.StringPtr("testString"))) Expect(createInstanceVolumeAttachmentOptionsModel.Volume).To(Equal(volumeIdentityModel)) - Expect(createInstanceVolumeAttachmentOptionsModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(createInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(createInstanceVolumeAttachmentOptionsModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) Expect(createInstanceVolumeAttachmentOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateIpsecPolicyOptions successfully`, func() { @@ -30034,6 +30605,12 @@ var _ = Describe(`VpcV1`, func() { Expect(deleteVPNGatewayOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(deleteVPNGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) + It(`Invoke NewEncryptionKeyReference 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 := vpcService.NewEncryptionKeyReference(crn) + Expect(model).ToNot(BeNil()) + Expect(err).To(BeNil()) + }) It(`Invoke NewGetFloatingIPOptions successfully`, func() { // Construct an instance of the GetFloatingIPOptions model id := "testString" @@ -31338,96 +31915,71 @@ var _ = Describe(`VpcV1`, func() { Expect(unsetSubnetPublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateFloatingIPOptions successfully`, func() { - // Construct an instance of the FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID model - floatingIPPatchTargetNetworkInterfaceIdentityModel := new(vpcv1.FloatingIPPatchTargetNetworkInterfaceIdentityNetworkInterfaceIdentityByID) - Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel).ToNot(BeNil()) - floatingIPPatchTargetNetworkInterfaceIdentityModel.ID = core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793") - Expect(floatingIPPatchTargetNetworkInterfaceIdentityModel.ID).To(Equal(core.StringPtr("69e55145-cc7d-4d8e-9e1f-cc3fb60b1793"))) - // Construct an instance of the UpdateFloatingIPOptions model id := "testString" - updateFloatingIPOptionsModel := vpcService.NewUpdateFloatingIPOptions(id) + floatingIPPatch := make(map[string]interface{}) + updateFloatingIPOptionsModel := vpcService.NewUpdateFloatingIPOptions(id, floatingIPPatch) updateFloatingIPOptionsModel.SetID("testString") - updateFloatingIPOptionsModel.SetName("my-floating-ip") - updateFloatingIPOptionsModel.SetTarget(floatingIPPatchTargetNetworkInterfaceIdentityModel) + updateFloatingIPOptionsModel.SetFloatingIPPatch(make(map[string]interface{})) 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(floatingIPPatchTargetNetworkInterfaceIdentityModel)) + Expect(updateFloatingIPOptionsModel.FloatingIPPatch).To(Equal(make(map[string]interface{}))) Expect(updateFloatingIPOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateFlowLogCollectorOptions successfully`, func() { // Construct an instance of the UpdateFlowLogCollectorOptions model id := "testString" - updateFlowLogCollectorOptionsModel := vpcService.NewUpdateFlowLogCollectorOptions(id) + flowLogCollectorPatch := make(map[string]interface{}) + updateFlowLogCollectorOptionsModel := vpcService.NewUpdateFlowLogCollectorOptions(id, flowLogCollectorPatch) updateFlowLogCollectorOptionsModel.SetID("testString") - updateFlowLogCollectorOptionsModel.SetName("my-flow-log-collector") - updateFlowLogCollectorOptionsModel.SetActive(true) + updateFlowLogCollectorOptionsModel.SetFlowLogCollectorPatch(make(map[string]interface{})) updateFlowLogCollectorOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateFlowLogCollectorOptionsModel).ToNot(BeNil()) Expect(updateFlowLogCollectorOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateFlowLogCollectorOptionsModel.Name).To(Equal(core.StringPtr("my-flow-log-collector"))) - Expect(updateFlowLogCollectorOptionsModel.Active).To(Equal(core.BoolPtr(true))) + Expect(updateFlowLogCollectorOptionsModel.FlowLogCollectorPatch).To(Equal(make(map[string]interface{}))) Expect(updateFlowLogCollectorOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateIkePolicyOptions successfully`, func() { // Construct an instance of the UpdateIkePolicyOptions model id := "testString" - updateIkePolicyOptionsModel := vpcService.NewUpdateIkePolicyOptions(id) + ikePolicyPatch := make(map[string]interface{}) + updateIkePolicyOptionsModel := vpcService.NewUpdateIkePolicyOptions(id, ikePolicyPatch) updateIkePolicyOptionsModel.SetID("testString") - updateIkePolicyOptionsModel.SetName("my-ike-policy") - updateIkePolicyOptionsModel.SetAuthenticationAlgorithm("md5") - updateIkePolicyOptionsModel.SetDhGroup(int64(2)) - updateIkePolicyOptionsModel.SetEncryptionAlgorithm("triple_des") - updateIkePolicyOptionsModel.SetIkeVersion(int64(1)) - updateIkePolicyOptionsModel.SetKeyLifetime(int64(28800)) + updateIkePolicyOptionsModel.SetIkePolicyPatch(make(map[string]interface{})) updateIkePolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateIkePolicyOptionsModel).ToNot(BeNil()) Expect(updateIkePolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateIkePolicyOptionsModel.Name).To(Equal(core.StringPtr("my-ike-policy"))) - Expect(updateIkePolicyOptionsModel.AuthenticationAlgorithm).To(Equal(core.StringPtr("md5"))) - Expect(updateIkePolicyOptionsModel.DhGroup).To(Equal(core.Int64Ptr(int64(2)))) - Expect(updateIkePolicyOptionsModel.EncryptionAlgorithm).To(Equal(core.StringPtr("triple_des"))) - Expect(updateIkePolicyOptionsModel.IkeVersion).To(Equal(core.Int64Ptr(int64(1)))) - Expect(updateIkePolicyOptionsModel.KeyLifetime).To(Equal(core.Int64Ptr(int64(28800)))) + Expect(updateIkePolicyOptionsModel.IkePolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateIkePolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateImageOptions successfully`, func() { // Construct an instance of the UpdateImageOptions model id := "testString" - updateImageOptionsModel := vpcService.NewUpdateImageOptions(id) + imagePatch := make(map[string]interface{}) + updateImageOptionsModel := vpcService.NewUpdateImageOptions(id, imagePatch) updateImageOptionsModel.SetID("testString") - updateImageOptionsModel.SetName("my-image") + updateImageOptionsModel.SetImagePatch(make(map[string]interface{})) updateImageOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateImageOptionsModel).ToNot(BeNil()) Expect(updateImageOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateImageOptionsModel.Name).To(Equal(core.StringPtr("my-image"))) + Expect(updateImageOptionsModel.ImagePatch).To(Equal(make(map[string]interface{}))) Expect(updateImageOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceGroupManagerOptions successfully`, func() { // Construct an instance of the UpdateInstanceGroupManagerOptions model instanceGroupID := "testString" id := "testString" - updateInstanceGroupManagerOptionsModel := vpcService.NewUpdateInstanceGroupManagerOptions(instanceGroupID, id) + instanceGroupManagerPatch := make(map[string]interface{}) + updateInstanceGroupManagerOptionsModel := vpcService.NewUpdateInstanceGroupManagerOptions(instanceGroupID, id, instanceGroupManagerPatch) updateInstanceGroupManagerOptionsModel.SetInstanceGroupID("testString") updateInstanceGroupManagerOptionsModel.SetID("testString") - updateInstanceGroupManagerOptionsModel.SetName("my-instance-group-manager") - updateInstanceGroupManagerOptionsModel.SetManagementEnabled(true) - updateInstanceGroupManagerOptionsModel.SetAggregationWindow(int64(120)) - updateInstanceGroupManagerOptionsModel.SetCooldown(int64(210)) - updateInstanceGroupManagerOptionsModel.SetMaxMembershipCount(int64(10)) - updateInstanceGroupManagerOptionsModel.SetMinMembershipCount(int64(10)) + updateInstanceGroupManagerOptionsModel.SetInstanceGroupManagerPatch(make(map[string]interface{})) updateInstanceGroupManagerOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceGroupManagerOptionsModel).ToNot(BeNil()) Expect(updateInstanceGroupManagerOptionsModel.InstanceGroupID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceGroupManagerOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceGroupManagerOptionsModel.Name).To(Equal(core.StringPtr("my-instance-group-manager"))) - Expect(updateInstanceGroupManagerOptionsModel.ManagementEnabled).To(Equal(core.BoolPtr(true))) - Expect(updateInstanceGroupManagerOptionsModel.AggregationWindow).To(Equal(core.Int64Ptr(int64(120)))) - Expect(updateInstanceGroupManagerOptionsModel.Cooldown).To(Equal(core.Int64Ptr(int64(210)))) - Expect(updateInstanceGroupManagerOptionsModel.MaxMembershipCount).To(Equal(core.Int64Ptr(int64(10)))) - Expect(updateInstanceGroupManagerOptionsModel.MinMembershipCount).To(Equal(core.Int64Ptr(int64(10)))) + Expect(updateInstanceGroupManagerOptionsModel.InstanceGroupManagerPatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceGroupManagerOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceGroupManagerPolicyOptions successfully`, func() { @@ -31435,235 +31987,166 @@ var _ = Describe(`VpcV1`, func() { instanceGroupID := "testString" instanceGroupManagerID := "testString" id := "testString" - updateInstanceGroupManagerPolicyOptionsModel := vpcService.NewUpdateInstanceGroupManagerPolicyOptions(instanceGroupID, instanceGroupManagerID, id) + instanceGroupManagerPolicyPatch := make(map[string]interface{}) + updateInstanceGroupManagerPolicyOptionsModel := vpcService.NewUpdateInstanceGroupManagerPolicyOptions(instanceGroupID, instanceGroupManagerID, id, instanceGroupManagerPolicyPatch) updateInstanceGroupManagerPolicyOptionsModel.SetInstanceGroupID("testString") updateInstanceGroupManagerPolicyOptionsModel.SetInstanceGroupManagerID("testString") updateInstanceGroupManagerPolicyOptionsModel.SetID("testString") - updateInstanceGroupManagerPolicyOptionsModel.SetName("my-instance-group-manager-policy") - updateInstanceGroupManagerPolicyOptionsModel.SetMetricType("cpu") - updateInstanceGroupManagerPolicyOptionsModel.SetMetricValue(int64(38)) + updateInstanceGroupManagerPolicyOptionsModel.SetInstanceGroupManagerPolicyPatch(make(map[string]interface{})) updateInstanceGroupManagerPolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceGroupManagerPolicyOptionsModel).ToNot(BeNil()) Expect(updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceGroupManagerPolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceGroupManagerPolicyOptionsModel.Name).To(Equal(core.StringPtr("my-instance-group-manager-policy"))) - Expect(updateInstanceGroupManagerPolicyOptionsModel.MetricType).To(Equal(core.StringPtr("cpu"))) - Expect(updateInstanceGroupManagerPolicyOptionsModel.MetricValue).To(Equal(core.Int64Ptr(int64(38)))) + Expect(updateInstanceGroupManagerPolicyOptionsModel.InstanceGroupManagerPolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceGroupManagerPolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceGroupMembershipOptions successfully`, func() { // Construct an instance of the UpdateInstanceGroupMembershipOptions model instanceGroupID := "testString" id := "testString" - updateInstanceGroupMembershipOptionsModel := vpcService.NewUpdateInstanceGroupMembershipOptions(instanceGroupID, id) + instanceGroupMembershipPatch := make(map[string]interface{}) + updateInstanceGroupMembershipOptionsModel := vpcService.NewUpdateInstanceGroupMembershipOptions(instanceGroupID, id, instanceGroupMembershipPatch) updateInstanceGroupMembershipOptionsModel.SetInstanceGroupID("testString") updateInstanceGroupMembershipOptionsModel.SetID("testString") - updateInstanceGroupMembershipOptionsModel.SetName("my-instance-group-membership") + updateInstanceGroupMembershipOptionsModel.SetInstanceGroupMembershipPatch(make(map[string]interface{})) updateInstanceGroupMembershipOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceGroupMembershipOptionsModel).ToNot(BeNil()) Expect(updateInstanceGroupMembershipOptionsModel.InstanceGroupID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceGroupMembershipOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceGroupMembershipOptionsModel.Name).To(Equal(core.StringPtr("my-instance-group-membership"))) + Expect(updateInstanceGroupMembershipOptionsModel.InstanceGroupMembershipPatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceGroupMembershipOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceGroupOptions successfully`, func() { - // Construct an instance of the InstanceTemplateIdentityByID model - instanceTemplateIdentityModel := new(vpcv1.InstanceTemplateIdentityByID) - Expect(instanceTemplateIdentityModel).ToNot(BeNil()) - instanceTemplateIdentityModel.ID = core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803") - Expect(instanceTemplateIdentityModel.ID).To(Equal(core.StringPtr("a6b1a881-2ce8-41a3-80fc-36316a73f803"))) - - // Construct an instance of the SubnetIdentityByID model - subnetIdentityModel := new(vpcv1.SubnetIdentityByID) - Expect(subnetIdentityModel).ToNot(BeNil()) - subnetIdentityModel.ID = core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e") - Expect(subnetIdentityModel.ID).To(Equal(core.StringPtr("7ec86020-1c6e-4889-b3f0-a15f2e50f87e"))) - - // Construct an instance of the LoadBalancerIdentityByID model - loadBalancerIdentityModel := new(vpcv1.LoadBalancerIdentityByID) - Expect(loadBalancerIdentityModel).ToNot(BeNil()) - loadBalancerIdentityModel.ID = core.StringPtr("dd754295-e9e0-4c9d-bf6c-58fbc59e5727") - Expect(loadBalancerIdentityModel.ID).To(Equal(core.StringPtr("dd754295-e9e0-4c9d-bf6c-58fbc59e5727"))) - - // Construct an instance of the LoadBalancerPoolIdentityByID model - loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) - Expect(loadBalancerPoolIdentityModel).ToNot(BeNil()) - loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") - Expect(loadBalancerPoolIdentityModel.ID).To(Equal(core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004"))) - // Construct an instance of the UpdateInstanceGroupOptions model id := "testString" - updateInstanceGroupOptionsModel := vpcService.NewUpdateInstanceGroupOptions(id) + instanceGroupPatch := make(map[string]interface{}) + updateInstanceGroupOptionsModel := vpcService.NewUpdateInstanceGroupOptions(id, instanceGroupPatch) updateInstanceGroupOptionsModel.SetID("testString") - updateInstanceGroupOptionsModel.SetName("my-instance-group") - updateInstanceGroupOptionsModel.SetMembershipCount(int64(10)) - updateInstanceGroupOptionsModel.SetInstanceTemplate(instanceTemplateIdentityModel) - updateInstanceGroupOptionsModel.SetSubnets([]vpcv1.SubnetIdentityIntf{subnetIdentityModel}) - updateInstanceGroupOptionsModel.SetApplicationPort(int64(22)) - updateInstanceGroupOptionsModel.SetLoadBalancer(loadBalancerIdentityModel) - updateInstanceGroupOptionsModel.SetLoadBalancerPool(loadBalancerPoolIdentityModel) + updateInstanceGroupOptionsModel.SetInstanceGroupPatch(make(map[string]interface{})) updateInstanceGroupOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceGroupOptionsModel).ToNot(BeNil()) Expect(updateInstanceGroupOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceGroupOptionsModel.Name).To(Equal(core.StringPtr("my-instance-group"))) - Expect(updateInstanceGroupOptionsModel.MembershipCount).To(Equal(core.Int64Ptr(int64(10)))) - Expect(updateInstanceGroupOptionsModel.InstanceTemplate).To(Equal(instanceTemplateIdentityModel)) - Expect(updateInstanceGroupOptionsModel.Subnets).To(Equal([]vpcv1.SubnetIdentityIntf{subnetIdentityModel})) - Expect(updateInstanceGroupOptionsModel.ApplicationPort).To(Equal(core.Int64Ptr(int64(22)))) - Expect(updateInstanceGroupOptionsModel.LoadBalancer).To(Equal(loadBalancerIdentityModel)) - Expect(updateInstanceGroupOptionsModel.LoadBalancerPool).To(Equal(loadBalancerPoolIdentityModel)) + Expect(updateInstanceGroupOptionsModel.InstanceGroupPatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceGroupOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceNetworkInterfaceOptions successfully`, func() { // Construct an instance of the UpdateInstanceNetworkInterfaceOptions model instanceID := "testString" id := "testString" - updateInstanceNetworkInterfaceOptionsModel := vpcService.NewUpdateInstanceNetworkInterfaceOptions(instanceID, id) + networkInterfacePatch := make(map[string]interface{}) + updateInstanceNetworkInterfaceOptionsModel := vpcService.NewUpdateInstanceNetworkInterfaceOptions(instanceID, id, networkInterfacePatch) updateInstanceNetworkInterfaceOptionsModel.SetInstanceID("testString") updateInstanceNetworkInterfaceOptionsModel.SetID("testString") - updateInstanceNetworkInterfaceOptionsModel.SetName("my-network-interface") + updateInstanceNetworkInterfaceOptionsModel.SetNetworkInterfacePatch(make(map[string]interface{})) updateInstanceNetworkInterfaceOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceNetworkInterfaceOptionsModel).ToNot(BeNil()) Expect(updateInstanceNetworkInterfaceOptionsModel.InstanceID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceNetworkInterfaceOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceNetworkInterfaceOptionsModel.Name).To(Equal(core.StringPtr("my-network-interface"))) + Expect(updateInstanceNetworkInterfaceOptionsModel.NetworkInterfacePatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceNetworkInterfaceOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceOptions successfully`, func() { // Construct an instance of the UpdateInstanceOptions model id := "testString" - updateInstanceOptionsModel := vpcService.NewUpdateInstanceOptions(id) + instancePatch := make(map[string]interface{}) + updateInstanceOptionsModel := vpcService.NewUpdateInstanceOptions(id, instancePatch) updateInstanceOptionsModel.SetID("testString") - updateInstanceOptionsModel.SetName("my-instance") + updateInstanceOptionsModel.SetInstancePatch(make(map[string]interface{})) updateInstanceOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceOptionsModel).ToNot(BeNil()) Expect(updateInstanceOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceOptionsModel.Name).To(Equal(core.StringPtr("my-instance"))) + Expect(updateInstanceOptionsModel.InstancePatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceTemplateOptions successfully`, func() { // Construct an instance of the UpdateInstanceTemplateOptions model id := "testString" - updateInstanceTemplateOptionsModel := vpcService.NewUpdateInstanceTemplateOptions(id) + instanceTemplatePatch := make(map[string]interface{}) + updateInstanceTemplateOptionsModel := vpcService.NewUpdateInstanceTemplateOptions(id, instanceTemplatePatch) updateInstanceTemplateOptionsModel.SetID("testString") - updateInstanceTemplateOptionsModel.SetName("my-instance-template") + updateInstanceTemplateOptionsModel.SetInstanceTemplatePatch(make(map[string]interface{})) updateInstanceTemplateOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceTemplateOptionsModel).ToNot(BeNil()) Expect(updateInstanceTemplateOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceTemplateOptionsModel.Name).To(Equal(core.StringPtr("my-instance-template"))) + Expect(updateInstanceTemplateOptionsModel.InstanceTemplatePatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceTemplateOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateInstanceVolumeAttachmentOptions successfully`, func() { // Construct an instance of the UpdateInstanceVolumeAttachmentOptions model instanceID := "testString" id := "testString" - updateInstanceVolumeAttachmentOptionsModel := vpcService.NewUpdateInstanceVolumeAttachmentOptions(instanceID, id) + volumeAttachmentPatch := make(map[string]interface{}) + updateInstanceVolumeAttachmentOptionsModel := vpcService.NewUpdateInstanceVolumeAttachmentOptions(instanceID, id, volumeAttachmentPatch) updateInstanceVolumeAttachmentOptionsModel.SetInstanceID("testString") updateInstanceVolumeAttachmentOptionsModel.SetID("testString") - updateInstanceVolumeAttachmentOptionsModel.SetName("my-volume-attachment") - updateInstanceVolumeAttachmentOptionsModel.SetDeleteVolumeOnInstanceDelete(true) + updateInstanceVolumeAttachmentOptionsModel.SetVolumeAttachmentPatch(make(map[string]interface{})) updateInstanceVolumeAttachmentOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateInstanceVolumeAttachmentOptionsModel).ToNot(BeNil()) Expect(updateInstanceVolumeAttachmentOptionsModel.InstanceID).To(Equal(core.StringPtr("testString"))) Expect(updateInstanceVolumeAttachmentOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateInstanceVolumeAttachmentOptionsModel.Name).To(Equal(core.StringPtr("my-volume-attachment"))) - Expect(updateInstanceVolumeAttachmentOptionsModel.DeleteVolumeOnInstanceDelete).To(Equal(core.BoolPtr(true))) + Expect(updateInstanceVolumeAttachmentOptionsModel.VolumeAttachmentPatch).To(Equal(make(map[string]interface{}))) Expect(updateInstanceVolumeAttachmentOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateIpsecPolicyOptions successfully`, func() { // Construct an instance of the UpdateIpsecPolicyOptions model id := "testString" - updateIpsecPolicyOptionsModel := vpcService.NewUpdateIpsecPolicyOptions(id) + iPsecPolicyPatch := make(map[string]interface{}) + updateIpsecPolicyOptionsModel := vpcService.NewUpdateIpsecPolicyOptions(id, iPsecPolicyPatch) updateIpsecPolicyOptionsModel.SetID("testString") - updateIpsecPolicyOptionsModel.SetName("my-ipsec-policy") - updateIpsecPolicyOptionsModel.SetAuthenticationAlgorithm("md5") - updateIpsecPolicyOptionsModel.SetEncryptionAlgorithm("triple_des") - updateIpsecPolicyOptionsModel.SetKeyLifetime(int64(3600)) - updateIpsecPolicyOptionsModel.SetPfs("disabled") + updateIpsecPolicyOptionsModel.SetIPsecPolicyPatch(make(map[string]interface{})) updateIpsecPolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateIpsecPolicyOptionsModel).ToNot(BeNil()) Expect(updateIpsecPolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateIpsecPolicyOptionsModel.Name).To(Equal(core.StringPtr("my-ipsec-policy"))) - Expect(updateIpsecPolicyOptionsModel.AuthenticationAlgorithm).To(Equal(core.StringPtr("md5"))) - Expect(updateIpsecPolicyOptionsModel.EncryptionAlgorithm).To(Equal(core.StringPtr("triple_des"))) - Expect(updateIpsecPolicyOptionsModel.KeyLifetime).To(Equal(core.Int64Ptr(int64(3600)))) - Expect(updateIpsecPolicyOptionsModel.Pfs).To(Equal(core.StringPtr("disabled"))) + Expect(updateIpsecPolicyOptionsModel.IPsecPolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateIpsecPolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateKeyOptions successfully`, func() { // Construct an instance of the UpdateKeyOptions model id := "testString" - updateKeyOptionsModel := vpcService.NewUpdateKeyOptions(id) + keyPatch := make(map[string]interface{}) + updateKeyOptionsModel := vpcService.NewUpdateKeyOptions(id, keyPatch) updateKeyOptionsModel.SetID("testString") - updateKeyOptionsModel.SetName("my-key") + updateKeyOptionsModel.SetKeyPatch(make(map[string]interface{})) updateKeyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateKeyOptionsModel).ToNot(BeNil()) Expect(updateKeyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateKeyOptionsModel.Name).To(Equal(core.StringPtr("my-key"))) + Expect(updateKeyOptionsModel.KeyPatch).To(Equal(make(map[string]interface{}))) Expect(updateKeyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerListenerOptions successfully`, func() { - // Construct an instance of the CertificateInstanceIdentityByCRN model - certificateInstanceIdentityModel := new(vpcv1.CertificateInstanceIdentityByCRN) - Expect(certificateInstanceIdentityModel).ToNot(BeNil()) - certificateInstanceIdentityModel.CRN = core.StringPtr("crn:v1:bluemix:public:cloudcerts:us-south:a/123456:b8866ea4-b8df-467e-801a-da1db7e020bf:certificate:78ff9c4c97d013fb2a95b21dddde7758") - Expect(certificateInstanceIdentityModel.CRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:cloudcerts:us-south:a/123456:b8866ea4-b8df-467e-801a-da1db7e020bf:certificate:78ff9c4c97d013fb2a95b21dddde7758"))) - - // Construct an instance of the LoadBalancerPoolIdentityByID model - loadBalancerPoolIdentityModel := new(vpcv1.LoadBalancerPoolIdentityByID) - Expect(loadBalancerPoolIdentityModel).ToNot(BeNil()) - loadBalancerPoolIdentityModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") - Expect(loadBalancerPoolIdentityModel.ID).To(Equal(core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004"))) - // Construct an instance of the UpdateLoadBalancerListenerOptions model loadBalancerID := "testString" id := "testString" - updateLoadBalancerListenerOptionsModel := vpcService.NewUpdateLoadBalancerListenerOptions(loadBalancerID, id) + loadBalancerListenerPatch := make(map[string]interface{}) + updateLoadBalancerListenerOptionsModel := vpcService.NewUpdateLoadBalancerListenerOptions(loadBalancerID, id, loadBalancerListenerPatch) updateLoadBalancerListenerOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerListenerOptionsModel.SetID("testString") - updateLoadBalancerListenerOptionsModel.SetConnectionLimit(int64(2000)) - updateLoadBalancerListenerOptionsModel.SetPort(int64(443)) - updateLoadBalancerListenerOptionsModel.SetProtocol("http") - updateLoadBalancerListenerOptionsModel.SetCertificateInstance(certificateInstanceIdentityModel) - updateLoadBalancerListenerOptionsModel.SetDefaultPool(loadBalancerPoolIdentityModel) + updateLoadBalancerListenerOptionsModel.SetLoadBalancerListenerPatch(make(map[string]interface{})) updateLoadBalancerListenerOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerListenerOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerListenerOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerListenerOptionsModel.ConnectionLimit).To(Equal(core.Int64Ptr(int64(2000)))) - Expect(updateLoadBalancerListenerOptionsModel.Port).To(Equal(core.Int64Ptr(int64(443)))) - Expect(updateLoadBalancerListenerOptionsModel.Protocol).To(Equal(core.StringPtr("http"))) - Expect(updateLoadBalancerListenerOptionsModel.CertificateInstance).To(Equal(certificateInstanceIdentityModel)) - Expect(updateLoadBalancerListenerOptionsModel.DefaultPool).To(Equal(loadBalancerPoolIdentityModel)) + Expect(updateLoadBalancerListenerOptionsModel.LoadBalancerListenerPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerListenerOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerListenerPolicyOptions successfully`, func() { - // Construct an instance of the LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID model - loadBalancerListenerPolicyPatchTargetModel := new(vpcv1.LoadBalancerListenerPolicyPatchTargetLoadBalancerPoolIdentityLoadBalancerPoolIdentityByID) - Expect(loadBalancerListenerPolicyPatchTargetModel).ToNot(BeNil()) - loadBalancerListenerPolicyPatchTargetModel.ID = core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004") - Expect(loadBalancerListenerPolicyPatchTargetModel.ID).To(Equal(core.StringPtr("70294e14-4e61-11e8-bcf4-0242ac110004"))) - // Construct an instance of the UpdateLoadBalancerListenerPolicyOptions model loadBalancerID := "testString" listenerID := "testString" id := "testString" - updateLoadBalancerListenerPolicyOptionsModel := vpcService.NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID, listenerID, id) + loadBalancerListenerPolicyPatch := make(map[string]interface{}) + updateLoadBalancerListenerPolicyOptionsModel := vpcService.NewUpdateLoadBalancerListenerPolicyOptions(loadBalancerID, listenerID, id, loadBalancerListenerPolicyPatch) updateLoadBalancerListenerPolicyOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerListenerPolicyOptionsModel.SetListenerID("testString") updateLoadBalancerListenerPolicyOptionsModel.SetID("testString") - updateLoadBalancerListenerPolicyOptionsModel.SetName("my-policy") - updateLoadBalancerListenerPolicyOptionsModel.SetPriority(int64(5)) - updateLoadBalancerListenerPolicyOptionsModel.SetTarget(loadBalancerListenerPolicyPatchTargetModel) + updateLoadBalancerListenerPolicyOptionsModel.SetLoadBalancerListenerPolicyPatch(make(map[string]interface{})) updateLoadBalancerListenerPolicyOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerListenerPolicyOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyOptionsModel.ListenerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerListenerPolicyOptionsModel.Name).To(Equal(core.StringPtr("my-policy"))) - Expect(updateLoadBalancerListenerPolicyOptionsModel.Priority).To(Equal(core.Int64Ptr(int64(5)))) - Expect(updateLoadBalancerListenerPolicyOptionsModel.Target).To(Equal(loadBalancerListenerPolicyPatchTargetModel)) + Expect(updateLoadBalancerListenerPolicyOptionsModel.LoadBalancerListenerPolicyPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerListenerPolicyOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerListenerPolicyRuleOptions successfully`, func() { @@ -31672,367 +32155,239 @@ var _ = Describe(`VpcV1`, func() { listenerID := "testString" policyID := "testString" id := "testString" - updateLoadBalancerListenerPolicyRuleOptionsModel := vpcService.NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID, listenerID, policyID, id) + loadBalancerListenerPolicyRulePatch := make(map[string]interface{}) + updateLoadBalancerListenerPolicyRuleOptionsModel := vpcService.NewUpdateLoadBalancerListenerPolicyRuleOptions(loadBalancerID, listenerID, policyID, id, loadBalancerListenerPolicyRulePatch) updateLoadBalancerListenerPolicyRuleOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.SetListenerID("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.SetPolicyID("testString") updateLoadBalancerListenerPolicyRuleOptionsModel.SetID("testString") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetCondition("contains") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetField("MY-APP-HEADER") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetType("header") - updateLoadBalancerListenerPolicyRuleOptionsModel.SetValue("testString") + updateLoadBalancerListenerPolicyRuleOptionsModel.SetLoadBalancerListenerPolicyRulePatch(make(map[string]interface{})) updateLoadBalancerListenerPolicyRuleOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.ListenerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.PolicyID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Condition).To(Equal(core.StringPtr("contains"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Field).To(Equal(core.StringPtr("MY-APP-HEADER"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Type).To(Equal(core.StringPtr("header"))) - Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Value).To(Equal(core.StringPtr("testString"))) + Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.LoadBalancerListenerPolicyRulePatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerListenerPolicyRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerOptions successfully`, func() { // Construct an instance of the UpdateLoadBalancerOptions model id := "testString" - updateLoadBalancerOptionsModel := vpcService.NewUpdateLoadBalancerOptions(id) + loadBalancerPatch := make(map[string]interface{}) + updateLoadBalancerOptionsModel := vpcService.NewUpdateLoadBalancerOptions(id, loadBalancerPatch) updateLoadBalancerOptionsModel.SetID("testString") - updateLoadBalancerOptionsModel.SetName("my-load-balancer") + updateLoadBalancerOptionsModel.SetLoadBalancerPatch(make(map[string]interface{})) updateLoadBalancerOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerOptionsModel.Name).To(Equal(core.StringPtr("my-load-balancer"))) + Expect(updateLoadBalancerOptionsModel.LoadBalancerPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerPoolMemberOptions successfully`, func() { - // Construct an instance of the LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID model - loadBalancerPoolMemberTargetPrototypeModel := new(vpcv1.LoadBalancerPoolMemberTargetPrototypeInstanceIdentityInstanceIdentityByID) - Expect(loadBalancerPoolMemberTargetPrototypeModel).ToNot(BeNil()) - loadBalancerPoolMemberTargetPrototypeModel.ID = core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a") - Expect(loadBalancerPoolMemberTargetPrototypeModel.ID).To(Equal(core.StringPtr("1e09281b-f177-46fb-baf1-bc152b2e391a"))) - // Construct an instance of the UpdateLoadBalancerPoolMemberOptions model loadBalancerID := "testString" poolID := "testString" id := "testString" - updateLoadBalancerPoolMemberOptionsModel := vpcService.NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID, poolID, id) + loadBalancerPoolMemberPatch := make(map[string]interface{}) + updateLoadBalancerPoolMemberOptionsModel := vpcService.NewUpdateLoadBalancerPoolMemberOptions(loadBalancerID, poolID, id, loadBalancerPoolMemberPatch) updateLoadBalancerPoolMemberOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerPoolMemberOptionsModel.SetPoolID("testString") updateLoadBalancerPoolMemberOptionsModel.SetID("testString") - updateLoadBalancerPoolMemberOptionsModel.SetPort(int64(80)) - updateLoadBalancerPoolMemberOptionsModel.SetWeight(int64(50)) - updateLoadBalancerPoolMemberOptionsModel.SetTarget(loadBalancerPoolMemberTargetPrototypeModel) + updateLoadBalancerPoolMemberOptionsModel.SetLoadBalancerPoolMemberPatch(make(map[string]interface{})) updateLoadBalancerPoolMemberOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerPoolMemberOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerPoolMemberOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerPoolMemberOptionsModel.PoolID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerPoolMemberOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerPoolMemberOptionsModel.Port).To(Equal(core.Int64Ptr(int64(80)))) - Expect(updateLoadBalancerPoolMemberOptionsModel.Weight).To(Equal(core.Int64Ptr(int64(50)))) - Expect(updateLoadBalancerPoolMemberOptionsModel.Target).To(Equal(loadBalancerPoolMemberTargetPrototypeModel)) + Expect(updateLoadBalancerPoolMemberOptionsModel.LoadBalancerPoolMemberPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerPoolMemberOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateLoadBalancerPoolOptions successfully`, func() { - // Construct an instance of the LoadBalancerPoolHealthMonitorPatch model - loadBalancerPoolHealthMonitorPatchModel := new(vpcv1.LoadBalancerPoolHealthMonitorPatch) - Expect(loadBalancerPoolHealthMonitorPatchModel).ToNot(BeNil()) - loadBalancerPoolHealthMonitorPatchModel.Delay = core.Int64Ptr(int64(5)) - loadBalancerPoolHealthMonitorPatchModel.MaxRetries = core.Int64Ptr(int64(2)) - loadBalancerPoolHealthMonitorPatchModel.Port = core.Int64Ptr(int64(22)) - loadBalancerPoolHealthMonitorPatchModel.Timeout = core.Int64Ptr(int64(2)) - loadBalancerPoolHealthMonitorPatchModel.Type = core.StringPtr("http") - loadBalancerPoolHealthMonitorPatchModel.URLPath = core.StringPtr("/") - Expect(loadBalancerPoolHealthMonitorPatchModel.Delay).To(Equal(core.Int64Ptr(int64(5)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.MaxRetries).To(Equal(core.Int64Ptr(int64(2)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.Port).To(Equal(core.Int64Ptr(int64(22)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.Timeout).To(Equal(core.Int64Ptr(int64(2)))) - Expect(loadBalancerPoolHealthMonitorPatchModel.Type).To(Equal(core.StringPtr("http"))) - Expect(loadBalancerPoolHealthMonitorPatchModel.URLPath).To(Equal(core.StringPtr("/"))) - - // Construct an instance of the LoadBalancerPoolSessionPersistencePatch model - loadBalancerPoolSessionPersistencePatchModel := new(vpcv1.LoadBalancerPoolSessionPersistencePatch) - Expect(loadBalancerPoolSessionPersistencePatchModel).ToNot(BeNil()) - loadBalancerPoolSessionPersistencePatchModel.Type = core.StringPtr("source_ip") - Expect(loadBalancerPoolSessionPersistencePatchModel.Type).To(Equal(core.StringPtr("source_ip"))) - // Construct an instance of the UpdateLoadBalancerPoolOptions model loadBalancerID := "testString" id := "testString" - updateLoadBalancerPoolOptionsModel := vpcService.NewUpdateLoadBalancerPoolOptions(loadBalancerID, id) + loadBalancerPoolPatch := make(map[string]interface{}) + updateLoadBalancerPoolOptionsModel := vpcService.NewUpdateLoadBalancerPoolOptions(loadBalancerID, id, loadBalancerPoolPatch) updateLoadBalancerPoolOptionsModel.SetLoadBalancerID("testString") updateLoadBalancerPoolOptionsModel.SetID("testString") - updateLoadBalancerPoolOptionsModel.SetName("my-load-balancer-pool") - updateLoadBalancerPoolOptionsModel.SetAlgorithm("least_connections") - updateLoadBalancerPoolOptionsModel.SetProtocol("http") - updateLoadBalancerPoolOptionsModel.SetHealthMonitor(loadBalancerPoolHealthMonitorPatchModel) - updateLoadBalancerPoolOptionsModel.SetSessionPersistence(loadBalancerPoolSessionPersistencePatchModel) + updateLoadBalancerPoolOptionsModel.SetLoadBalancerPoolPatch(make(map[string]interface{})) updateLoadBalancerPoolOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateLoadBalancerPoolOptionsModel).ToNot(BeNil()) Expect(updateLoadBalancerPoolOptionsModel.LoadBalancerID).To(Equal(core.StringPtr("testString"))) Expect(updateLoadBalancerPoolOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateLoadBalancerPoolOptionsModel.Name).To(Equal(core.StringPtr("my-load-balancer-pool"))) - Expect(updateLoadBalancerPoolOptionsModel.Algorithm).To(Equal(core.StringPtr("least_connections"))) - Expect(updateLoadBalancerPoolOptionsModel.Protocol).To(Equal(core.StringPtr("http"))) - Expect(updateLoadBalancerPoolOptionsModel.HealthMonitor).To(Equal(loadBalancerPoolHealthMonitorPatchModel)) - Expect(updateLoadBalancerPoolOptionsModel.SessionPersistence).To(Equal(loadBalancerPoolSessionPersistencePatchModel)) + Expect(updateLoadBalancerPoolOptionsModel.LoadBalancerPoolPatch).To(Equal(make(map[string]interface{}))) Expect(updateLoadBalancerPoolOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateNetworkACLOptions successfully`, func() { // Construct an instance of the UpdateNetworkACLOptions model id := "testString" - updateNetworkACLOptionsModel := vpcService.NewUpdateNetworkACLOptions(id) + networkACLPatch := make(map[string]interface{}) + updateNetworkACLOptionsModel := vpcService.NewUpdateNetworkACLOptions(id, networkACLPatch) updateNetworkACLOptionsModel.SetID("testString") - updateNetworkACLOptionsModel.SetName("my-network-acl") + updateNetworkACLOptionsModel.SetNetworkACLPatch(make(map[string]interface{})) updateNetworkACLOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateNetworkACLOptionsModel).ToNot(BeNil()) Expect(updateNetworkACLOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateNetworkACLOptionsModel.Name).To(Equal(core.StringPtr("my-network-acl"))) + Expect(updateNetworkACLOptionsModel.NetworkACLPatch).To(Equal(make(map[string]interface{}))) Expect(updateNetworkACLOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateNetworkACLRuleOptions successfully`, func() { - // 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" id := "testString" - updateNetworkACLRuleOptionsModel := vpcService.NewUpdateNetworkACLRuleOptions(networkACLID, id) + networkACLRulePatch := make(map[string]interface{}) + updateNetworkACLRuleOptionsModel := vpcService.NewUpdateNetworkACLRuleOptions(networkACLID, id, networkACLRulePatch) updateNetworkACLRuleOptionsModel.SetNetworkACLID("testString") updateNetworkACLRuleOptionsModel.SetID("testString") - updateNetworkACLRuleOptionsModel.SetName("my-rule-2") - updateNetworkACLRuleOptionsModel.SetAction("allow") - updateNetworkACLRuleOptionsModel.SetDestination("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.SetDirection("inbound") - updateNetworkACLRuleOptionsModel.SetSource("192.168.3.2/32") - updateNetworkACLRuleOptionsModel.SetDestinationPortMax(int64(22)) - updateNetworkACLRuleOptionsModel.SetDestinationPortMin(int64(22)) - updateNetworkACLRuleOptionsModel.SetSourcePortMax(int64(65535)) - updateNetworkACLRuleOptionsModel.SetSourcePortMin(int64(49152)) - updateNetworkACLRuleOptionsModel.SetCode(int64(0)) - updateNetworkACLRuleOptionsModel.SetType(int64(8)) - updateNetworkACLRuleOptionsModel.SetBefore(networkACLRuleIdentityModel) + updateNetworkACLRuleOptionsModel.SetNetworkACLRulePatch(make(map[string]interface{})) updateNetworkACLRuleOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateNetworkACLRuleOptionsModel).ToNot(BeNil()) Expect(updateNetworkACLRuleOptionsModel.NetworkACLID).To(Equal(core.StringPtr("testString"))) Expect(updateNetworkACLRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateNetworkACLRuleOptionsModel.Name).To(Equal(core.StringPtr("my-rule-2"))) - Expect(updateNetworkACLRuleOptionsModel.Action).To(Equal(core.StringPtr("allow"))) - Expect(updateNetworkACLRuleOptionsModel.Destination).To(Equal(core.StringPtr("192.168.3.2/32"))) - Expect(updateNetworkACLRuleOptionsModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(updateNetworkACLRuleOptionsModel.Source).To(Equal(core.StringPtr("192.168.3.2/32"))) - Expect(updateNetworkACLRuleOptionsModel.DestinationPortMax).To(Equal(core.Int64Ptr(int64(22)))) - Expect(updateNetworkACLRuleOptionsModel.DestinationPortMin).To(Equal(core.Int64Ptr(int64(22)))) - Expect(updateNetworkACLRuleOptionsModel.SourcePortMax).To(Equal(core.Int64Ptr(int64(65535)))) - Expect(updateNetworkACLRuleOptionsModel.SourcePortMin).To(Equal(core.Int64Ptr(int64(49152)))) - Expect(updateNetworkACLRuleOptionsModel.Code).To(Equal(core.Int64Ptr(int64(0)))) - Expect(updateNetworkACLRuleOptionsModel.Type).To(Equal(core.Int64Ptr(int64(8)))) - Expect(updateNetworkACLRuleOptionsModel.Before).To(Equal(networkACLRuleIdentityModel)) + Expect(updateNetworkACLRuleOptionsModel.NetworkACLRulePatch).To(Equal(make(map[string]interface{}))) Expect(updateNetworkACLRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdatePublicGatewayOptions successfully`, func() { // Construct an instance of the UpdatePublicGatewayOptions model id := "testString" - updatePublicGatewayOptionsModel := vpcService.NewUpdatePublicGatewayOptions(id) + publicGatewayPatch := make(map[string]interface{}) + updatePublicGatewayOptionsModel := vpcService.NewUpdatePublicGatewayOptions(id, publicGatewayPatch) updatePublicGatewayOptionsModel.SetID("testString") - updatePublicGatewayOptionsModel.SetName("my-public-gateway") + updatePublicGatewayOptionsModel.SetPublicGatewayPatch(make(map[string]interface{})) updatePublicGatewayOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updatePublicGatewayOptionsModel).ToNot(BeNil()) Expect(updatePublicGatewayOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updatePublicGatewayOptionsModel.Name).To(Equal(core.StringPtr("my-public-gateway"))) + Expect(updatePublicGatewayOptionsModel.PublicGatewayPatch).To(Equal(make(map[string]interface{}))) Expect(updatePublicGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSecurityGroupOptions successfully`, func() { // Construct an instance of the UpdateSecurityGroupOptions model id := "testString" - updateSecurityGroupOptionsModel := vpcService.NewUpdateSecurityGroupOptions(id) + securityGroupPatch := make(map[string]interface{}) + updateSecurityGroupOptionsModel := vpcService.NewUpdateSecurityGroupOptions(id, securityGroupPatch) updateSecurityGroupOptionsModel.SetID("testString") - updateSecurityGroupOptionsModel.SetName("my-security-group") + updateSecurityGroupOptionsModel.SetSecurityGroupPatch(make(map[string]interface{})) updateSecurityGroupOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateSecurityGroupOptionsModel).ToNot(BeNil()) Expect(updateSecurityGroupOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateSecurityGroupOptionsModel.Name).To(Equal(core.StringPtr("my-security-group"))) + Expect(updateSecurityGroupOptionsModel.SecurityGroupPatch).To(Equal(make(map[string]interface{}))) Expect(updateSecurityGroupOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSecurityGroupRuleOptions successfully`, func() { - // Construct an instance of the SecurityGroupRulePatchRemoteIP model - securityGroupRulePatchRemoteModel := new(vpcv1.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 UpdateSecurityGroupRuleOptions model securityGroupID := "testString" id := "testString" - updateSecurityGroupRuleOptionsModel := vpcService.NewUpdateSecurityGroupRuleOptions(securityGroupID, id) + securityGroupRulePatch := make(map[string]interface{}) + updateSecurityGroupRuleOptionsModel := vpcService.NewUpdateSecurityGroupRuleOptions(securityGroupID, id, securityGroupRulePatch) updateSecurityGroupRuleOptionsModel.SetSecurityGroupID("testString") updateSecurityGroupRuleOptionsModel.SetID("testString") - updateSecurityGroupRuleOptionsModel.SetRemote(securityGroupRulePatchRemoteModel) - updateSecurityGroupRuleOptionsModel.SetDirection("inbound") - updateSecurityGroupRuleOptionsModel.SetIPVersion("ipv4") - updateSecurityGroupRuleOptionsModel.SetCode(int64(0)) - updateSecurityGroupRuleOptionsModel.SetPortMax(int64(22)) - updateSecurityGroupRuleOptionsModel.SetPortMin(int64(22)) - updateSecurityGroupRuleOptionsModel.SetType(int64(8)) + updateSecurityGroupRuleOptionsModel.SetSecurityGroupRulePatch(make(map[string]interface{})) updateSecurityGroupRuleOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateSecurityGroupRuleOptionsModel).ToNot(BeNil()) Expect(updateSecurityGroupRuleOptionsModel.SecurityGroupID).To(Equal(core.StringPtr("testString"))) Expect(updateSecurityGroupRuleOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateSecurityGroupRuleOptionsModel.Remote).To(Equal(securityGroupRulePatchRemoteModel)) - Expect(updateSecurityGroupRuleOptionsModel.Direction).To(Equal(core.StringPtr("inbound"))) - Expect(updateSecurityGroupRuleOptionsModel.IPVersion).To(Equal(core.StringPtr("ipv4"))) - Expect(updateSecurityGroupRuleOptionsModel.Code).To(Equal(core.Int64Ptr(int64(0)))) - Expect(updateSecurityGroupRuleOptionsModel.PortMax).To(Equal(core.Int64Ptr(int64(22)))) - Expect(updateSecurityGroupRuleOptionsModel.PortMin).To(Equal(core.Int64Ptr(int64(22)))) - Expect(updateSecurityGroupRuleOptionsModel.Type).To(Equal(core.Int64Ptr(int64(8)))) + Expect(updateSecurityGroupRuleOptionsModel.SecurityGroupRulePatch).To(Equal(make(map[string]interface{}))) Expect(updateSecurityGroupRuleOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateSubnetOptions successfully`, func() { - // Construct an instance of the NetworkACLIdentityByID model - networkACLIdentityModel := new(vpcv1.NetworkACLIdentityByID) - Expect(networkACLIdentityModel).ToNot(BeNil()) - networkACLIdentityModel.ID = core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf") - Expect(networkACLIdentityModel.ID).To(Equal(core.StringPtr("a4e28308-8ee7-46ab-8108-9f881f22bdbf"))) - - // Construct an instance of the PublicGatewayIdentityByID model - publicGatewayIdentityModel := new(vpcv1.PublicGatewayIdentityByID) - Expect(publicGatewayIdentityModel).ToNot(BeNil()) - publicGatewayIdentityModel.ID = core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241") - Expect(publicGatewayIdentityModel.ID).To(Equal(core.StringPtr("dc5431ef-1fc6-4861-adc9-a59d077d1241"))) - // Construct an instance of the UpdateSubnetOptions model id := "testString" - updateSubnetOptionsModel := vpcService.NewUpdateSubnetOptions(id) + subnetPatch := make(map[string]interface{}) + updateSubnetOptionsModel := vpcService.NewUpdateSubnetOptions(id, subnetPatch) updateSubnetOptionsModel.SetID("testString") - updateSubnetOptionsModel.SetName("my-subnet") - updateSubnetOptionsModel.SetNetworkACL(networkACLIdentityModel) - updateSubnetOptionsModel.SetPublicGateway(publicGatewayIdentityModel) + updateSubnetOptionsModel.SetSubnetPatch(make(map[string]interface{})) updateSubnetOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateSubnetOptionsModel).ToNot(BeNil()) Expect(updateSubnetOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateSubnetOptionsModel.Name).To(Equal(core.StringPtr("my-subnet"))) - Expect(updateSubnetOptionsModel.NetworkACL).To(Equal(networkACLIdentityModel)) - Expect(updateSubnetOptionsModel.PublicGateway).To(Equal(publicGatewayIdentityModel)) + Expect(updateSubnetOptionsModel.SubnetPatch).To(Equal(make(map[string]interface{}))) Expect(updateSubnetOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVolumeOptions successfully`, func() { // Construct an instance of the UpdateVolumeOptions model id := "testString" - updateVolumeOptionsModel := vpcService.NewUpdateVolumeOptions(id) + volumePatch := make(map[string]interface{}) + updateVolumeOptionsModel := vpcService.NewUpdateVolumeOptions(id, volumePatch) updateVolumeOptionsModel.SetID("testString") - updateVolumeOptionsModel.SetName("my-volume") + updateVolumeOptionsModel.SetVolumePatch(make(map[string]interface{})) updateVolumeOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVolumeOptionsModel).ToNot(BeNil()) Expect(updateVolumeOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVolumeOptionsModel.Name).To(Equal(core.StringPtr("my-volume"))) + Expect(updateVolumeOptionsModel.VolumePatch).To(Equal(make(map[string]interface{}))) Expect(updateVolumeOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPCAddressPrefixOptions successfully`, func() { // Construct an instance of the UpdateVPCAddressPrefixOptions model vpcID := "testString" id := "testString" - updateVPCAddressPrefixOptionsModel := vpcService.NewUpdateVPCAddressPrefixOptions(vpcID, id) + addressPrefixPatch := make(map[string]interface{}) + updateVPCAddressPrefixOptionsModel := vpcService.NewUpdateVPCAddressPrefixOptions(vpcID, id, addressPrefixPatch) updateVPCAddressPrefixOptionsModel.SetVPCID("testString") updateVPCAddressPrefixOptionsModel.SetID("testString") - updateVPCAddressPrefixOptionsModel.SetName("my-address-prefix-2") - updateVPCAddressPrefixOptionsModel.SetIsDefault(false) + updateVPCAddressPrefixOptionsModel.SetAddressPrefixPatch(make(map[string]interface{})) updateVPCAddressPrefixOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPCAddressPrefixOptionsModel).ToNot(BeNil()) Expect(updateVPCAddressPrefixOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(updateVPCAddressPrefixOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPCAddressPrefixOptionsModel.Name).To(Equal(core.StringPtr("my-address-prefix-2"))) - Expect(updateVPCAddressPrefixOptionsModel.IsDefault).To(Equal(core.BoolPtr(false))) + Expect(updateVPCAddressPrefixOptionsModel.AddressPrefixPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPCAddressPrefixOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPCOptions successfully`, func() { // Construct an instance of the UpdateVPCOptions model id := "testString" - updateVPCOptionsModel := vpcService.NewUpdateVPCOptions(id) + vpcPatch := make(map[string]interface{}) + updateVPCOptionsModel := vpcService.NewUpdateVPCOptions(id, vpcPatch) updateVPCOptionsModel.SetID("testString") - updateVPCOptionsModel.SetName("my-vpc") + updateVPCOptionsModel.SetVPCPatch(make(map[string]interface{})) updateVPCOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPCOptionsModel).ToNot(BeNil()) Expect(updateVPCOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPCOptionsModel.Name).To(Equal(core.StringPtr("my-vpc"))) + Expect(updateVPCOptionsModel.VPCPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPCOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPCRouteOptions successfully`, func() { // Construct an instance of the UpdateVPCRouteOptions model vpcID := "testString" id := "testString" - updateVPCRouteOptionsModel := vpcService.NewUpdateVPCRouteOptions(vpcID, id) + routePatch := make(map[string]interface{}) + updateVPCRouteOptionsModel := vpcService.NewUpdateVPCRouteOptions(vpcID, id, routePatch) updateVPCRouteOptionsModel.SetVPCID("testString") updateVPCRouteOptionsModel.SetID("testString") - updateVPCRouteOptionsModel.SetName("my-route-2") + updateVPCRouteOptionsModel.SetRoutePatch(make(map[string]interface{})) updateVPCRouteOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPCRouteOptionsModel).ToNot(BeNil()) Expect(updateVPCRouteOptionsModel.VPCID).To(Equal(core.StringPtr("testString"))) Expect(updateVPCRouteOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPCRouteOptionsModel.Name).To(Equal(core.StringPtr("my-route-2"))) + Expect(updateVPCRouteOptionsModel.RoutePatch).To(Equal(make(map[string]interface{}))) Expect(updateVPCRouteOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPNGatewayConnectionOptions successfully`, func() { - // Construct an instance of the VPNGatewayConnectionDpdPrototype model - vpnGatewayConnectionDpdPrototypeModel := new(vpcv1.VPNGatewayConnectionDpdPrototype) - Expect(vpnGatewayConnectionDpdPrototypeModel).ToNot(BeNil()) - vpnGatewayConnectionDpdPrototypeModel.Action = core.StringPtr("restart") - vpnGatewayConnectionDpdPrototypeModel.Interval = core.Int64Ptr(int64(30)) - vpnGatewayConnectionDpdPrototypeModel.Timeout = core.Int64Ptr(int64(120)) - Expect(vpnGatewayConnectionDpdPrototypeModel.Action).To(Equal(core.StringPtr("restart"))) - Expect(vpnGatewayConnectionDpdPrototypeModel.Interval).To(Equal(core.Int64Ptr(int64(30)))) - Expect(vpnGatewayConnectionDpdPrototypeModel.Timeout).To(Equal(core.Int64Ptr(int64(120)))) - - // Construct an instance of the IkePolicyIdentityByID model - ikePolicyIdentityModel := new(vpcv1.IkePolicyIdentityByID) - Expect(ikePolicyIdentityModel).ToNot(BeNil()) - ikePolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") - Expect(ikePolicyIdentityModel.ID).To(Equal(core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b"))) - - // Construct an instance of the IPsecPolicyIdentityByID model - iPsecPolicyIdentityModel := new(vpcv1.IPsecPolicyIdentityByID) - Expect(iPsecPolicyIdentityModel).ToNot(BeNil()) - iPsecPolicyIdentityModel.ID = core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b") - Expect(iPsecPolicyIdentityModel.ID).To(Equal(core.StringPtr("ddf51bec-3424-11e8-b467-0ed5f89f718b"))) - // Construct an instance of the UpdateVPNGatewayConnectionOptions model vpnGatewayID := "testString" id := "testString" - updateVPNGatewayConnectionOptionsModel := vpcService.NewUpdateVPNGatewayConnectionOptions(vpnGatewayID, id) + vpnGatewayConnectionPatch := make(map[string]interface{}) + updateVPNGatewayConnectionOptionsModel := vpcService.NewUpdateVPNGatewayConnectionOptions(vpnGatewayID, id, vpnGatewayConnectionPatch) updateVPNGatewayConnectionOptionsModel.SetVPNGatewayID("testString") updateVPNGatewayConnectionOptionsModel.SetID("testString") - updateVPNGatewayConnectionOptionsModel.SetAdminStateUp(true) - updateVPNGatewayConnectionOptionsModel.SetPeerAddress("169.21.50.5") - updateVPNGatewayConnectionOptionsModel.SetName("my-vpn-connection") - updateVPNGatewayConnectionOptionsModel.SetPsk("lkj14b1oi0alcniejkso") - updateVPNGatewayConnectionOptionsModel.SetDeadPeerDetection(vpnGatewayConnectionDpdPrototypeModel) - updateVPNGatewayConnectionOptionsModel.SetIkePolicy(ikePolicyIdentityModel) - updateVPNGatewayConnectionOptionsModel.SetIpsecPolicy(iPsecPolicyIdentityModel) + updateVPNGatewayConnectionOptionsModel.SetVPNGatewayConnectionPatch(make(map[string]interface{})) updateVPNGatewayConnectionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPNGatewayConnectionOptionsModel).ToNot(BeNil()) Expect(updateVPNGatewayConnectionOptionsModel.VPNGatewayID).To(Equal(core.StringPtr("testString"))) Expect(updateVPNGatewayConnectionOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPNGatewayConnectionOptionsModel.AdminStateUp).To(Equal(core.BoolPtr(true))) - Expect(updateVPNGatewayConnectionOptionsModel.PeerAddress).To(Equal(core.StringPtr("169.21.50.5"))) - Expect(updateVPNGatewayConnectionOptionsModel.Name).To(Equal(core.StringPtr("my-vpn-connection"))) - Expect(updateVPNGatewayConnectionOptionsModel.Psk).To(Equal(core.StringPtr("lkj14b1oi0alcniejkso"))) - Expect(updateVPNGatewayConnectionOptionsModel.DeadPeerDetection).To(Equal(vpnGatewayConnectionDpdPrototypeModel)) - Expect(updateVPNGatewayConnectionOptionsModel.IkePolicy).To(Equal(ikePolicyIdentityModel)) - Expect(updateVPNGatewayConnectionOptionsModel.IpsecPolicy).To(Equal(iPsecPolicyIdentityModel)) + Expect(updateVPNGatewayConnectionOptionsModel.VPNGatewayConnectionPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPNGatewayConnectionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewUpdateVPNGatewayOptions successfully`, func() { // Construct an instance of the UpdateVPNGatewayOptions model id := "testString" - updateVPNGatewayOptionsModel := vpcService.NewUpdateVPNGatewayOptions(id) + vpnGatewayPatch := make(map[string]interface{}) + updateVPNGatewayOptionsModel := vpcService.NewUpdateVPNGatewayOptions(id, vpnGatewayPatch) updateVPNGatewayOptionsModel.SetID("testString") - updateVPNGatewayOptionsModel.SetName("my-vpn-gateway") + updateVPNGatewayOptionsModel.SetVPNGatewayPatch(make(map[string]interface{})) updateVPNGatewayOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(updateVPNGatewayOptionsModel).ToNot(BeNil()) Expect(updateVPNGatewayOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(updateVPNGatewayOptionsModel.Name).To(Equal(core.StringPtr("my-vpn-gateway"))) + Expect(updateVPNGatewayOptionsModel.VPNGatewayPatch).To(Equal(make(map[string]interface{}))) Expect(updateVPNGatewayOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewVolumeAttachmentPrototypeInstanceByImageContext successfully`, func() { @@ -32316,11 +32671,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLPrototypeNetworkACLByRules successfully`, func() { - var vpc vpcv1.VPCIdentityIntf = nil - _, err := vpcService.NewNetworkACLPrototypeNetworkACLByRules(vpc) - Expect(err).ToNot(BeNil()) - }) It(`Invoke NewNetworkACLPrototypeNetworkACLBySourceNetworkACL successfully`, func() { var vpc vpcv1.VPCIdentityIntf = nil var sourceNetworkACL vpcv1.NetworkACLIdentityIntf = nil @@ -32339,66 +32689,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "all" - model, err := vpcService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolAll(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "icmp" - model, err := vpcService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolIcmp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "udp" - model, err := vpcService.NewNetworkACLRulePrototypeNetworkACLContextNetworkACLRuleProtocolTcpudp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "all" - model, err := vpcService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolAll(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "icmp" - model, err := vpcService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolIcmp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp successfully`, func() { - action := "allow" - destination := "192.168.3.2/32" - direction := "inbound" - source := "192.168.3.2/32" - protocol := "udp" - model, err := vpcService.NewNetworkACLRulePrototypeNetworkACLRuleProtocolTcpudp(action, destination, direction, source, protocol) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewOperatingSystemIdentityByHref successfully`, func() { href := "https://us-south.iaas.cloud.ibm.com/v1/operating_systems/ubuntu-16-amd64" model, err := vpcService.NewOperatingSystemIdentityByHref(href) @@ -32483,24 +32773,6 @@ var _ = Describe(`VpcV1`, func() { Expect(model).ToNot(BeNil()) Expect(err).To(BeNil()) }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll successfully`, func() { - direction := "inbound" - model, err := vpcService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolAll(direction) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp successfully`, func() { - direction := "inbound" - model, err := vpcService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolIcmp(direction) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) - It(`Invoke NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp successfully`, func() { - direction := "inbound" - model, err := vpcService.NewSecurityGroupRulePrototypeSecurityGroupRuleProtocolTcpudp(direction) - Expect(model).ToNot(BeNil()) - Expect(err).To(BeNil()) - }) It(`Invoke NewSubnetIdentityByCRN successfully`, func() { crn := "crn:v1:bluemix:public:is:us-south-1:a/123456::subnet:7ec86020-1c6e-4889-b3f0-a15f2e50f87e" model, err := vpcService.NewSubnetIdentityByCRN(crn)