diff --git a/sdk/resourcemanager/resources/armlinks/CHANGELOG.md b/sdk/resourcemanager/resources/armlinks/CHANGELOG.md index 192961186195..1fd7ebf17a9a 100644 --- a/sdk/resourcemanager/resources/armlinks/CHANGELOG.md +++ b/sdk/resourcemanager/resources/armlinks/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.1.2 (2023-08-23) +### Other Changes + + ## 1.1.1 (2023-04-14) ### Bug Fixes diff --git a/sdk/resourcemanager/resources/armlinks/autorest.md b/sdk/resourcemanager/resources/armlinks/autorest.md index aad2a2059e52..c5d0fc23ca56 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/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/0cc5e2efd6ffccf30e80d1e150b488dd87198b94/specification/resources/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resources/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 1.1.1 +module-version: 1.1.2 package-links: true ``` \ No newline at end of file diff --git a/sdk/resourcemanager/resources/armlinks/client_factory.go b/sdk/resourcemanager/resources/armlinks/client_factory.go index 0a6acdd93eda..e6192c86ee1c 100644 --- a/sdk/resourcemanager/resources/armlinks/client_factory.go +++ b/sdk/resourcemanager/resources/armlinks/client_factory.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks diff --git a/sdk/resourcemanager/resources/armlinks/constants.go b/sdk/resourcemanager/resources/armlinks/constants.go index 556204af5833..dc56e5740716 100644 --- a/sdk/resourcemanager/resources/armlinks/constants.go +++ b/sdk/resourcemanager/resources/armlinks/constants.go @@ -3,13 +3,12 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks const ( moduleName = "armlinks" - moduleVersion = "v1.1.1" + moduleVersion = "v1.1.2" ) diff --git a/sdk/resourcemanager/resources/armlinks/go.mod b/sdk/resourcemanager/resources/armlinks/go.mod index b3af0441ac61..a7a3163a911e 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 v1.4.0 +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 require ( - github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/text v0.7.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/text v0.8.0 // indirect ) diff --git a/sdk/resourcemanager/resources/armlinks/go.sum b/sdk/resourcemanager/resources/armlinks/go.sum index d39a720dafd8..43938a975440 100644 --- a/sdk/resourcemanager/resources/armlinks/go.sum +++ b/sdk/resourcemanager/resources/armlinks/go.sum @@ -1,12 +1,12 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 h1:+5VZ72z0Qan5Bog5C+ZkgSqUbeVUd9wgtHOrIKuc5b8= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1 h1:SEy2xmstIphdPwNBUi7uhvjyjhVKISfwjfOJmuy7kg4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= diff --git a/sdk/resourcemanager/resources/armlinks/models.go b/sdk/resourcemanager/resources/armlinks/models.go index abf1ecf8e482..8afa39bdbbd5 100644 --- a/sdk/resourcemanager/resources/armlinks/models.go +++ b/sdk/resourcemanager/resources/armlinks/models.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks @@ -43,11 +42,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // ResourceLink - The resource link. type ResourceLink struct { // Properties for resource link. @@ -89,34 +83,3 @@ type ResourceLinkResult struct { // READ-ONLY; The URL to use for getting the next set of results. NextLink *string } - -// ResourceLinksClientCreateOrUpdateOptions contains the optional parameters for the ResourceLinksClient.CreateOrUpdate method. -type ResourceLinksClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ResourceLinksClientDeleteOptions contains the optional parameters for the ResourceLinksClient.Delete method. -type ResourceLinksClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ResourceLinksClientGetOptions contains the optional parameters for the ResourceLinksClient.Get method. -type ResourceLinksClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceLinksClientListAtSourceScopeOptions contains the optional parameters for the ResourceLinksClient.NewListAtSourceScopePager -// method. -type ResourceLinksClientListAtSourceScopeOptions struct { - // The filter to apply when getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope().. - // Specifying any value will set the value to atScope(). - Filter *string -} - -// ResourceLinksClientListAtSubscriptionOptions contains the optional parameters for the ResourceLinksClient.NewListAtSubscriptionPager -// method. -type ResourceLinksClientListAtSubscriptionOptions struct { - // The filter to apply on the list resource links operation. The supported filter for list resource links is targetId. For - // example, $filter=targetId eq {value} - Filter *string -} diff --git a/sdk/resourcemanager/resources/armlinks/models_serde.go b/sdk/resourcemanager/resources/armlinks/models_serde.go index a68e550aef0f..acdd748cf488 100644 --- a/sdk/resourcemanager/resources/armlinks/models_serde.go +++ b/sdk/resourcemanager/resources/armlinks/models_serde.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks diff --git a/sdk/resourcemanager/resources/armlinks/operations_client.go b/sdk/resourcemanager/resources/armlinks/operations_client.go index 3d1c08dc739b..7ed878dca6cd 100644 --- a/sdk/resourcemanager/resources/armlinks/operations_client.go +++ b/sdk/resourcemanager/resources/armlinks/operations_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks diff --git a/sdk/resourcemanager/resources/armlinks/options.go b/sdk/resourcemanager/resources/armlinks/options.go new file mode 100644 index 000000000000..229b750e8583 --- /dev/null +++ b/sdk/resourcemanager/resources/armlinks/options.go @@ -0,0 +1,45 @@ +//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. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armlinks + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ResourceLinksClientCreateOrUpdateOptions contains the optional parameters for the ResourceLinksClient.CreateOrUpdate method. +type ResourceLinksClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ResourceLinksClientDeleteOptions contains the optional parameters for the ResourceLinksClient.Delete method. +type ResourceLinksClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ResourceLinksClientGetOptions contains the optional parameters for the ResourceLinksClient.Get method. +type ResourceLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceLinksClientListAtSourceScopeOptions contains the optional parameters for the ResourceLinksClient.NewListAtSourceScopePager +// method. +type ResourceLinksClientListAtSourceScopeOptions struct { + // The filter to apply when getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope().. + // Specifying any value will set the value to atScope(). + Filter *string +} + +// ResourceLinksClientListAtSubscriptionOptions contains the optional parameters for the ResourceLinksClient.NewListAtSubscriptionPager +// method. +type ResourceLinksClientListAtSubscriptionOptions struct { + // The filter to apply on the list resource links operation. The supported filter for list resource links is targetId. For + // example, $filter=targetId eq {value} + Filter *string +} diff --git a/sdk/resourcemanager/resources/armlinks/resourcelinks_client.go b/sdk/resourcemanager/resources/armlinks/resourcelinks_client.go index 7856e5cb23a1..5acfc5eeb442 100644 --- a/sdk/resourcemanager/resources/armlinks/resourcelinks_client.go +++ b/sdk/resourcemanager/resources/armlinks/resourcelinks_client.go @@ -3,9 +3,8 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks @@ -56,18 +55,21 @@ func NewResourceLinksClient(subscriptionID string, credential azcore.TokenCreden // - options - ResourceLinksClientCreateOrUpdateOptions contains the optional parameters for the ResourceLinksClient.CreateOrUpdate // method. func (client *ResourceLinksClient) CreateOrUpdate(ctx context.Context, linkID string, parameters ResourceLink, options *ResourceLinksClientCreateOrUpdateOptions) (ResourceLinksClientCreateOrUpdateResponse, error) { + var err error req, err := client.createOrUpdateCreateRequest(ctx, linkID, parameters, options) if err != nil { return ResourceLinksClientCreateOrUpdateResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceLinksClientCreateOrUpdateResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { - return ResourceLinksClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ResourceLinksClientCreateOrUpdateResponse{}, err } - return client.createOrUpdateHandleResponse(resp) + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err } // createOrUpdateCreateRequest creates the CreateOrUpdate request. @@ -82,7 +84,10 @@ func (client *ResourceLinksClient) createOrUpdateCreateRequest(ctx context.Conte reqQP.Set("api-version", "2016-09-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} - return req, runtime.MarshalAsJSON(req, parameters) + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil } // createOrUpdateHandleResponse handles the CreateOrUpdate response. @@ -104,16 +109,18 @@ func (client *ResourceLinksClient) createOrUpdateHandleResponse(resp *http.Respo // /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup/Microsoft.Web/sites/mySite/Microsoft.Resources/links/myLink // - options - ResourceLinksClientDeleteOptions contains the optional parameters for the ResourceLinksClient.Delete method. func (client *ResourceLinksClient) Delete(ctx context.Context, linkID string, options *ResourceLinksClientDeleteOptions) (ResourceLinksClientDeleteResponse, error) { + var err error req, err := client.deleteCreateRequest(ctx, linkID, options) if err != nil { return ResourceLinksClientDeleteResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceLinksClientDeleteResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { - return ResourceLinksClientDeleteResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ResourceLinksClientDeleteResponse{}, err } return ResourceLinksClientDeleteResponse{}, nil } @@ -139,18 +146,21 @@ func (client *ResourceLinksClient) deleteCreateRequest(ctx context.Context, link // - 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) { + var err error req, err := client.getCreateRequest(ctx, linkID, options) if err != nil { return ResourceLinksClientGetResponse{}, err } - resp, err := client.internal.Pipeline().Do(req) + httpResp, err := client.internal.Pipeline().Do(req) if err != nil { return ResourceLinksClientGetResponse{}, err } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ResourceLinksClientGetResponse{}, runtime.NewResponseError(resp) + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ResourceLinksClientGetResponse{}, err } - return client.getHandleResponse(resp) + resp, err := client.getHandleResponse(httpResp) + return resp, err } // getCreateRequest creates the Get request. diff --git a/sdk/resourcemanager/resources/armlinks/response_types.go b/sdk/resourcemanager/resources/armlinks/response_types.go index 057a520fa12a..4e5421d02af3 100644 --- a/sdk/resourcemanager/resources/armlinks/response_types.go +++ b/sdk/resourcemanager/resources/armlinks/response_types.go @@ -3,19 +3,21 @@ // 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. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. package armlinks // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the + // next set of results. OperationListResult } // ResourceLinksClientCreateOrUpdateResponse contains the response from method ResourceLinksClient.CreateOrUpdate. type ResourceLinksClientCreateOrUpdateResponse struct { + // The resource link. ResourceLink } @@ -26,15 +28,18 @@ type ResourceLinksClientDeleteResponse struct { // ResourceLinksClientGetResponse contains the response from method ResourceLinksClient.Get. type ResourceLinksClientGetResponse struct { + // The resource link. ResourceLink } // ResourceLinksClientListAtSourceScopeResponse contains the response from method ResourceLinksClient.NewListAtSourceScopePager. type ResourceLinksClientListAtSourceScopeResponse struct { + // List of resource links. ResourceLinkResult } // ResourceLinksClientListAtSubscriptionResponse contains the response from method ResourceLinksClient.NewListAtSubscriptionPager. type ResourceLinksClientListAtSubscriptionResponse struct { + // List of resource links. ResourceLinkResult }