diff --git a/sdk/keyvault/armkeyvault/CHANGELOG.md b/sdk/keyvault/armkeyvault/CHANGELOG.md index c7196df9ed8b..ba10d442d9fb 100644 --- a/sdk/keyvault/armkeyvault/CHANGELOG.md +++ b/sdk/keyvault/armkeyvault/CHANGELOG.md @@ -1,3 +1,6 @@ # Release History +## v0.1.1 (released) +Updated with the latest track 2 code generator. + ## v0.1.0 (released) diff --git a/sdk/storage/armstorage/_meta.json b/sdk/storage/armstorage/_meta.json index 2f533d6820f6..9c73afe3ac8c 100644 --- a/sdk/storage/armstorage/_meta.json +++ b/sdk/storage/armstorage/_meta.json @@ -2,9 +2,9 @@ "commit": "f69f2e8053ac8ae352b11c33655234dea4cf4cfd", "readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", "tag": "package-2021-04", - "use": "@autorest/go@4.0.0-preview.20", + "use": "@autorest/go@4.0.0-preview.22", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@autorest/go@4.0.0-preview.20 --version:3.2.1 --go --track2 --go-sdk-folder=/_/azure-sdk-for-go --file-prefix=\"zz_generated_\" --clear-output-folder=false --modelerfour.lenient-model-deduplication /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", + "autorest_command": "autorest --use=@autorest/go@4.0.0-preview.22 --version:3.2.1 --go --track2 --go-sdk-folder=/_/azure-sdk-for-go --file-prefix=\"zz_generated_\" --clear-output-folder=false --modelerfour.lenient-model-deduplication /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md", "additional_properties": { "additional_options": "--version:3.2.1 --go --track2 --file-prefix=\"zz_generated_\" --clear-output-folder=false --modelerfour.lenient-model-deduplication" } diff --git a/sdk/storage/armstorage/go.mod b/sdk/storage/armstorage/go.mod index 26b5677c3837..c0d97af285a6 100644 --- a/sdk/storage/armstorage/go.mod +++ b/sdk/storage/armstorage/go.mod @@ -3,9 +3,9 @@ module github.com/Azure/azure-sdk-for-go/sdk/storage/armstorage go 1.13 require ( - github.com/Azure/azure-sdk-for-go v54.3.0+incompatible - github.com/Azure/azure-sdk-for-go/sdk/armcore v0.7.1 - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 + github.com/Azure/azure-sdk-for-go v55.2.0+incompatible + github.com/Azure/azure-sdk-for-go/sdk/armcore v0.8.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.1 github.com/Azure/azure-sdk-for-go/sdk/to v0.1.4 ) diff --git a/sdk/storage/armstorage/go.sum b/sdk/storage/armstorage/go.sum index f56e067c81aa..181427723a13 100644 --- a/sdk/storage/armstorage/go.sum +++ b/sdk/storage/armstorage/go.sum @@ -1,10 +1,10 @@ -github.com/Azure/azure-sdk-for-go v54.3.0+incompatible h1:aJ/WT32eVP8YmWpuSHLgnFJWjZzUFmhR3wBxxszo4PE= -github.com/Azure/azure-sdk-for-go v54.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/armcore v0.7.1 h1:qvtCPHEhkkkiuHqoQU3c0a21l6qO3sXgpa3aC/SO4w8= -github.com/Azure/azure-sdk-for-go/sdk/armcore v0.7.1/go.mod h1:6yYd2qNvutd94jHTMUg9KrdbR39jNzI4d+15lm2gxkg= +github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= +github.com/Azure/azure-sdk-for-go v55.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/armcore v0.8.0 h1:HQQoaSGOh32mpoRkpLDjkngMwYJqkxu93FRx0epdLHE= +github.com/Azure/azure-sdk-for-go/sdk/armcore v0.8.0/go.mod h1:BSKvHb/5cy8j4hahIInXH92X/2zGJ3TxKF6b9pw1Btg= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.14.0/go.mod h1:pElNP+u99BvCZD+0jOlhI9OC/NB2IDTOTGZOZH0Qhq8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1 h1:yQw8Ah26gBP4dv66ZNjZpRBRV+gaHH/0TLn1taU4FZ4= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.1/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2 h1:UC4vfOhW2l0f2QOCQpOxJS4/K6oKFy2tQZE+uWU1MEo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.16.2/go.mod h1:MVdrcUC4Hup35qHym3VdzoW+NBgBxrta9Vei97jRtM8= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.1 h1:KchdKK3XlOjkzBROV+q3D+YgfRTvwoeBwbaoX4aVkjI= github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.9.1/go.mod h1:acANgl9stsT5xflESXKjZx4rhZJSr0TGgTDYY0xJPIE= github.com/Azure/azure-sdk-for-go/sdk/internal v0.5.0/go.mod h1:k4KbFSunV/+0hOHL1vyFaPsiYQ1Vmvy1TBpmtvCDLZM= diff --git a/sdk/storage/armstorage/zz_generated_blobcontainers_client.go b/sdk/storage/armstorage/zz_generated_blobcontainers_client.go index eb3023303918..802c233ec41c 100644 --- a/sdk/storage/armstorage/zz_generated_blobcontainers_client.go +++ b/sdk/storage/armstorage/zz_generated_blobcontainers_client.go @@ -847,13 +847,12 @@ func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, re result := HTTPPollerResponse{ RawResponse: resp.Response, } - pt, err := armcore.NewPoller("BlobContainersClient.ObjectLevelWorm", "location", resp, client.objectLevelWormHandleError) + pt, err := armcore.NewLROPoller("BlobContainersClient.ObjectLevelWorm", "location", resp, client.con.Pipeline(), client.objectLevelWormHandleError) if err != nil { return HTTPPollerResponse{}, err } poller := &httpPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } result.Poller = poller result.PollUntilDone = func(ctx context.Context, frequency time.Duration) (*http.Response, error) { @@ -865,13 +864,12 @@ func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context, re // ResumeObjectLevelWorm creates a new HTTPPoller from the specified resume token. // token - The value must come from a previous call to HTTPPoller.ResumeToken(). func (client *BlobContainersClient) ResumeObjectLevelWorm(ctx context.Context, token string) (HTTPPollerResponse, error) { - pt, err := armcore.NewPollerFromResumeToken("BlobContainersClient.ObjectLevelWorm", token, client.objectLevelWormHandleError) + pt, err := armcore.NewLROPollerFromResumeToken("BlobContainersClient.ObjectLevelWorm", token, client.con.Pipeline(), client.objectLevelWormHandleError) if err != nil { return HTTPPollerResponse{}, err } poller := &httpPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } resp, err := poller.Poll(ctx) if err != nil { diff --git a/sdk/storage/armstorage/zz_generated_connection.go b/sdk/storage/armstorage/zz_generated_connection.go deleted file mode 100644 index 15f02a134eb9..000000000000 --- a/sdk/storage/armstorage/zz_generated_connection.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build go1.13 - -// 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 armstorage - -const telemetryInfo = "azsdk-go-armstorage/v0.1.0" diff --git a/sdk/storage/armstorage/zz_generated_constants.go b/sdk/storage/armstorage/zz_generated_constants.go index 8b896131fe13..d539c46eec64 100644 --- a/sdk/storage/armstorage/zz_generated_constants.go +++ b/sdk/storage/armstorage/zz_generated_constants.go @@ -7,6 +7,8 @@ package armstorage +const telemetryInfo = "azsdk-go-armstorage/v0.1.1" + // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier used for billing. type AccessTier string diff --git a/sdk/storage/armstorage/zz_generated_pagers.go b/sdk/storage/armstorage/zz_generated_pagers.go index a421fa7c38a6..1997de585191 100644 --- a/sdk/storage/armstorage/zz_generated_pagers.go +++ b/sdk/storage/armstorage/zz_generated_pagers.go @@ -17,7 +17,7 @@ import ( type DeletedAccountListResultPager interface { azcore.Pager - // Page returns the current DeletedAccountListResultResponse. + // PageResponse returns the current DeletedAccountListResultResponse. PageResponse() DeletedAccountListResultResponse } @@ -93,7 +93,7 @@ func (p *deletedAccountListResultPager) PageResponse() DeletedAccountListResultR type EncryptionScopeListResultPager interface { azcore.Pager - // Page returns the current EncryptionScopeListResultResponse. + // PageResponse returns the current EncryptionScopeListResultResponse. PageResponse() EncryptionScopeListResultResponse } @@ -169,7 +169,7 @@ func (p *encryptionScopeListResultPager) PageResponse() EncryptionScopeListResul type FileShareItemsPager interface { azcore.Pager - // Page returns the current FileShareItemsResponse. + // PageResponse returns the current FileShareItemsResponse. PageResponse() FileShareItemsResponse } @@ -245,7 +245,7 @@ func (p *fileShareItemsPager) PageResponse() FileShareItemsResponse { type ListContainerItemsPager interface { azcore.Pager - // Page returns the current ListContainerItemsResponse. + // PageResponse returns the current ListContainerItemsResponse. PageResponse() ListContainerItemsResponse } @@ -321,7 +321,7 @@ func (p *listContainerItemsPager) PageResponse() ListContainerItemsResponse { type ListQueueResourcePager interface { azcore.Pager - // Page returns the current ListQueueResourceResponse. + // PageResponse returns the current ListQueueResourceResponse. PageResponse() ListQueueResourceResponse } @@ -397,7 +397,7 @@ func (p *listQueueResourcePager) PageResponse() ListQueueResourceResponse { type ListTableResourcePager interface { azcore.Pager - // Page returns the current ListTableResourceResponse. + // PageResponse returns the current ListTableResourceResponse. PageResponse() ListTableResourceResponse } @@ -473,7 +473,7 @@ func (p *listTableResourcePager) PageResponse() ListTableResourceResponse { type StorageAccountListResultPager interface { azcore.Pager - // Page returns the current StorageAccountListResultResponse. + // PageResponse returns the current StorageAccountListResultResponse. PageResponse() StorageAccountListResultResponse } diff --git a/sdk/storage/armstorage/zz_generated_pollers.go b/sdk/storage/armstorage/zz_generated_pollers.go index 14c93eff50fe..dc3a032d0942 100644 --- a/sdk/storage/armstorage/zz_generated_pollers.go +++ b/sdk/storage/armstorage/zz_generated_pollers.go @@ -25,8 +25,7 @@ type BlobRestoreStatusPoller interface { } type blobRestoreStatusPoller struct { - pipeline azcore.Pipeline - pt armcore.Poller + pt *armcore.LROPoller } func (p *blobRestoreStatusPoller) Done() bool { @@ -34,12 +33,12 @@ func (p *blobRestoreStatusPoller) Done() bool { } func (p *blobRestoreStatusPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx, p.pipeline) + return p.pt.Poll(ctx) } func (p *blobRestoreStatusPoller) FinalResponse(ctx context.Context) (BlobRestoreStatusResponse, error) { respType := BlobRestoreStatusResponse{BlobRestoreStatus: &BlobRestoreStatus{}} - resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.BlobRestoreStatus) + resp, err := p.pt.FinalResponse(ctx, respType.BlobRestoreStatus) if err != nil { return BlobRestoreStatusResponse{}, err } @@ -53,7 +52,7 @@ func (p *blobRestoreStatusPoller) ResumeToken() (string, error) { func (p *blobRestoreStatusPoller) pollUntilDone(ctx context.Context, freq time.Duration) (BlobRestoreStatusResponse, error) { respType := BlobRestoreStatusResponse{BlobRestoreStatus: &BlobRestoreStatus{}} - resp, err := p.pt.PollUntilDone(ctx, freq, p.pipeline, respType.BlobRestoreStatus) + resp, err := p.pt.PollUntilDone(ctx, freq, respType.BlobRestoreStatus) if err != nil { return BlobRestoreStatusResponse{}, err } @@ -71,8 +70,7 @@ type HTTPPoller interface { } type httpPoller struct { - pipeline azcore.Pipeline - pt armcore.Poller + pt *armcore.LROPoller } func (p *httpPoller) Done() bool { @@ -80,11 +78,11 @@ func (p *httpPoller) Done() bool { } func (p *httpPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx, p.pipeline) + return p.pt.Poll(ctx) } func (p *httpPoller) FinalResponse(ctx context.Context) (*http.Response, error) { - return p.pt.FinalResponse(ctx, p.pipeline, nil) + return p.pt.FinalResponse(ctx, nil) } func (p *httpPoller) ResumeToken() (string, error) { @@ -92,7 +90,7 @@ func (p *httpPoller) ResumeToken() (string, error) { } func (p *httpPoller) pollUntilDone(ctx context.Context, freq time.Duration) (*http.Response, error) { - return p.pt.PollUntilDone(ctx, freq, p.pipeline, nil) + return p.pt.PollUntilDone(ctx, freq, nil) } // StorageAccountPoller provides polling facilities until the operation reaches a terminal state. @@ -105,8 +103,7 @@ type StorageAccountPoller interface { } type storageAccountPoller struct { - pipeline azcore.Pipeline - pt armcore.Poller + pt *armcore.LROPoller } func (p *storageAccountPoller) Done() bool { @@ -114,12 +111,12 @@ func (p *storageAccountPoller) Done() bool { } func (p *storageAccountPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx, p.pipeline) + return p.pt.Poll(ctx) } func (p *storageAccountPoller) FinalResponse(ctx context.Context) (StorageAccountResponse, error) { respType := StorageAccountResponse{StorageAccount: &StorageAccount{}} - resp, err := p.pt.FinalResponse(ctx, p.pipeline, respType.StorageAccount) + resp, err := p.pt.FinalResponse(ctx, respType.StorageAccount) if err != nil { return StorageAccountResponse{}, err } @@ -133,7 +130,7 @@ func (p *storageAccountPoller) ResumeToken() (string, error) { func (p *storageAccountPoller) pollUntilDone(ctx context.Context, freq time.Duration) (StorageAccountResponse, error) { respType := StorageAccountResponse{StorageAccount: &StorageAccount{}} - resp, err := p.pt.PollUntilDone(ctx, freq, p.pipeline, respType.StorageAccount) + resp, err := p.pt.PollUntilDone(ctx, freq, respType.StorageAccount) if err != nil { return StorageAccountResponse{}, err } diff --git a/sdk/storage/armstorage/zz_generated_storageaccounts_client.go b/sdk/storage/armstorage/zz_generated_storageaccounts_client.go index 8ea7ff41b495..fbf8afbcbeb5 100644 --- a/sdk/storage/armstorage/zz_generated_storageaccounts_client.go +++ b/sdk/storage/armstorage/zz_generated_storageaccounts_client.go @@ -100,13 +100,12 @@ func (client *StorageAccountsClient) BeginCreate(ctx context.Context, resourceGr result := StorageAccountPollerResponse{ RawResponse: resp.Response, } - pt, err := armcore.NewPoller("StorageAccountsClient.Create", "", resp, client.createHandleError) + pt, err := armcore.NewLROPoller("StorageAccountsClient.Create", "", resp, client.con.Pipeline(), client.createHandleError) if err != nil { return StorageAccountPollerResponse{}, err } poller := &storageAccountPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } result.Poller = poller result.PollUntilDone = func(ctx context.Context, frequency time.Duration) (StorageAccountResponse, error) { @@ -118,13 +117,12 @@ func (client *StorageAccountsClient) BeginCreate(ctx context.Context, resourceGr // ResumeCreate creates a new StorageAccountPoller from the specified resume token. // token - The value must come from a previous call to StorageAccountPoller.ResumeToken(). func (client *StorageAccountsClient) ResumeCreate(ctx context.Context, token string) (StorageAccountPollerResponse, error) { - pt, err := armcore.NewPollerFromResumeToken("StorageAccountsClient.Create", token, client.createHandleError) + pt, err := armcore.NewLROPollerFromResumeToken("StorageAccountsClient.Create", token, client.con.Pipeline(), client.createHandleError) if err != nil { return StorageAccountPollerResponse{}, err } poller := &storageAccountPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } resp, err := poller.Poll(ctx) if err != nil { @@ -266,13 +264,12 @@ func (client *StorageAccountsClient) BeginFailover(ctx context.Context, resource result := HTTPPollerResponse{ RawResponse: resp.Response, } - pt, err := armcore.NewPoller("StorageAccountsClient.Failover", "location", resp, client.failoverHandleError) + pt, err := armcore.NewLROPoller("StorageAccountsClient.Failover", "location", resp, client.con.Pipeline(), client.failoverHandleError) if err != nil { return HTTPPollerResponse{}, err } poller := &httpPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } result.Poller = poller result.PollUntilDone = func(ctx context.Context, frequency time.Duration) (*http.Response, error) { @@ -284,13 +281,12 @@ func (client *StorageAccountsClient) BeginFailover(ctx context.Context, resource // ResumeFailover creates a new HTTPPoller from the specified resume token. // token - The value must come from a previous call to HTTPPoller.ResumeToken(). func (client *StorageAccountsClient) ResumeFailover(ctx context.Context, token string) (HTTPPollerResponse, error) { - pt, err := armcore.NewPollerFromResumeToken("StorageAccountsClient.Failover", token, client.failoverHandleError) + pt, err := armcore.NewLROPollerFromResumeToken("StorageAccountsClient.Failover", token, client.con.Pipeline(), client.failoverHandleError) if err != nil { return HTTPPollerResponse{}, err } poller := &httpPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } resp, err := poller.Poll(ctx) if err != nil { @@ -824,13 +820,12 @@ func (client *StorageAccountsClient) BeginRestoreBlobRanges(ctx context.Context, result := BlobRestoreStatusPollerResponse{ RawResponse: resp.Response, } - pt, err := armcore.NewPoller("StorageAccountsClient.RestoreBlobRanges", "location", resp, client.restoreBlobRangesHandleError) + pt, err := armcore.NewLROPoller("StorageAccountsClient.RestoreBlobRanges", "location", resp, client.con.Pipeline(), client.restoreBlobRangesHandleError) if err != nil { return BlobRestoreStatusPollerResponse{}, err } poller := &blobRestoreStatusPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } result.Poller = poller result.PollUntilDone = func(ctx context.Context, frequency time.Duration) (BlobRestoreStatusResponse, error) { @@ -842,13 +837,12 @@ func (client *StorageAccountsClient) BeginRestoreBlobRanges(ctx context.Context, // ResumeRestoreBlobRanges creates a new BlobRestoreStatusPoller from the specified resume token. // token - The value must come from a previous call to BlobRestoreStatusPoller.ResumeToken(). func (client *StorageAccountsClient) ResumeRestoreBlobRanges(ctx context.Context, token string) (BlobRestoreStatusPollerResponse, error) { - pt, err := armcore.NewPollerFromResumeToken("StorageAccountsClient.RestoreBlobRanges", token, client.restoreBlobRangesHandleError) + pt, err := armcore.NewLROPollerFromResumeToken("StorageAccountsClient.RestoreBlobRanges", token, client.con.Pipeline(), client.restoreBlobRangesHandleError) if err != nil { return BlobRestoreStatusPollerResponse{}, err } poller := &blobRestoreStatusPoller{ - pipeline: client.con.Pipeline(), - pt: pt, + pt: pt, } resp, err := poller.Poll(ctx) if err != nil {