diff --git a/sdk/resourcemanager/resources/armlinks/CHANGELOG.md b/sdk/resourcemanager/resources/armlinks/CHANGELOG.md index 75fe9ec13aad..fb0d63d30f6e 100644 --- a/sdk/resourcemanager/resources/armlinks/CHANGELOG.md +++ b/sdk/resourcemanager/resources/armlinks/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 1.0.0 (2022-05-16) +### Breaking Changes + +- Function `ResourceLinkResult.MarshalJSON` has been removed +- Function `OperationListResult.MarshalJSON` has been removed + + ## 0.4.0 (2022-04-18) ### Breaking Changes diff --git a/sdk/resourcemanager/resources/armlinks/autorest.md b/sdk/resourcemanager/resources/armlinks/autorest.md index 46c636ba84a8..46cf034f953f 100644 --- a/sdk/resourcemanager/resources/armlinks/autorest.md +++ b/sdk/resourcemanager/resources/armlinks/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/f92aaf88f4c9d1ffb9a014eba196d887a9288c3a/specification/resources/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/f92aaf88f4c9d1ffb9a014eba196d887a9288c3a/specification/resources/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.4.0 +module-version: 1.0.0 package-links: true ``` \ No newline at end of file diff --git a/sdk/resourcemanager/resources/armlinks/go.mod b/sdk/resourcemanager/resources/armlinks/go.mod index 76663368f0f5..3a720fa45ea0 100644 --- a/sdk/resourcemanager/resources/armlinks/go.mod +++ b/sdk/resourcemanager/resources/armlinks/go.mod @@ -2,10 +2,10 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armlinks go 1.18 -require github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0 +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 // indirect - golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect - golang.org/x/text v0.3.6 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect + golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect + golang.org/x/text v0.3.7 // indirect ) diff --git a/sdk/resourcemanager/resources/armlinks/go.sum b/sdk/resourcemanager/resources/armlinks/go.sum index a7eaa30576c1..3f874a3bc5a6 100644 --- a/sdk/resourcemanager/resources/armlinks/go.sum +++ b/sdk/resourcemanager/resources/armlinks/go.sum @@ -1,32 +1,12 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0 h1:D7l5jspkc4kwBYRWoZE4DQnu6LVpLwDsMZjBKS4wZLQ= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0/go.mod h1:w5pDIZuawUmY3Bj4tVx3Xb8KS96ToB0j315w9rqpAg0= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 h1:sLZ/Y+P/5RRtsXWylBjB5lkgixYfm0MQPiwrSX//JSo= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/resources/armlinks/zz_generated_constants.go b/sdk/resourcemanager/resources/armlinks/zz_generated_constants.go index 9f1cf5e91c18..f67616136de4 100644 --- a/sdk/resourcemanager/resources/armlinks/zz_generated_constants.go +++ b/sdk/resourcemanager/resources/armlinks/zz_generated_constants.go @@ -10,5 +10,5 @@ package armlinks const ( moduleName = "armlinks" - moduleVersion = "v0.4.0" + moduleVersion = "v1.0.0" ) diff --git a/sdk/resourcemanager/resources/armlinks/zz_generated_models_serde.go b/sdk/resourcemanager/resources/armlinks/zz_generated_models_serde.go deleted file mode 100644 index 5054faa45b7a..000000000000 --- a/sdk/resourcemanager/resources/armlinks/zz_generated_models_serde.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armlinks - -import ( - "encoding/json" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceLinkResult. -func (r ResourceLinkResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} diff --git a/sdk/resourcemanager/resources/armlinks/zz_generated_operations_client.go b/sdk/resourcemanager/resources/armlinks/zz_generated_operations_client.go index 5e3f5a605643..8de802d76232 100644 --- a/sdk/resourcemanager/resources/armlinks/zz_generated_operations_client.go +++ b/sdk/resourcemanager/resources/armlinks/zz_generated_operations_client.go @@ -33,7 +33,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -50,9 +50,10 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Lists all of the available Microsoft.Resources REST API operations. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2016-09-01 // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { - return runtime.NewPager(runtime.PageProcessor[OperationsClientListResponse]{ + return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -89,7 +90,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2016-09-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } diff --git a/sdk/resourcemanager/resources/armlinks/zz_generated_resourcelinks_client.go b/sdk/resourcemanager/resources/armlinks/zz_generated_resourcelinks_client.go index ad3f0b59de07..2f849054fc7e 100644 --- a/sdk/resourcemanager/resources/armlinks/zz_generated_resourcelinks_client.go +++ b/sdk/resourcemanager/resources/armlinks/zz_generated_resourcelinks_client.go @@ -38,7 +38,7 @@ func NewResourceLinksClient(subscriptionID string, credential azcore.TokenCreden if options == nil { options = &arm.ClientOptions{} } - ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { ep = c.Endpoint } @@ -56,6 +56,7 @@ func NewResourceLinksClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Creates or updates a resource link between the specified resources. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2016-09-01 // linkID - The fully qualified ID of the resource link. Use the format, // /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. // For example, @@ -89,7 +90,7 @@ func (client *ResourceLinksClient) createOrUpdateCreateRequest(ctx context.Conte reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2016-09-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) } @@ -104,6 +105,7 @@ func (client *ResourceLinksClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Deletes a resource link with the specified ID. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2016-09-01 // linkID - The fully qualified ID of the resource link. Use the format, // /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. // For example, @@ -140,6 +142,7 @@ func (client *ResourceLinksClient) deleteCreateRequest(ctx context.Context, link // Get - Gets a resource link with the specified ID. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2016-09-01 // linkID - The fully qualified Id of the resource link. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink // options - ResourceLinksClientGetOptions contains the optional parameters for the ResourceLinksClient.Get method. func (client *ResourceLinksClient) Get(ctx context.Context, linkID string, options *ResourceLinksClientGetOptions) (ResourceLinksClientGetResponse, error) { @@ -168,7 +171,7 @@ func (client *ResourceLinksClient) getCreateRequest(ctx context.Context, linkID reqQP := req.Raw().URL.Query() reqQP.Set("api-version", "2016-09-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -183,13 +186,14 @@ func (client *ResourceLinksClient) getHandleResponse(resp *http.Response) (Resou // NewListAtSourceScopePager - Gets a list of resource links at and below the specified source scope. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2016-09-01 // scope - The fully qualified ID of the scope for getting the resource links. For example, to list resource links at and // under a resource group, set the scope to // /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. // options - ResourceLinksClientListAtSourceScopeOptions contains the optional parameters for the ResourceLinksClient.ListAtSourceScope // method. func (client *ResourceLinksClient) NewListAtSourceScopePager(scope string, options *ResourceLinksClientListAtSourceScopeOptions) *runtime.Pager[ResourceLinksClientListAtSourceScopeResponse] { - return runtime.NewPager(runtime.PageProcessor[ResourceLinksClientListAtSourceScopeResponse]{ + return runtime.NewPager(runtime.PagingHandler[ResourceLinksClientListAtSourceScopeResponse]{ More: func(page ResourceLinksClientListAtSourceScopeResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -230,7 +234,7 @@ func (client *ResourceLinksClient) listAtSourceScopeCreateRequest(ctx context.Co } reqQP.Set("api-version", "2016-09-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } @@ -245,10 +249,11 @@ func (client *ResourceLinksClient) listAtSourceScopeHandleResponse(resp *http.Re // NewListAtSubscriptionPager - Gets all the linked resources for the subscription. // If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2016-09-01 // options - ResourceLinksClientListAtSubscriptionOptions contains the optional parameters for the ResourceLinksClient.ListAtSubscription // method. func (client *ResourceLinksClient) NewListAtSubscriptionPager(options *ResourceLinksClientListAtSubscriptionOptions) *runtime.Pager[ResourceLinksClientListAtSubscriptionResponse] { - return runtime.NewPager(runtime.PageProcessor[ResourceLinksClientListAtSubscriptionResponse]{ + return runtime.NewPager(runtime.PagingHandler[ResourceLinksClientListAtSubscriptionResponse]{ More: func(page ResourceLinksClientListAtSubscriptionResponse) bool { return page.NextLink != nil && len(*page.NextLink) > 0 }, @@ -292,7 +297,7 @@ func (client *ResourceLinksClient) listAtSubscriptionCreateRequest(ctx context.C } reqQP.Set("api-version", "2016-09-01") req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header.Set("Accept", "application/json") + req.Raw().Header["Accept"] = []string{"application/json"} return req, nil }