diff --git a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md index f6bfb1fcb5f3..e53039469877 100644 --- a/sdk/resourcemanager/storage/armstorage/CHANGELOG.md +++ b/sdk/resourcemanager/storage/armstorage/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.4.0-beta.2 (2023-07-19) + +### Bug Fixes + +- Fixed a potential panic in faked paged and long-running operations. + ## 1.4.0-beta.1 (2023-06-12) ### Features Added diff --git a/sdk/resourcemanager/storage/armstorage/autorest.md b/sdk/resourcemanager/storage/armstorage/autorest.md index bdccfd3a0d64..697c87873bdc 100644 --- a/sdk/resourcemanager/storage/armstorage/autorest.md +++ b/sdk/resourcemanager/storage/armstorage/autorest.md @@ -9,8 +9,8 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/b32e1896f30e6ea155449cb49719a6286e32b961/specification/storage/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage -module-version: 1.4.0-beta.1 -azcore-version: 1.7.0-beta.2 +module-version: 1.4.0-beta.2 +azcore-version: 1.8.0-beta.1 generate-fakes: true inject-spans: true modelerfour: diff --git a/sdk/resourcemanager/storage/armstorage/build.go b/sdk/resourcemanager/storage/armstorage/build.go index 783f5618d9b4..04db78ffce8d 100644 --- a/sdk/resourcemanager/storage/armstorage/build.go +++ b/sdk/resourcemanager/storage/armstorage/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.51" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/storage/armstorage +//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.53" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/storage/armstorage package armstorage diff --git a/sdk/resourcemanager/storage/armstorage/client_factory.go b/sdk/resourcemanager/storage/armstorage/client_factory.go index 12acb7ba89f0..506a9e0d5d2a 100644 --- a/sdk/resourcemanager/storage/armstorage/client_factory.go +++ b/sdk/resourcemanager/storage/armstorage/client_factory.go @@ -37,18 +37,23 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewAccountsClient() *AccountsClient { + subClient, _ := NewAccountsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSKUsClient() *SKUsClient { - subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBlobContainersClient() *BlobContainersClient { + subClient, _ := NewBlobContainersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAccountsClient() *AccountsClient { - subClient, _ := NewAccountsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBlobInventoryPoliciesClient() *BlobInventoryPoliciesClient { + subClient, _ := NewBlobInventoryPoliciesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewBlobServicesClient() *BlobServicesClient { + subClient, _ := NewBlobServicesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -57,28 +62,28 @@ func (c *ClientFactory) NewDeletedAccountsClient() *DeletedAccountsClient { return subClient } -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient { + subClient, _ := NewEncryptionScopesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewManagementPoliciesClient() *ManagementPoliciesClient { - subClient, _ := NewManagementPoliciesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFileServicesClient() *FileServicesClient { + subClient, _ := NewFileServicesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBlobInventoryPoliciesClient() *BlobInventoryPoliciesClient { - subClient, _ := NewBlobInventoryPoliciesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFileSharesClient() *FileSharesClient { + subClient, _ := NewFileSharesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { - subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLocalUsersClient() *LocalUsersClient { + subClient, _ := NewLocalUsersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { - subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagementPoliciesClient() *ManagementPoliciesClient { + subClient, _ := NewManagementPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -87,43 +92,38 @@ func (c *ClientFactory) NewObjectReplicationPoliciesClient() *ObjectReplicationP return subClient } -func (c *ClientFactory) NewLocalUsersClient() *LocalUsersClient { - subClient, _ := NewLocalUsersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewEncryptionScopesClient() *EncryptionScopesClient { - subClient, _ := NewEncryptionScopesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewBlobServicesClient() *BlobServicesClient { - subClient, _ := NewBlobServicesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient { + subClient, _ := NewPrivateEndpointConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBlobContainersClient() *BlobContainersClient { - subClient, _ := NewBlobContainersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient { + subClient, _ := NewPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFileServicesClient() *FileServicesClient { - subClient, _ := NewFileServicesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewQueueClient() *QueueClient { + subClient, _ := NewQueueClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFileSharesClient() *FileSharesClient { - subClient, _ := NewFileSharesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewQueueServicesClient() *QueueServicesClient { + subClient, _ := NewQueueServicesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewQueueServicesClient() *QueueServicesClient { - subClient, _ := NewQueueServicesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSKUsClient() *SKUsClient { + subClient, _ := NewSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewQueueClient() *QueueClient { - subClient, _ := NewQueueClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewTableClient() *TableClient { + subClient, _ := NewTableClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -132,7 +132,7 @@ func (c *ClientFactory) NewTableServicesClient() *TableServicesClient { return subClient } -func (c *ClientFactory) NewTableClient() *TableClient { - subClient, _ := NewTableClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } diff --git a/sdk/resourcemanager/storage/armstorage/constants.go b/sdk/resourcemanager/storage/armstorage/constants.go index a0098047ffcf..ce050b713d33 100644 --- a/sdk/resourcemanager/storage/armstorage/constants.go +++ b/sdk/resourcemanager/storage/armstorage/constants.go @@ -10,7 +10,7 @@ package armstorage const ( moduleName = "armstorage" - moduleVersion = "v1.4.0-beta.1" + moduleVersion = "v1.4.0-beta.2" ) // AccessTier - Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' diff --git a/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go b/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go index 0acb06d10e22..def2e7d56d5d 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/accounts_server.go @@ -90,23 +90,32 @@ type AccountsServer struct { } // NewAccountsServerTransport creates a new instance of AccountsServerTransport with the provided implementation. -// The returned AccountsServerTransport instance is connected to an instance of armstorage.AccountsClient by way of the -// undefined.Transporter field. +// The returned AccountsServerTransport instance is connected to an instance of armstorage.AccountsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAccountsServerTransport(srv *AccountsServer) *AccountsServerTransport { - return &AccountsServerTransport{srv: srv} + return &AccountsServerTransport{ + srv: srv, + beginAbortHierarchicalNamespaceMigration: newTracker[azfake.PollerResponder[armstorage.AccountsClientAbortHierarchicalNamespaceMigrationResponse]](), + beginCreate: newTracker[azfake.PollerResponder[armstorage.AccountsClientCreateResponse]](), + beginFailover: newTracker[azfake.PollerResponder[armstorage.AccountsClientFailoverResponse]](), + beginHierarchicalNamespaceMigration: newTracker[azfake.PollerResponder[armstorage.AccountsClientHierarchicalNamespaceMigrationResponse]](), + newListPager: newTracker[azfake.PagerResponder[armstorage.AccountsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armstorage.AccountsClientListByResourceGroupResponse]](), + beginRestoreBlobRanges: newTracker[azfake.PollerResponder[armstorage.AccountsClientRestoreBlobRangesResponse]](), + } } // AccountsServerTransport connects instances of armstorage.AccountsClient to instances of AccountsServer. // Don't use this type directly, use NewAccountsServerTransport instead. type AccountsServerTransport struct { srv *AccountsServer - beginAbortHierarchicalNamespaceMigration *azfake.PollerResponder[armstorage.AccountsClientAbortHierarchicalNamespaceMigrationResponse] - beginCreate *azfake.PollerResponder[armstorage.AccountsClientCreateResponse] - beginFailover *azfake.PollerResponder[armstorage.AccountsClientFailoverResponse] - beginHierarchicalNamespaceMigration *azfake.PollerResponder[armstorage.AccountsClientHierarchicalNamespaceMigrationResponse] - newListPager *azfake.PagerResponder[armstorage.AccountsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armstorage.AccountsClientListByResourceGroupResponse] - beginRestoreBlobRanges *azfake.PollerResponder[armstorage.AccountsClientRestoreBlobRangesResponse] + beginAbortHierarchicalNamespaceMigration *tracker[azfake.PollerResponder[armstorage.AccountsClientAbortHierarchicalNamespaceMigrationResponse]] + beginCreate *tracker[azfake.PollerResponder[armstorage.AccountsClientCreateResponse]] + beginFailover *tracker[azfake.PollerResponder[armstorage.AccountsClientFailoverResponse]] + beginHierarchicalNamespaceMigration *tracker[azfake.PollerResponder[armstorage.AccountsClientHierarchicalNamespaceMigrationResponse]] + newListPager *tracker[azfake.PagerResponder[armstorage.AccountsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armstorage.AccountsClientListByResourceGroupResponse]] + beginRestoreBlobRanges *tracker[azfake.PollerResponder[armstorage.AccountsClientRestoreBlobRangesResponse]] } // Do implements the policy.Transporter interface for AccountsServerTransport. @@ -168,7 +177,8 @@ func (a *AccountsServerTransport) dispatchBeginAbortHierarchicalNamespaceMigrati if a.srv.BeginAbortHierarchicalNamespaceMigration == nil { return nil, &nonRetriableError{errors.New("fake for method BeginAbortHierarchicalNamespaceMigration not implemented")} } - if a.beginAbortHierarchicalNamespaceMigration == nil { + beginAbortHierarchicalNamespaceMigration := a.beginAbortHierarchicalNamespaceMigration.get(req) + if beginAbortHierarchicalNamespaceMigration == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/aborthnsonmigration` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -187,19 +197,21 @@ func (a *AccountsServerTransport) dispatchBeginAbortHierarchicalNamespaceMigrati if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginAbortHierarchicalNamespaceMigration = &respr + beginAbortHierarchicalNamespaceMigration = &respr + a.beginAbortHierarchicalNamespaceMigration.add(req, beginAbortHierarchicalNamespaceMigration) } - resp, err := server.PollerResponderNext(a.beginAbortHierarchicalNamespaceMigration, req) + resp, err := server.PollerResponderNext(beginAbortHierarchicalNamespaceMigration, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginAbortHierarchicalNamespaceMigration.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginAbortHierarchicalNamespaceMigration) { - a.beginAbortHierarchicalNamespaceMigration = nil + if !server.PollerResponderMore(beginAbortHierarchicalNamespaceMigration) { + a.beginAbortHierarchicalNamespaceMigration.remove(req) } return resp, nil @@ -238,7 +250,8 @@ func (a *AccountsServerTransport) dispatchBeginCreate(req *http.Request) (*http. if a.srv.BeginCreate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreate not implemented")} } - if a.beginCreate == nil { + beginCreate := a.beginCreate.get(req) + if beginCreate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -261,19 +274,21 @@ func (a *AccountsServerTransport) dispatchBeginCreate(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginCreate = &respr + beginCreate = &respr + a.beginCreate.add(req, beginCreate) } - resp, err := server.PollerResponderNext(a.beginCreate, req) + resp, err := server.PollerResponderNext(beginCreate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginCreate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginCreate) { - a.beginCreate = nil + if !server.PollerResponderMore(beginCreate) { + a.beginCreate.remove(req) } return resp, nil @@ -316,7 +331,8 @@ func (a *AccountsServerTransport) dispatchBeginFailover(req *http.Request) (*htt if a.srv.BeginFailover == nil { return nil, &nonRetriableError{errors.New("fake for method BeginFailover not implemented")} } - if a.beginFailover == nil { + beginFailover := a.beginFailover.get(req) + if beginFailover == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/failover` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -347,19 +363,21 @@ func (a *AccountsServerTransport) dispatchBeginFailover(req *http.Request) (*htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginFailover = &respr + beginFailover = &respr + a.beginFailover.add(req, beginFailover) } - resp, err := server.PollerResponderNext(a.beginFailover, req) + resp, err := server.PollerResponderNext(beginFailover, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginFailover.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginFailover) { - a.beginFailover = nil + if !server.PollerResponderMore(beginFailover) { + a.beginFailover.remove(req) } return resp, nil @@ -414,7 +432,8 @@ func (a *AccountsServerTransport) dispatchBeginHierarchicalNamespaceMigration(re if a.srv.BeginHierarchicalNamespaceMigration == nil { return nil, &nonRetriableError{errors.New("fake for method BeginHierarchicalNamespaceMigration not implemented")} } - if a.beginHierarchicalNamespaceMigration == nil { + beginHierarchicalNamespaceMigration := a.beginHierarchicalNamespaceMigration.get(req) + if beginHierarchicalNamespaceMigration == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hnsonmigration` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -438,19 +457,21 @@ func (a *AccountsServerTransport) dispatchBeginHierarchicalNamespaceMigration(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginHierarchicalNamespaceMigration = &respr + beginHierarchicalNamespaceMigration = &respr + a.beginHierarchicalNamespaceMigration.add(req, beginHierarchicalNamespaceMigration) } - resp, err := server.PollerResponderNext(a.beginHierarchicalNamespaceMigration, req) + resp, err := server.PollerResponderNext(beginHierarchicalNamespaceMigration, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginHierarchicalNamespaceMigration.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginHierarchicalNamespaceMigration) { - a.beginHierarchicalNamespaceMigration = nil + if !server.PollerResponderMore(beginHierarchicalNamespaceMigration) { + a.beginHierarchicalNamespaceMigration.remove(req) } return resp, nil @@ -460,7 +481,8 @@ func (a *AccountsServerTransport) dispatchNewListPager(req *http.Request) (*http if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -468,20 +490,22 @@ func (a *AccountsServerTransport) dispatchNewListPager(req *http.Request) (*http return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := a.srv.NewListPager(nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armstorage.AccountsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.AccountsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -527,7 +551,8 @@ func (a *AccountsServerTransport) dispatchNewListByResourceGroupPager(req *http. if a.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if a.newListByResourceGroupPager == nil { + newListByResourceGroupPager := a.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -539,20 +564,22 @@ func (a *AccountsServerTransport) dispatchNewListByResourceGroupPager(req *http. return nil, err } resp := a.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - a.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(a.newListByResourceGroupPager, req, func(page *armstorage.AccountsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + a.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armstorage.AccountsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListByResourceGroupPager) { - a.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + a.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -680,7 +707,8 @@ func (a *AccountsServerTransport) dispatchBeginRestoreBlobRanges(req *http.Reque if a.srv.BeginRestoreBlobRanges == nil { return nil, &nonRetriableError{errors.New("fake for method BeginRestoreBlobRanges not implemented")} } - if a.beginRestoreBlobRanges == nil { + beginRestoreBlobRanges := a.beginRestoreBlobRanges.get(req) + if beginRestoreBlobRanges == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/restoreBlobRanges` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -703,19 +731,21 @@ func (a *AccountsServerTransport) dispatchBeginRestoreBlobRanges(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginRestoreBlobRanges = &respr + beginRestoreBlobRanges = &respr + a.beginRestoreBlobRanges.add(req, beginRestoreBlobRanges) } - resp, err := server.PollerResponderNext(a.beginRestoreBlobRanges, req) + resp, err := server.PollerResponderNext(beginRestoreBlobRanges, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginRestoreBlobRanges.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginRestoreBlobRanges) { - a.beginRestoreBlobRanges = nil + if !server.PollerResponderMore(beginRestoreBlobRanges) { + a.beginRestoreBlobRanges.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/storage/armstorage/fake/blobcontainers_server.go b/sdk/resourcemanager/storage/armstorage/fake/blobcontainers_server.go index 7e70c154ac61..62bf8ea80f02 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/blobcontainers_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/blobcontainers_server.go @@ -83,18 +83,22 @@ type BlobContainersServer struct { } // NewBlobContainersServerTransport creates a new instance of BlobContainersServerTransport with the provided implementation. -// The returned BlobContainersServerTransport instance is connected to an instance of armstorage.BlobContainersClient by way of the -// undefined.Transporter field. +// The returned BlobContainersServerTransport instance is connected to an instance of armstorage.BlobContainersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewBlobContainersServerTransport(srv *BlobContainersServer) *BlobContainersServerTransport { - return &BlobContainersServerTransport{srv: srv} + return &BlobContainersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.BlobContainersClientListResponse]](), + beginObjectLevelWorm: newTracker[azfake.PollerResponder[armstorage.BlobContainersClientObjectLevelWormResponse]](), + } } // BlobContainersServerTransport connects instances of armstorage.BlobContainersClient to instances of BlobContainersServer. // Don't use this type directly, use NewBlobContainersServerTransport instead. type BlobContainersServerTransport struct { srv *BlobContainersServer - newListPager *azfake.PagerResponder[armstorage.BlobContainersClientListResponse] - beginObjectLevelWorm *azfake.PollerResponder[armstorage.BlobContainersClientObjectLevelWormResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.BlobContainersClientListResponse]] + beginObjectLevelWorm *tracker[azfake.PollerResponder[armstorage.BlobContainersClientObjectLevelWormResponse]] } // Do implements the policy.Transporter interface for BlobContainersServerTransport. @@ -544,7 +548,8 @@ func (b *BlobContainersServerTransport) dispatchNewListPager(req *http.Request) if b.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if b.newListPager == nil { + newListPager := b.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/blobServices/default/containers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -584,20 +589,22 @@ func (b *BlobContainersServerTransport) dispatchNewListPager(req *http.Request) } } resp := b.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, options) - b.newListPager = &resp - server.PagerResponderInjectNextLinks(b.newListPager, req, func(page *armstorage.BlobContainersClientListResponse, createLink func() string) { + newListPager = &resp + b.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.BlobContainersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(b.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(b.newListPager) { - b.newListPager = nil + if !server.PagerResponderMore(newListPager) { + b.newListPager.remove(req) } return resp, nil } @@ -646,7 +653,8 @@ func (b *BlobContainersServerTransport) dispatchBeginObjectLevelWorm(req *http.R if b.srv.BeginObjectLevelWorm == nil { return nil, &nonRetriableError{errors.New("fake for method BeginObjectLevelWorm not implemented")} } - if b.beginObjectLevelWorm == nil { + beginObjectLevelWorm := b.beginObjectLevelWorm.get(req) + if beginObjectLevelWorm == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/blobServices/default/containers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/migrate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -669,19 +677,21 @@ func (b *BlobContainersServerTransport) dispatchBeginObjectLevelWorm(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - b.beginObjectLevelWorm = &respr + beginObjectLevelWorm = &respr + b.beginObjectLevelWorm.add(req, beginObjectLevelWorm) } - resp, err := server.PollerResponderNext(b.beginObjectLevelWorm, req) + resp, err := server.PollerResponderNext(beginObjectLevelWorm, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + b.beginObjectLevelWorm.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(b.beginObjectLevelWorm) { - b.beginObjectLevelWorm = nil + if !server.PollerResponderMore(beginObjectLevelWorm) { + b.beginObjectLevelWorm.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/storage/armstorage/fake/blobinventorypolicies_server.go b/sdk/resourcemanager/storage/armstorage/fake/blobinventorypolicies_server.go index 9cf662468441..380f4c6e45cd 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/blobinventorypolicies_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/blobinventorypolicies_server.go @@ -41,17 +41,20 @@ type BlobInventoryPoliciesServer struct { } // NewBlobInventoryPoliciesServerTransport creates a new instance of BlobInventoryPoliciesServerTransport with the provided implementation. -// The returned BlobInventoryPoliciesServerTransport instance is connected to an instance of armstorage.BlobInventoryPoliciesClient by way of the -// undefined.Transporter field. +// The returned BlobInventoryPoliciesServerTransport instance is connected to an instance of armstorage.BlobInventoryPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewBlobInventoryPoliciesServerTransport(srv *BlobInventoryPoliciesServer) *BlobInventoryPoliciesServerTransport { - return &BlobInventoryPoliciesServerTransport{srv: srv} + return &BlobInventoryPoliciesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.BlobInventoryPoliciesClientListResponse]](), + } } // BlobInventoryPoliciesServerTransport connects instances of armstorage.BlobInventoryPoliciesClient to instances of BlobInventoryPoliciesServer. // Don't use this type directly, use NewBlobInventoryPoliciesServerTransport instead. type BlobInventoryPoliciesServerTransport struct { srv *BlobInventoryPoliciesServer - newListPager *azfake.PagerResponder[armstorage.BlobInventoryPoliciesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.BlobInventoryPoliciesClientListResponse]] } // Do implements the policy.Transporter interface for BlobInventoryPoliciesServerTransport. @@ -204,7 +207,8 @@ func (b *BlobInventoryPoliciesServerTransport) dispatchNewListPager(req *http.Re if b.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if b.newListPager == nil { + newListPager := b.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inventoryPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -220,17 +224,19 @@ func (b *BlobInventoryPoliciesServerTransport) dispatchNewListPager(req *http.Re return nil, err } resp := b.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, nil) - b.newListPager = &resp + newListPager = &resp + b.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(b.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(b.newListPager) { - b.newListPager = nil + if !server.PagerResponderMore(newListPager) { + b.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/blobservices_server.go b/sdk/resourcemanager/storage/armstorage/fake/blobservices_server.go index 62969a414208..07cd8d163b65 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/blobservices_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/blobservices_server.go @@ -37,17 +37,20 @@ type BlobServicesServer struct { } // NewBlobServicesServerTransport creates a new instance of BlobServicesServerTransport with the provided implementation. -// The returned BlobServicesServerTransport instance is connected to an instance of armstorage.BlobServicesClient by way of the -// undefined.Transporter field. +// The returned BlobServicesServerTransport instance is connected to an instance of armstorage.BlobServicesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewBlobServicesServerTransport(srv *BlobServicesServer) *BlobServicesServerTransport { - return &BlobServicesServerTransport{srv: srv} + return &BlobServicesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.BlobServicesClientListResponse]](), + } } // BlobServicesServerTransport connects instances of armstorage.BlobServicesClient to instances of BlobServicesServer. // Don't use this type directly, use NewBlobServicesServerTransport instead. type BlobServicesServerTransport struct { srv *BlobServicesServer - newListPager *azfake.PagerResponder[armstorage.BlobServicesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.BlobServicesClientListResponse]] } // Do implements the policy.Transporter interface for BlobServicesServerTransport. @@ -116,7 +119,8 @@ func (b *BlobServicesServerTransport) dispatchNewListPager(req *http.Request) (* if b.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if b.newListPager == nil { + newListPager := b.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/blobServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -132,17 +136,19 @@ func (b *BlobServicesServerTransport) dispatchNewListPager(req *http.Request) (* return nil, err } resp := b.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, nil) - b.newListPager = &resp + newListPager = &resp + b.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(b.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(b.newListPager) { - b.newListPager = nil + if !server.PagerResponderMore(newListPager) { + b.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/deletedaccounts_server.go b/sdk/resourcemanager/storage/armstorage/fake/deletedaccounts_server.go index 06cb1a702afb..d33c3f532594 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/deletedaccounts_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/deletedaccounts_server.go @@ -34,17 +34,20 @@ type DeletedAccountsServer struct { } // NewDeletedAccountsServerTransport creates a new instance of DeletedAccountsServerTransport with the provided implementation. -// The returned DeletedAccountsServerTransport instance is connected to an instance of armstorage.DeletedAccountsClient by way of the -// undefined.Transporter field. +// The returned DeletedAccountsServerTransport instance is connected to an instance of armstorage.DeletedAccountsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDeletedAccountsServerTransport(srv *DeletedAccountsServer) *DeletedAccountsServerTransport { - return &DeletedAccountsServerTransport{srv: srv} + return &DeletedAccountsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.DeletedAccountsClientListResponse]](), + } } // DeletedAccountsServerTransport connects instances of armstorage.DeletedAccountsClient to instances of DeletedAccountsServer. // Don't use this type directly, use NewDeletedAccountsServerTransport instead. type DeletedAccountsServerTransport struct { srv *DeletedAccountsServer - newListPager *azfake.PagerResponder[armstorage.DeletedAccountsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.DeletedAccountsClientListResponse]] } // Do implements the policy.Transporter interface for DeletedAccountsServerTransport. @@ -111,7 +114,8 @@ func (d *DeletedAccountsServerTransport) dispatchNewListPager(req *http.Request) if d.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if d.newListPager == nil { + newListPager := d.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/deletedAccounts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,20 +123,22 @@ func (d *DeletedAccountsServerTransport) dispatchNewListPager(req *http.Request) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := d.srv.NewListPager(nil) - d.newListPager = &resp - server.PagerResponderInjectNextLinks(d.newListPager, req, func(page *armstorage.DeletedAccountsClientListResponse, createLink func() string) { + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.DeletedAccountsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListPager) { - d.newListPager = nil + if !server.PagerResponderMore(newListPager) { + d.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/encryptionscopes_server.go b/sdk/resourcemanager/storage/armstorage/fake/encryptionscopes_server.go index 1a14dd34d83b..38844ccdb0f3 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/encryptionscopes_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/encryptionscopes_server.go @@ -43,17 +43,20 @@ type EncryptionScopesServer struct { } // NewEncryptionScopesServerTransport creates a new instance of EncryptionScopesServerTransport with the provided implementation. -// The returned EncryptionScopesServerTransport instance is connected to an instance of armstorage.EncryptionScopesClient by way of the -// undefined.Transporter field. +// The returned EncryptionScopesServerTransport instance is connected to an instance of armstorage.EncryptionScopesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewEncryptionScopesServerTransport(srv *EncryptionScopesServer) *EncryptionScopesServerTransport { - return &EncryptionScopesServerTransport{srv: srv} + return &EncryptionScopesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.EncryptionScopesClientListResponse]](), + } } // EncryptionScopesServerTransport connects instances of armstorage.EncryptionScopesClient to instances of EncryptionScopesServer. // Don't use this type directly, use NewEncryptionScopesServerTransport instead. type EncryptionScopesServerTransport struct { srv *EncryptionScopesServer - newListPager *azfake.PagerResponder[armstorage.EncryptionScopesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.EncryptionScopesClientListResponse]] } // Do implements the policy.Transporter interface for EncryptionScopesServerTransport. @@ -128,7 +131,8 @@ func (e *EncryptionScopesServerTransport) dispatchNewListPager(req *http.Request if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/encryptionScopes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -177,20 +181,22 @@ func (e *EncryptionScopesServerTransport) dispatchNewListPager(req *http.Request } } resp := e.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, options) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armstorage.EncryptionScopesClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.EncryptionScopesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go b/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go index c6412297aa99..75ea54517283 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/fileservices_server.go @@ -37,8 +37,8 @@ type FileServicesServer struct { } // NewFileServicesServerTransport creates a new instance of FileServicesServerTransport with the provided implementation. -// The returned FileServicesServerTransport instance is connected to an instance of armstorage.FileServicesClient by way of the -// undefined.Transporter field. +// The returned FileServicesServerTransport instance is connected to an instance of armstorage.FileServicesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFileServicesServerTransport(srv *FileServicesServer) *FileServicesServerTransport { return &FileServicesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/storage/armstorage/fake/fileshares_server.go b/sdk/resourcemanager/storage/armstorage/fake/fileshares_server.go index 3a1b63c5fd6f..3ce95bf4c45e 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/fileshares_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/fileshares_server.go @@ -55,17 +55,20 @@ type FileSharesServer struct { } // NewFileSharesServerTransport creates a new instance of FileSharesServerTransport with the provided implementation. -// The returned FileSharesServerTransport instance is connected to an instance of armstorage.FileSharesClient by way of the -// undefined.Transporter field. +// The returned FileSharesServerTransport instance is connected to an instance of armstorage.FileSharesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFileSharesServerTransport(srv *FileSharesServer) *FileSharesServerTransport { - return &FileSharesServerTransport{srv: srv} + return &FileSharesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.FileSharesClientListResponse]](), + } } // FileSharesServerTransport connects instances of armstorage.FileSharesClient to instances of FileSharesServer. // Don't use this type directly, use NewFileSharesServerTransport instead. type FileSharesServerTransport struct { srv *FileSharesServer - newListPager *azfake.PagerResponder[armstorage.FileSharesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.FileSharesClientListResponse]] } // Do implements the policy.Transporter interface for FileSharesServerTransport. @@ -316,7 +319,8 @@ func (f *FileSharesServerTransport) dispatchNewListPager(req *http.Request) (*ht if f.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if f.newListPager == nil { + newListPager := f.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/fileServices/default/shares` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -356,20 +360,22 @@ func (f *FileSharesServerTransport) dispatchNewListPager(req *http.Request) (*ht } } resp := f.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, options) - f.newListPager = &resp - server.PagerResponderInjectNextLinks(f.newListPager, req, func(page *armstorage.FileSharesClientListResponse, createLink func() string) { + newListPager = &resp + f.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.FileSharesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(f.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(f.newListPager) { - f.newListPager = nil + if !server.PagerResponderMore(newListPager) { + f.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/internal.go b/sdk/resourcemanager/storage/armstorage/fake/internal.go index e9c8222f2199..03b635903572 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/internal.go +++ b/sdk/resourcemanager/storage/armstorage/fake/internal.go @@ -12,6 +12,9 @@ import ( "io" "net/http" "reflect" + "regexp" + "strings" + "sync" ) type nonRetriableError struct { @@ -76,3 +79,45 @@ func contains[T comparable](s []T, v T) bool { } return false } + +func newTracker[T any]() *tracker[T] { + return &tracker[T]{ + items: map[string]*T{}, + } +} + +type tracker[T any] struct { + items map[string]*T + mu sync.Mutex +} + +func (p *tracker[T]) key(req *http.Request) string { + path := req.URL.Path + if match, _ := regexp.Match(`/page_\d+$`, []byte(path)); match { + path = path[:strings.LastIndex(path, "/")] + } else if strings.HasSuffix(path, "/get/fake/status") { + path = path[:len(path)-16] + } + return path +} + +func (p *tracker[T]) get(req *http.Request) *T { + p.mu.Lock() + defer p.mu.Unlock() + if item, ok := p.items[p.key(req)]; ok { + return item + } + return nil +} + +func (p *tracker[T]) add(req *http.Request, item *T) { + p.mu.Lock() + defer p.mu.Unlock() + p.items[p.key(req)] = item +} + +func (p *tracker[T]) remove(req *http.Request) { + p.mu.Lock() + defer p.mu.Unlock() + delete(p.items, p.key(req)) +} diff --git a/sdk/resourcemanager/storage/armstorage/fake/localusers_server.go b/sdk/resourcemanager/storage/armstorage/fake/localusers_server.go index e4003238c2ff..18cbffd31e91 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/localusers_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/localusers_server.go @@ -49,17 +49,20 @@ type LocalUsersServer struct { } // NewLocalUsersServerTransport creates a new instance of LocalUsersServerTransport with the provided implementation. -// The returned LocalUsersServerTransport instance is connected to an instance of armstorage.LocalUsersClient by way of the -// undefined.Transporter field. +// The returned LocalUsersServerTransport instance is connected to an instance of armstorage.LocalUsersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLocalUsersServerTransport(srv *LocalUsersServer) *LocalUsersServerTransport { - return &LocalUsersServerTransport{srv: srv} + return &LocalUsersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.LocalUsersClientListResponse]](), + } } // LocalUsersServerTransport connects instances of armstorage.LocalUsersClient to instances of LocalUsersServer. // Don't use this type directly, use NewLocalUsersServerTransport instead. type LocalUsersServerTransport struct { srv *LocalUsersServer - newListPager *azfake.PagerResponder[armstorage.LocalUsersClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.LocalUsersClientListResponse]] } // Do implements the policy.Transporter interface for LocalUsersServerTransport. @@ -216,7 +219,8 @@ func (l *LocalUsersServerTransport) dispatchNewListPager(req *http.Request) (*ht if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/localUsers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,17 +236,19 @@ func (l *LocalUsersServerTransport) dispatchNewListPager(req *http.Request) (*ht return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, nil) - l.newListPager = &resp + newListPager = &resp + l.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/managementpolicies_server.go b/sdk/resourcemanager/storage/armstorage/fake/managementpolicies_server.go index e8001a9e71e8..07daad222659 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/managementpolicies_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/managementpolicies_server.go @@ -37,8 +37,8 @@ type ManagementPoliciesServer struct { } // NewManagementPoliciesServerTransport creates a new instance of ManagementPoliciesServerTransport with the provided implementation. -// The returned ManagementPoliciesServerTransport instance is connected to an instance of armstorage.ManagementPoliciesClient by way of the -// undefined.Transporter field. +// The returned ManagementPoliciesServerTransport instance is connected to an instance of armstorage.ManagementPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewManagementPoliciesServerTransport(srv *ManagementPoliciesServer) *ManagementPoliciesServerTransport { return &ManagementPoliciesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/storage/armstorage/fake/objectreplicationpolicies_server.go b/sdk/resourcemanager/storage/armstorage/fake/objectreplicationpolicies_server.go index ba22a2278204..bec0a82e1e34 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/objectreplicationpolicies_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/objectreplicationpolicies_server.go @@ -41,17 +41,20 @@ type ObjectReplicationPoliciesServer struct { } // NewObjectReplicationPoliciesServerTransport creates a new instance of ObjectReplicationPoliciesServerTransport with the provided implementation. -// The returned ObjectReplicationPoliciesServerTransport instance is connected to an instance of armstorage.ObjectReplicationPoliciesClient by way of the -// undefined.Transporter field. +// The returned ObjectReplicationPoliciesServerTransport instance is connected to an instance of armstorage.ObjectReplicationPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewObjectReplicationPoliciesServerTransport(srv *ObjectReplicationPoliciesServer) *ObjectReplicationPoliciesServerTransport { - return &ObjectReplicationPoliciesServerTransport{srv: srv} + return &ObjectReplicationPoliciesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.ObjectReplicationPoliciesClientListResponse]](), + } } // ObjectReplicationPoliciesServerTransport connects instances of armstorage.ObjectReplicationPoliciesClient to instances of ObjectReplicationPoliciesServer. // Don't use this type directly, use NewObjectReplicationPoliciesServerTransport instead. type ObjectReplicationPoliciesServerTransport struct { srv *ObjectReplicationPoliciesServer - newListPager *azfake.PagerResponder[armstorage.ObjectReplicationPoliciesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.ObjectReplicationPoliciesClientListResponse]] } // Do implements the policy.Transporter interface for ObjectReplicationPoliciesServerTransport. @@ -204,7 +207,8 @@ func (o *ObjectReplicationPoliciesServerTransport) dispatchNewListPager(req *htt if o.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if o.newListPager == nil { + newListPager := o.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/objectReplicationPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -220,17 +224,19 @@ func (o *ObjectReplicationPoliciesServerTransport) dispatchNewListPager(req *htt return nil, err } resp := o.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, nil) - o.newListPager = &resp + newListPager = &resp + o.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(o.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + o.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(o.newListPager) { - o.newListPager = nil + if !server.PagerResponderMore(newListPager) { + o.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/operations_server.go b/sdk/resourcemanager/storage/armstorage/fake/operations_server.go index 8455f7c9e986..91d748837564 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/operations_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/operations_server.go @@ -26,17 +26,20 @@ type OperationsServer struct { } // NewOperationsServerTransport creates a new instance of OperationsServerTransport with the provided implementation. -// The returned OperationsServerTransport instance is connected to an instance of armstorage.OperationsClient by way of the -// undefined.Transporter field. +// The returned OperationsServerTransport instance is connected to an instance of armstorage.OperationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewOperationsServerTransport(srv *OperationsServer) *OperationsServerTransport { - return &OperationsServerTransport{srv: srv} + return &OperationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.OperationsClientListResponse]](), + } } // OperationsServerTransport connects instances of armstorage.OperationsClient to instances of OperationsServer. // Don't use this type directly, use NewOperationsServerTransport instead. type OperationsServerTransport struct { srv *OperationsServer - newListPager *azfake.PagerResponder[armstorage.OperationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.OperationsClientListResponse]] } // Do implements the policy.Transporter interface for OperationsServerTransport. @@ -68,19 +71,22 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht if o.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if o.newListPager == nil { + newListPager := o.newListPager.get(req) + if newListPager == nil { resp := o.srv.NewListPager(nil) - o.newListPager = &resp + newListPager = &resp + o.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(o.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + o.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(o.newListPager) { - o.newListPager = nil + if !server.PagerResponderMore(newListPager) { + o.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/privateendpointconnections_server.go b/sdk/resourcemanager/storage/armstorage/fake/privateendpointconnections_server.go index 0eb0be9c14a8..177ee97f8c98 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/privateendpointconnections_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/privateendpointconnections_server.go @@ -41,17 +41,20 @@ type PrivateEndpointConnectionsServer struct { } // NewPrivateEndpointConnectionsServerTransport creates a new instance of PrivateEndpointConnectionsServerTransport with the provided implementation. -// The returned PrivateEndpointConnectionsServerTransport instance is connected to an instance of armstorage.PrivateEndpointConnectionsClient by way of the -// undefined.Transporter field. +// The returned PrivateEndpointConnectionsServerTransport instance is connected to an instance of armstorage.PrivateEndpointConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPrivateEndpointConnectionsServerTransport(srv *PrivateEndpointConnectionsServer) *PrivateEndpointConnectionsServerTransport { - return &PrivateEndpointConnectionsServerTransport{srv: srv} + return &PrivateEndpointConnectionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.PrivateEndpointConnectionsClientListResponse]](), + } } // PrivateEndpointConnectionsServerTransport connects instances of armstorage.PrivateEndpointConnectionsClient to instances of PrivateEndpointConnectionsServer. // Don't use this type directly, use NewPrivateEndpointConnectionsServerTransport instead. type PrivateEndpointConnectionsServerTransport struct { srv *PrivateEndpointConnectionsServer - newListPager *azfake.PagerResponder[armstorage.PrivateEndpointConnectionsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.PrivateEndpointConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for PrivateEndpointConnectionsServerTransport. @@ -163,7 +166,8 @@ func (p *PrivateEndpointConnectionsServerTransport) dispatchNewListPager(req *ht if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -179,17 +183,19 @@ func (p *PrivateEndpointConnectionsServerTransport) dispatchNewListPager(req *ht return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, nil) - p.newListPager = &resp + newListPager = &resp + p.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/privatelinkresources_server.go b/sdk/resourcemanager/storage/armstorage/fake/privatelinkresources_server.go index 2982b970fc39..e1ee18979e38 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/privatelinkresources_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/privatelinkresources_server.go @@ -29,8 +29,8 @@ type PrivateLinkResourcesServer struct { } // NewPrivateLinkResourcesServerTransport creates a new instance of PrivateLinkResourcesServerTransport with the provided implementation. -// The returned PrivateLinkResourcesServerTransport instance is connected to an instance of armstorage.PrivateLinkResourcesClient by way of the -// undefined.Transporter field. +// The returned PrivateLinkResourcesServerTransport instance is connected to an instance of armstorage.PrivateLinkResourcesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPrivateLinkResourcesServerTransport(srv *PrivateLinkResourcesServer) *PrivateLinkResourcesServerTransport { return &PrivateLinkResourcesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/storage/armstorage/fake/queue_server.go b/sdk/resourcemanager/storage/armstorage/fake/queue_server.go index b3e56a9a3865..270710170ed0 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/queue_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/queue_server.go @@ -46,17 +46,20 @@ type QueueServer struct { } // NewQueueServerTransport creates a new instance of QueueServerTransport with the provided implementation. -// The returned QueueServerTransport instance is connected to an instance of armstorage.QueueClient by way of the -// undefined.Transporter field. +// The returned QueueServerTransport instance is connected to an instance of armstorage.QueueClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewQueueServerTransport(srv *QueueServer) *QueueServerTransport { - return &QueueServerTransport{srv: srv} + return &QueueServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.QueueClientListResponse]](), + } } // QueueServerTransport connects instances of armstorage.QueueClient to instances of QueueServer. // Don't use this type directly, use NewQueueServerTransport instead. type QueueServerTransport struct { srv *QueueServer - newListPager *azfake.PagerResponder[armstorage.QueueClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.QueueClientListResponse]] } // Do implements the policy.Transporter interface for QueueServerTransport. @@ -211,7 +214,8 @@ func (q *QueueServerTransport) dispatchNewListPager(req *http.Request) (*http.Re if q.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if q.newListPager == nil { + newListPager := q.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queueServices/default/queues` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -245,20 +249,22 @@ func (q *QueueServerTransport) dispatchNewListPager(req *http.Request) (*http.Re } } resp := q.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, options) - q.newListPager = &resp - server.PagerResponderInjectNextLinks(q.newListPager, req, func(page *armstorage.QueueClientListResponse, createLink func() string) { + newListPager = &resp + q.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.QueueClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(q.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + q.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(q.newListPager) { - q.newListPager = nil + if !server.PagerResponderMore(newListPager) { + q.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/queueservices_server.go b/sdk/resourcemanager/storage/armstorage/fake/queueservices_server.go index 9a2decdb676a..186c25f50811 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/queueservices_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/queueservices_server.go @@ -37,8 +37,8 @@ type QueueServicesServer struct { } // NewQueueServicesServerTransport creates a new instance of QueueServicesServerTransport with the provided implementation. -// The returned QueueServicesServerTransport instance is connected to an instance of armstorage.QueueServicesClient by way of the -// undefined.Transporter field. +// The returned QueueServicesServerTransport instance is connected to an instance of armstorage.QueueServicesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewQueueServicesServerTransport(srv *QueueServicesServer) *QueueServicesServerTransport { return &QueueServicesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/storage/armstorage/fake/skus_server.go b/sdk/resourcemanager/storage/armstorage/fake/skus_server.go index 788f53517098..06f08652254d 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/skus_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/skus_server.go @@ -27,17 +27,20 @@ type SKUsServer struct { } // NewSKUsServerTransport creates a new instance of SKUsServerTransport with the provided implementation. -// The returned SKUsServerTransport instance is connected to an instance of armstorage.SKUsClient by way of the -// undefined.Transporter field. +// The returned SKUsServerTransport instance is connected to an instance of armstorage.SKUsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSKUsServerTransport(srv *SKUsServer) *SKUsServerTransport { - return &SKUsServerTransport{srv: srv} + return &SKUsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.SKUsClientListResponse]](), + } } // SKUsServerTransport connects instances of armstorage.SKUsClient to instances of SKUsServer. // Don't use this type directly, use NewSKUsServerTransport instead. type SKUsServerTransport struct { srv *SKUsServer - newListPager *azfake.PagerResponder[armstorage.SKUsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.SKUsClientListResponse]] } // Do implements the policy.Transporter interface for SKUsServerTransport. @@ -69,7 +72,8 @@ func (s *SKUsServerTransport) dispatchNewListPager(req *http.Request) (*http.Res if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/skus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -77,17 +81,19 @@ func (s *SKUsServerTransport) dispatchNewListPager(req *http.Request) (*http.Res return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := s.srv.NewListPager(nil) - s.newListPager = &resp + newListPager = &resp + s.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/table_server.go b/sdk/resourcemanager/storage/armstorage/fake/table_server.go index 045146945ce8..639155ccd0d1 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/table_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/table_server.go @@ -47,17 +47,20 @@ type TableServer struct { } // NewTableServerTransport creates a new instance of TableServerTransport with the provided implementation. -// The returned TableServerTransport instance is connected to an instance of armstorage.TableClient by way of the -// undefined.Transporter field. +// The returned TableServerTransport instance is connected to an instance of armstorage.TableClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewTableServerTransport(srv *TableServer) *TableServerTransport { - return &TableServerTransport{srv: srv} + return &TableServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armstorage.TableClientListResponse]](), + } } // TableServerTransport connects instances of armstorage.TableClient to instances of TableServer. // Don't use this type directly, use NewTableServerTransport instead. type TableServerTransport struct { srv *TableServer - newListPager *azfake.PagerResponder[armstorage.TableClientListResponse] + newListPager *tracker[azfake.PagerResponder[armstorage.TableClientListResponse]] } // Do implements the policy.Transporter interface for TableServerTransport. @@ -218,7 +221,8 @@ func (t *TableServerTransport) dispatchNewListPager(req *http.Request) (*http.Re if t.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if t.newListPager == nil { + newListPager := t.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/storageAccounts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tableServices/default/tables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -234,20 +238,22 @@ func (t *TableServerTransport) dispatchNewListPager(req *http.Request) (*http.Re return nil, err } resp := t.srv.NewListPager(resourceGroupNameUnescaped, accountNameUnescaped, nil) - t.newListPager = &resp - server.PagerResponderInjectNextLinks(t.newListPager, req, func(page *armstorage.TableClientListResponse, createLink func() string) { + newListPager = &resp + t.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armstorage.TableClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(t.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + t.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(t.newListPager) { - t.newListPager = nil + if !server.PagerResponderMore(newListPager) { + t.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/fake/tableservices_server.go b/sdk/resourcemanager/storage/armstorage/fake/tableservices_server.go index c12f333e7b7b..8edb35f172fb 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/tableservices_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/tableservices_server.go @@ -37,8 +37,8 @@ type TableServicesServer struct { } // NewTableServicesServerTransport creates a new instance of TableServicesServerTransport with the provided implementation. -// The returned TableServicesServerTransport instance is connected to an instance of armstorage.TableServicesClient by way of the -// undefined.Transporter field. +// The returned TableServicesServerTransport instance is connected to an instance of armstorage.TableServicesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewTableServicesServerTransport(srv *TableServicesServer) *TableServicesServerTransport { return &TableServicesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/storage/armstorage/fake/usages_server.go b/sdk/resourcemanager/storage/armstorage/fake/usages_server.go index e046d3bf62c2..c0f3e760941d 100644 --- a/sdk/resourcemanager/storage/armstorage/fake/usages_server.go +++ b/sdk/resourcemanager/storage/armstorage/fake/usages_server.go @@ -28,17 +28,20 @@ type UsagesServer struct { } // NewUsagesServerTransport creates a new instance of UsagesServerTransport with the provided implementation. -// The returned UsagesServerTransport instance is connected to an instance of armstorage.UsagesClient by way of the -// undefined.Transporter field. +// The returned UsagesServerTransport instance is connected to an instance of armstorage.UsagesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewUsagesServerTransport(srv *UsagesServer) *UsagesServerTransport { - return &UsagesServerTransport{srv: srv} + return &UsagesServerTransport{ + srv: srv, + newListByLocationPager: newTracker[azfake.PagerResponder[armstorage.UsagesClientListByLocationResponse]](), + } } // UsagesServerTransport connects instances of armstorage.UsagesClient to instances of UsagesServer. // Don't use this type directly, use NewUsagesServerTransport instead. type UsagesServerTransport struct { srv *UsagesServer - newListByLocationPager *azfake.PagerResponder[armstorage.UsagesClientListByLocationResponse] + newListByLocationPager *tracker[azfake.PagerResponder[armstorage.UsagesClientListByLocationResponse]] } // Do implements the policy.Transporter interface for UsagesServerTransport. @@ -70,7 +73,8 @@ func (u *UsagesServerTransport) dispatchNewListByLocationPager(req *http.Request if u.srv.NewListByLocationPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByLocationPager not implemented")} } - if u.newListByLocationPager == nil { + newListByLocationPager := u.newListByLocationPager.get(req) + if newListByLocationPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Storage/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -82,17 +86,19 @@ func (u *UsagesServerTransport) dispatchNewListByLocationPager(req *http.Request return nil, err } resp := u.srv.NewListByLocationPager(locationUnescaped, nil) - u.newListByLocationPager = &resp + newListByLocationPager = &resp + u.newListByLocationPager.add(req, newListByLocationPager) } - resp, err := server.PagerResponderNext(u.newListByLocationPager, req) + resp, err := server.PagerResponderNext(newListByLocationPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + u.newListByLocationPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(u.newListByLocationPager) { - u.newListByLocationPager = nil + if !server.PagerResponderMore(newListByLocationPager) { + u.newListByLocationPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/storage/armstorage/go.mod b/sdk/resourcemanager/storage/armstorage/go.mod index 60b6326c5579..cb4a40e8b715 100644 --- a/sdk/resourcemanager/storage/armstorage/go.mod +++ b/sdk/resourcemanager/storage/armstorage/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 diff --git a/sdk/resourcemanager/storage/armstorage/go.sum b/sdk/resourcemanager/storage/armstorage/go.sum index 7c4ceb8d14fa..4d9f1753e925 100644 --- a/sdk/resourcemanager/storage/armstorage/go.sum +++ b/sdk/resourcemanager/storage/armstorage/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 h1:C3zKsGguxcLd8a2uEytB8+TFtBGd75bXRxEs0QBwsv0= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 h1:8t6ZZtkOCl+rx7uBn40Nj62ABVGkXK69U/En44wJIlE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1 h1:T8quHYlUGyb/oqtSTwqlCr1ilJHrDv+ZtpSfo+hm1BU= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.1/go.mod h1:gLa1CL2RNE4s7M3yopJ/p0iq5DdY6Yv5ZUt9MTRZOQM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= diff --git a/sdk/resourcemanager/storage/armstorage/models.go b/sdk/resourcemanager/storage/armstorage/models.go index d75f42df02c3..10034127708a 100644 --- a/sdk/resourcemanager/storage/armstorage/models.go +++ b/sdk/resourcemanager/storage/armstorage/models.go @@ -546,103 +546,6 @@ type AccountUpdateParameters struct { Tags map[string]*string } -// AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginAbortHierarchicalNamespaceMigration -// method. -type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method. -type AccountsClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method. -type AccountsClientBeginFailoverOptions struct { - // The parameter is set to 'Planned' to indicate whether a Planned failover is requested.. Specifying any value will set the - // value to Planned. - FailoverType *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginHierarchicalNamespaceMigration -// method. -type AccountsClientBeginHierarchicalNamespaceMigrationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientBeginRestoreBlobRangesOptions contains the optional parameters for the AccountsClient.BeginRestoreBlobRanges -// method. -type AccountsClientBeginRestoreBlobRangesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability -// method. -type AccountsClientCheckNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method. -type AccountsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method. -type AccountsClientGetPropertiesOptions struct { - // May be used to expand the properties within account's properties. By default, data is not included when fetching properties. - // Currently we only support geoReplicationStats and blobRestoreStatus. - Expand *StorageAccountExpand -} - -// AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method. -type AccountsClientListAccountSASOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager -// method. -type AccountsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method. -type AccountsClientListKeysOptions struct { - // Specifies type of the key to be listed. Possible value is kerb.. Specifying any value will set the value to kerb. - Expand *string -} - -// AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. -type AccountsClientListOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method. -type AccountsClientListServiceSASOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method. -type AccountsClientRegenerateKeyOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys -// method. -type AccountsClientRevokeUserDelegationKeysOptions struct { - // placeholder for future optional parameters -} - -// AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. -type AccountsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ActiveDirectoryProperties - Settings properties for Active Directory (AD). type ActiveDirectoryProperties struct { // REQUIRED; Specifies the domain GUID. @@ -715,121 +618,6 @@ type BlobContainer struct { Type *string } -// BlobContainersClientBeginObjectLevelWormOptions contains the optional parameters for the BlobContainersClient.BeginObjectLevelWorm -// method. -type BlobContainersClientBeginObjectLevelWormOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold -// method. -type BlobContainersClientClearLegalHoldOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method. -type BlobContainersClientCreateOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy -// method. -type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions struct { - // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation - // only if the immutability policy already exists. If omitted, this operation will - // always be applied. - IfMatch *string - // The ImmutabilityPolicy Properties that will be created or updated to a blob container. - Parameters *ImmutabilityPolicy -} - -// BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy -// method. -type BlobContainersClientDeleteImmutabilityPolicyOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method. -type BlobContainersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy -// method. -type BlobContainersClientExtendImmutabilityPolicyOptions struct { - // The ImmutabilityPolicy Properties that will be extended for a blob container. - Parameters *ImmutabilityPolicy -} - -// BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy -// method. -type BlobContainersClientGetImmutabilityPolicyOptions struct { - // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation - // only if the immutability policy already exists. If omitted, this operation will - // always be applied. - IfMatch *string -} - -// BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method. -type BlobContainersClientGetOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method. -type BlobContainersClientLeaseOptions struct { - // Lease Container request body. - Parameters *LeaseContainerRequest -} - -// BlobContainersClientListOptions contains the optional parameters for the BlobContainersClient.NewListPager method. -type BlobContainersClientListOptions struct { - // Optional. When specified, only container names starting with the filter will be listed. - Filter *string - // Optional, used to include the properties for soft deleted blob containers. - Include *ListContainersInclude - // Optional. Specified maximum number of containers that can be included in the list. - Maxpagesize *string -} - -// BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy -// method. -type BlobContainersClientLockImmutabilityPolicyOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold method. -type BlobContainersClientSetLegalHoldOptions struct { - // placeholder for future optional parameters -} - -// BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method. -type BlobContainersClientUpdateOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate -// method. -type BlobInventoryPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete method. -type BlobInventoryPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get method. -type BlobInventoryPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// BlobInventoryPoliciesClientListOptions contains the optional parameters for the BlobInventoryPoliciesClient.NewListPager -// method. -type BlobInventoryPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // BlobInventoryPolicy - The storage account blob inventory policy. type BlobInventoryPolicy struct { // Returns the storage account blob inventory policy rules. @@ -1048,23 +836,6 @@ type BlobServicePropertiesProperties struct { RestorePolicy *RestorePolicyProperties } -// BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties -// method. -type BlobServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - -// BlobServicesClientListOptions contains the optional parameters for the BlobServicesClient.NewListPager method. -type BlobServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties -// method. -type BlobServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - // ChangeFeed - The blob service properties for change feed events. type ChangeFeed struct { // Indicates whether change feed event logging is enabled for the Blob service. @@ -1280,16 +1051,6 @@ type DeletedAccountProperties struct { StorageAccountResourceID *string } -// DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method. -type DeletedAccountsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method. -type DeletedAccountsClientListOptions struct { - // placeholder for future optional parameters -} - // DeletedShare - The deleted share to be restored. type DeletedShare struct { // REQUIRED; Required. Identify the name of the deleted share that will be restored. @@ -1400,31 +1161,6 @@ type EncryptionScopeProperties struct { LastModifiedTime *time.Time } -// EncryptionScopesClientGetOptions contains the optional parameters for the EncryptionScopesClient.Get method. -type EncryptionScopesClientGetOptions struct { - // placeholder for future optional parameters -} - -// EncryptionScopesClientListOptions contains the optional parameters for the EncryptionScopesClient.NewListPager method. -type EncryptionScopesClientListOptions struct { - // Optional. When specified, only encryption scope names starting with the filter will be listed. - Filter *string - // Optional, when specified, will list encryption scopes with the specific state. Defaults to All - Include *ListEncryptionScopesInclude - // Optional, specifies the maximum number of encryption scopes that will be included in the list response. - Maxpagesize *int32 -} - -// EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method. -type EncryptionScopesClientPatchOptions struct { - // placeholder for future optional parameters -} - -// EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method. -type EncryptionScopesClientPutOptions struct { - // placeholder for future optional parameters -} - // EncryptionService - A service that allows server-side encryption to be used. type EncryptionService struct { // A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default @@ -1543,23 +1279,6 @@ type FileServicePropertiesProperties struct { ShareDeleteRetentionPolicy *DeleteRetentionPolicy } -// FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties -// method. -type FileServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - -// FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method. -type FileServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties -// method. -type FileServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - // FileShare - Properties of the file share, including Id, resource name, resource type, Etag. type FileShare struct { // Properties of the file share. @@ -1667,63 +1386,6 @@ type FileShareProperties struct { Version *string } -// FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method. -type FileSharesClientCreateOptions struct { - // Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string - // with delimiter ',' - Expand *string -} - -// FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method. -type FileSharesClientDeleteOptions struct { - // Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file - // share is deleted including all of its file share snapshots. If the file share - // contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file - // share snapshots (leased/unleased). For 'none', the file share is deleted if it - // has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails. - Include *string - // Optional, used to delete a snapshot. - XMSSnapshot *string -} - -// FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method. -type FileSharesClientGetOptions struct { - // Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string - // with delimiter ','. - Expand *string - // Optional, used to retrieve properties of a snapshot. - XMSSnapshot *string -} - -// FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method. -type FileSharesClientLeaseOptions struct { - // Lease Share request body. - Parameters *LeaseShareRequest - // Optional. Specify the snapshot time to lease a snapshot. - XMSSnapshot *string -} - -// FileSharesClientListOptions contains the optional parameters for the FileSharesClient.NewListPager method. -type FileSharesClientListOptions struct { - // Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed - // as a string with delimiter ',' - Expand *string - // Optional. When specified, only share names starting with the filter will be listed. - Filter *string - // Optional. Specified maximum number of shares that can be included in the list. - Maxpagesize *string -} - -// FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method. -type FileSharesClientRestoreOptions struct { - // placeholder for future optional parameters -} - -// FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method. -type FileSharesClientUpdateOptions struct { - // placeholder for future optional parameters -} - // GeoReplicationStats - Statistics related to replication for storage account's Blob, Table, Queue and File services. It // is only available when geo-redundant replication is enabled for the storage account. type GeoReplicationStats struct { @@ -2142,53 +1804,6 @@ type LocalUsers struct { Value []*LocalUser } -// LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate method. -type LocalUsersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method. -type LocalUsersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method. -type LocalUsersClientGetOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method. -type LocalUsersClientListKeysOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientListOptions contains the optional parameters for the LocalUsersClient.NewListPager method. -type LocalUsersClientListOptions struct { - // placeholder for future optional parameters -} - -// LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword -// method. -type LocalUsersClientRegeneratePasswordOptions struct { - // placeholder for future optional parameters -} - -// ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate -// method. -type ManagementPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete method. -type ManagementPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method. -type ManagementPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - // ManagementPolicy - The Get Storage Account ManagementPolicies operation response. type ManagementPolicy struct { // Returns the Storage Account Data Policies Rules. @@ -2390,30 +2005,6 @@ type ObjectReplicationPolicies struct { Value []*ObjectReplicationPolicy } -// ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate -// method. -type ObjectReplicationPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete -// method. -type ObjectReplicationPoliciesClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get -// method. -type ObjectReplicationPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// ObjectReplicationPoliciesClientListOptions contains the optional parameters for the ObjectReplicationPoliciesClient.NewListPager -// method. -type ObjectReplicationPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // ObjectReplicationPolicy - The replication policy between two storage accounts. Multiple rules can be defined in one policy. type ObjectReplicationPolicy struct { // Returns the Storage Account Object Replication Policy. @@ -2517,11 +2108,6 @@ type OperationProperties struct { ServiceSpecification *ServiceSpecification } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - type PermissionScope struct { // REQUIRED; The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create // (c). @@ -2573,30 +2159,6 @@ type PrivateEndpointConnectionProperties struct { ProvisioningState *PrivateEndpointConnectionProvisioningState } -// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete -// method. -type PrivateEndpointConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager -// method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put -// method. -type PrivateEndpointConnectionsClientPutOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkResource - A private link resource type PrivateLinkResource struct { // Resource properties. @@ -2630,12 +2192,6 @@ type PrivateLinkResourceProperties struct { RequiredMembers []*string } -// PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount -// method. -type PrivateLinkResourcesClientListByStorageAccountOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer // and provider. type PrivateLinkServiceConnectionState struct { @@ -2693,34 +2249,6 @@ type Queue struct { Type *string } -// QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method. -type QueueClientCreateOptions struct { - // placeholder for future optional parameters -} - -// QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method. -type QueueClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// QueueClientGetOptions contains the optional parameters for the QueueClient.Get method. -type QueueClientGetOptions struct { - // placeholder for future optional parameters -} - -// QueueClientListOptions contains the optional parameters for the QueueClient.NewListPager method. -type QueueClientListOptions struct { - // Optional, When specified, only the queues with a name starting with the given filter will be listed. - Filter *string - // Optional, a maximum number of queues that should be included in a list queue response - Maxpagesize *string -} - -// QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method. -type QueueClientUpdateOptions struct { - // placeholder for future optional parameters -} - type QueueProperties struct { // A name-value pair that represents queue metadata. Metadata map[string]*string @@ -2753,23 +2281,6 @@ type QueueServicePropertiesProperties struct { Cors *CorsRules } -// QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties -// method. -type QueueServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - -// QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method. -type QueueServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties -// method. -type QueueServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -2888,11 +2399,6 @@ type SKUListResult struct { Value []*SKUInformation } -// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. -type SKUsClientListOptions struct { - // placeholder for future optional parameters -} - type SSHPublicKey struct { // Optional. It is used to store the function/usage of the key Description *string @@ -3054,33 +2560,6 @@ type TableAccessPolicy struct { StartTime *time.Time } -// TableClientCreateOptions contains the optional parameters for the TableClient.Create method. -type TableClientCreateOptions struct { - // The parameters to provide to create a table. - Parameters *Table -} - -// TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method. -type TableClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// TableClientGetOptions contains the optional parameters for the TableClient.Get method. -type TableClientGetOptions struct { - // placeholder for future optional parameters -} - -// TableClientListOptions contains the optional parameters for the TableClient.NewListPager method. -type TableClientListOptions struct { - // placeholder for future optional parameters -} - -// TableClientUpdateOptions contains the optional parameters for the TableClient.Update method. -type TableClientUpdateOptions struct { - // The parameters to provide to create a table. - Parameters *Table -} - type TableProperties struct { // List of stored access policies specified on the table. SignedIdentifiers []*TableSignedIdentifier @@ -3112,23 +2591,6 @@ type TableServicePropertiesProperties struct { Cors *CorsRules } -// TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties -// method. -type TableServicesClientGetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - -// TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method. -type TableServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties -// method. -type TableServicesClientSetServicePropertiesOptions struct { - // placeholder for future optional parameters -} - // TableSignedIdentifier - Object to set Table Access Policy. type TableSignedIdentifier struct { // REQUIRED; unique-64-character-value of the stored access policy. @@ -3252,11 +2714,6 @@ type UsageName struct { Value *string } -// UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method. -type UsagesClientListByLocationOptions struct { - // placeholder for future optional parameters -} - // UserAssignedIdentity for the resource. type UserAssignedIdentity struct { // READ-ONLY; The client ID of the identity. diff --git a/sdk/resourcemanager/storage/armstorage/options.go b/sdk/resourcemanager/storage/armstorage/options.go new file mode 100644 index 000000000000..40ecbd4880f3 --- /dev/null +++ b/sdk/resourcemanager/storage/armstorage/options.go @@ -0,0 +1,564 @@ +//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 armstorage + +// AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginAbortHierarchicalNamespaceMigration +// method. +type AccountsClientBeginAbortHierarchicalNamespaceMigrationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientBeginCreateOptions contains the optional parameters for the AccountsClient.BeginCreate method. +type AccountsClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientBeginFailoverOptions contains the optional parameters for the AccountsClient.BeginFailover method. +type AccountsClientBeginFailoverOptions struct { + // The parameter is set to 'Planned' to indicate whether a Planned failover is requested.. Specifying any value will set the + // value to Planned. + FailoverType *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientBeginHierarchicalNamespaceMigrationOptions contains the optional parameters for the AccountsClient.BeginHierarchicalNamespaceMigration +// method. +type AccountsClientBeginHierarchicalNamespaceMigrationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientBeginRestoreBlobRangesOptions contains the optional parameters for the AccountsClient.BeginRestoreBlobRanges +// method. +type AccountsClientBeginRestoreBlobRangesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AccountsClientCheckNameAvailabilityOptions contains the optional parameters for the AccountsClient.CheckNameAvailability +// method. +type AccountsClientCheckNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientDeleteOptions contains the optional parameters for the AccountsClient.Delete method. +type AccountsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientGetPropertiesOptions contains the optional parameters for the AccountsClient.GetProperties method. +type AccountsClientGetPropertiesOptions struct { + // May be used to expand the properties within account's properties. By default, data is not included when fetching properties. + // Currently we only support geoReplicationStats and blobRestoreStatus. + Expand *StorageAccountExpand +} + +// AccountsClientListAccountSASOptions contains the optional parameters for the AccountsClient.ListAccountSAS method. +type AccountsClientListAccountSASOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListByResourceGroupOptions contains the optional parameters for the AccountsClient.NewListByResourceGroupPager +// method. +type AccountsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListKeysOptions contains the optional parameters for the AccountsClient.ListKeys method. +type AccountsClientListKeysOptions struct { + // Specifies type of the key to be listed. Possible value is kerb.. Specifying any value will set the value to kerb. + Expand *string +} + +// AccountsClientListOptions contains the optional parameters for the AccountsClient.NewListPager method. +type AccountsClientListOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientListServiceSASOptions contains the optional parameters for the AccountsClient.ListServiceSAS method. +type AccountsClientListServiceSASOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientRegenerateKeyOptions contains the optional parameters for the AccountsClient.RegenerateKey method. +type AccountsClientRegenerateKeyOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientRevokeUserDelegationKeysOptions contains the optional parameters for the AccountsClient.RevokeUserDelegationKeys +// method. +type AccountsClientRevokeUserDelegationKeysOptions struct { + // placeholder for future optional parameters +} + +// AccountsClientUpdateOptions contains the optional parameters for the AccountsClient.Update method. +type AccountsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientBeginObjectLevelWormOptions contains the optional parameters for the BlobContainersClient.BeginObjectLevelWorm +// method. +type BlobContainersClientBeginObjectLevelWormOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BlobContainersClientClearLegalHoldOptions contains the optional parameters for the BlobContainersClient.ClearLegalHold +// method. +type BlobContainersClientClearLegalHoldOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientCreateOptions contains the optional parameters for the BlobContainersClient.Create method. +type BlobContainersClientCreateOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.CreateOrUpdateImmutabilityPolicy +// method. +type BlobContainersClientCreateOrUpdateImmutabilityPolicyOptions struct { + // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation + // only if the immutability policy already exists. If omitted, this operation will + // always be applied. + IfMatch *string + + // The ImmutabilityPolicy Properties that will be created or updated to a blob container. + Parameters *ImmutabilityPolicy +} + +// BlobContainersClientDeleteImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.DeleteImmutabilityPolicy +// method. +type BlobContainersClientDeleteImmutabilityPolicyOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientDeleteOptions contains the optional parameters for the BlobContainersClient.Delete method. +type BlobContainersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientExtendImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.ExtendImmutabilityPolicy +// method. +type BlobContainersClientExtendImmutabilityPolicyOptions struct { + // The ImmutabilityPolicy Properties that will be extended for a blob container. + Parameters *ImmutabilityPolicy +} + +// BlobContainersClientGetImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.GetImmutabilityPolicy +// method. +type BlobContainersClientGetImmutabilityPolicyOptions struct { + // The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation + // only if the immutability policy already exists. If omitted, this operation will + // always be applied. + IfMatch *string +} + +// BlobContainersClientGetOptions contains the optional parameters for the BlobContainersClient.Get method. +type BlobContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientLeaseOptions contains the optional parameters for the BlobContainersClient.Lease method. +type BlobContainersClientLeaseOptions struct { + // Lease Container request body. + Parameters *LeaseContainerRequest +} + +// BlobContainersClientListOptions contains the optional parameters for the BlobContainersClient.NewListPager method. +type BlobContainersClientListOptions struct { + // Optional. When specified, only container names starting with the filter will be listed. + Filter *string + + // Optional, used to include the properties for soft deleted blob containers. + Include *ListContainersInclude + + // Optional. Specified maximum number of containers that can be included in the list. + Maxpagesize *string +} + +// BlobContainersClientLockImmutabilityPolicyOptions contains the optional parameters for the BlobContainersClient.LockImmutabilityPolicy +// method. +type BlobContainersClientLockImmutabilityPolicyOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientSetLegalHoldOptions contains the optional parameters for the BlobContainersClient.SetLegalHold method. +type BlobContainersClientSetLegalHoldOptions struct { + // placeholder for future optional parameters +} + +// BlobContainersClientUpdateOptions contains the optional parameters for the BlobContainersClient.Update method. +type BlobContainersClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientCreateOrUpdateOptions contains the optional parameters for the BlobInventoryPoliciesClient.CreateOrUpdate +// method. +type BlobInventoryPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientDeleteOptions contains the optional parameters for the BlobInventoryPoliciesClient.Delete method. +type BlobInventoryPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientGetOptions contains the optional parameters for the BlobInventoryPoliciesClient.Get method. +type BlobInventoryPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// BlobInventoryPoliciesClientListOptions contains the optional parameters for the BlobInventoryPoliciesClient.NewListPager +// method. +type BlobInventoryPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// BlobServicesClientGetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.GetServiceProperties +// method. +type BlobServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// BlobServicesClientListOptions contains the optional parameters for the BlobServicesClient.NewListPager method. +type BlobServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// BlobServicesClientSetServicePropertiesOptions contains the optional parameters for the BlobServicesClient.SetServiceProperties +// method. +type BlobServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// DeletedAccountsClientGetOptions contains the optional parameters for the DeletedAccountsClient.Get method. +type DeletedAccountsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeletedAccountsClientListOptions contains the optional parameters for the DeletedAccountsClient.NewListPager method. +type DeletedAccountsClientListOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientGetOptions contains the optional parameters for the EncryptionScopesClient.Get method. +type EncryptionScopesClientGetOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientListOptions contains the optional parameters for the EncryptionScopesClient.NewListPager method. +type EncryptionScopesClientListOptions struct { + // Optional. When specified, only encryption scope names starting with the filter will be listed. + Filter *string + + // Optional, when specified, will list encryption scopes with the specific state. Defaults to All + Include *ListEncryptionScopesInclude + + // Optional, specifies the maximum number of encryption scopes that will be included in the list response. + Maxpagesize *int32 +} + +// EncryptionScopesClientPatchOptions contains the optional parameters for the EncryptionScopesClient.Patch method. +type EncryptionScopesClientPatchOptions struct { + // placeholder for future optional parameters +} + +// EncryptionScopesClientPutOptions contains the optional parameters for the EncryptionScopesClient.Put method. +type EncryptionScopesClientPutOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientGetServicePropertiesOptions contains the optional parameters for the FileServicesClient.GetServiceProperties +// method. +type FileServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientListOptions contains the optional parameters for the FileServicesClient.List method. +type FileServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// FileServicesClientSetServicePropertiesOptions contains the optional parameters for the FileServicesClient.SetServiceProperties +// method. +type FileServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// FileSharesClientCreateOptions contains the optional parameters for the FileSharesClient.Create method. +type FileSharesClientCreateOptions struct { + // Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string + // with delimiter ',' + Expand *string +} + +// FileSharesClientDeleteOptions contains the optional parameters for the FileSharesClient.Delete method. +type FileSharesClientDeleteOptions struct { + // Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file + // share is deleted including all of its file share snapshots. If the file share + // contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file + // share snapshots (leased/unleased). For 'none', the file share is deleted if it + // has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails. + Include *string + + // Optional, used to delete a snapshot. + XMSSnapshot *string +} + +// FileSharesClientGetOptions contains the optional parameters for the FileSharesClient.Get method. +type FileSharesClientGetOptions struct { + // Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string + // with delimiter ','. + Expand *string + + // Optional, used to retrieve properties of a snapshot. + XMSSnapshot *string +} + +// FileSharesClientLeaseOptions contains the optional parameters for the FileSharesClient.Lease method. +type FileSharesClientLeaseOptions struct { + // Lease Share request body. + Parameters *LeaseShareRequest + + // Optional. Specify the snapshot time to lease a snapshot. + XMSSnapshot *string +} + +// FileSharesClientListOptions contains the optional parameters for the FileSharesClient.NewListPager method. +type FileSharesClientListOptions struct { + // Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed + // as a string with delimiter ',' + Expand *string + + // Optional. When specified, only share names starting with the filter will be listed. + Filter *string + + // Optional. Specified maximum number of shares that can be included in the list. + Maxpagesize *string +} + +// FileSharesClientRestoreOptions contains the optional parameters for the FileSharesClient.Restore method. +type FileSharesClientRestoreOptions struct { + // placeholder for future optional parameters +} + +// FileSharesClientUpdateOptions contains the optional parameters for the FileSharesClient.Update method. +type FileSharesClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientCreateOrUpdateOptions contains the optional parameters for the LocalUsersClient.CreateOrUpdate method. +type LocalUsersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientDeleteOptions contains the optional parameters for the LocalUsersClient.Delete method. +type LocalUsersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientGetOptions contains the optional parameters for the LocalUsersClient.Get method. +type LocalUsersClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientListKeysOptions contains the optional parameters for the LocalUsersClient.ListKeys method. +type LocalUsersClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientListOptions contains the optional parameters for the LocalUsersClient.NewListPager method. +type LocalUsersClientListOptions struct { + // placeholder for future optional parameters +} + +// LocalUsersClientRegeneratePasswordOptions contains the optional parameters for the LocalUsersClient.RegeneratePassword +// method. +type LocalUsersClientRegeneratePasswordOptions struct { + // placeholder for future optional parameters +} + +// ManagementPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagementPoliciesClient.CreateOrUpdate +// method. +type ManagementPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagementPoliciesClientDeleteOptions contains the optional parameters for the ManagementPoliciesClient.Delete method. +type ManagementPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagementPoliciesClientGetOptions contains the optional parameters for the ManagementPoliciesClient.Get method. +type ManagementPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ObjectReplicationPoliciesClient.CreateOrUpdate +// method. +type ObjectReplicationPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientDeleteOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Delete +// method. +type ObjectReplicationPoliciesClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientGetOptions contains the optional parameters for the ObjectReplicationPoliciesClient.Get +// method. +type ObjectReplicationPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// ObjectReplicationPoliciesClientListOptions contains the optional parameters for the ObjectReplicationPoliciesClient.NewListPager +// method. +type ObjectReplicationPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. +type PrivateEndpointConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientPutOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Put +// method. +type PrivateEndpointConnectionsClientPutOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResourcesClientListByStorageAccountOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByStorageAccount +// method. +type PrivateLinkResourcesClientListByStorageAccountOptions struct { + // placeholder for future optional parameters +} + +// QueueClientCreateOptions contains the optional parameters for the QueueClient.Create method. +type QueueClientCreateOptions struct { + // placeholder for future optional parameters +} + +// QueueClientDeleteOptions contains the optional parameters for the QueueClient.Delete method. +type QueueClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// QueueClientGetOptions contains the optional parameters for the QueueClient.Get method. +type QueueClientGetOptions struct { + // placeholder for future optional parameters +} + +// QueueClientListOptions contains the optional parameters for the QueueClient.NewListPager method. +type QueueClientListOptions struct { + // Optional, When specified, only the queues with a name starting with the given filter will be listed. + Filter *string + + // Optional, a maximum number of queues that should be included in a list queue response + Maxpagesize *string +} + +// QueueClientUpdateOptions contains the optional parameters for the QueueClient.Update method. +type QueueClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// QueueServicesClientGetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.GetServiceProperties +// method. +type QueueServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// QueueServicesClientListOptions contains the optional parameters for the QueueServicesClient.List method. +type QueueServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// QueueServicesClientSetServicePropertiesOptions contains the optional parameters for the QueueServicesClient.SetServiceProperties +// method. +type QueueServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// SKUsClientListOptions contains the optional parameters for the SKUsClient.NewListPager method. +type SKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// TableClientCreateOptions contains the optional parameters for the TableClient.Create method. +type TableClientCreateOptions struct { + // The parameters to provide to create a table. + Parameters *Table +} + +// TableClientDeleteOptions contains the optional parameters for the TableClient.Delete method. +type TableClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TableClientGetOptions contains the optional parameters for the TableClient.Get method. +type TableClientGetOptions struct { + // placeholder for future optional parameters +} + +// TableClientListOptions contains the optional parameters for the TableClient.NewListPager method. +type TableClientListOptions struct { + // placeholder for future optional parameters +} + +// TableClientUpdateOptions contains the optional parameters for the TableClient.Update method. +type TableClientUpdateOptions struct { + // The parameters to provide to create a table. + Parameters *Table +} + +// TableServicesClientGetServicePropertiesOptions contains the optional parameters for the TableServicesClient.GetServiceProperties +// method. +type TableServicesClientGetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// TableServicesClientListOptions contains the optional parameters for the TableServicesClient.List method. +type TableServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// TableServicesClientSetServicePropertiesOptions contains the optional parameters for the TableServicesClient.SetServiceProperties +// method. +type TableServicesClientSetServicePropertiesOptions struct { + // placeholder for future optional parameters +} + +// UsagesClientListByLocationOptions contains the optional parameters for the UsagesClient.NewListByLocationPager method. +type UsagesClientListByLocationOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/storage/armstorage/response_types.go b/sdk/resourcemanager/storage/armstorage/response_types.go index ab83d9fbbf2f..4a6a2ccf8513 100644 --- a/sdk/resourcemanager/storage/armstorage/response_types.go +++ b/sdk/resourcemanager/storage/armstorage/response_types.go @@ -15,11 +15,13 @@ type AccountsClientAbortHierarchicalNamespaceMigrationResponse struct { // AccountsClientCheckNameAvailabilityResponse contains the response from method AccountsClient.CheckNameAvailability. type AccountsClientCheckNameAvailabilityResponse struct { + // The CheckNameAvailability operation response. CheckNameAvailabilityResult } // AccountsClientCreateResponse contains the response from method AccountsClient.BeginCreate. type AccountsClientCreateResponse struct { + // The storage account. Account } @@ -35,6 +37,7 @@ type AccountsClientFailoverResponse struct { // AccountsClientGetPropertiesResponse contains the response from method AccountsClient.GetProperties. type AccountsClientGetPropertiesResponse struct { + // The storage account. Account } @@ -45,36 +48,43 @@ type AccountsClientHierarchicalNamespaceMigrationResponse struct { // AccountsClientListAccountSASResponse contains the response from method AccountsClient.ListAccountSAS. type AccountsClientListAccountSASResponse struct { + // The List SAS credentials operation response. ListAccountSasResponse } // AccountsClientListByResourceGroupResponse contains the response from method AccountsClient.NewListByResourceGroupPager. type AccountsClientListByResourceGroupResponse struct { + // The response from the List Storage Accounts operation. AccountListResult } // AccountsClientListKeysResponse contains the response from method AccountsClient.ListKeys. type AccountsClientListKeysResponse struct { + // The response from the ListKeys operation. AccountListKeysResult } // AccountsClientListResponse contains the response from method AccountsClient.NewListPager. type AccountsClientListResponse struct { + // The response from the List Storage Accounts operation. AccountListResult } // AccountsClientListServiceSASResponse contains the response from method AccountsClient.ListServiceSAS. type AccountsClientListServiceSASResponse struct { + // The List service SAS credentials operation response. ListServiceSasResponse } // AccountsClientRegenerateKeyResponse contains the response from method AccountsClient.RegenerateKey. type AccountsClientRegenerateKeyResponse struct { + // The response from the ListKeys operation. AccountListKeysResult } // AccountsClientRestoreBlobRangesResponse contains the response from method AccountsClient.BeginRestoreBlobRanges. type AccountsClientRestoreBlobRangesResponse struct { + // Blob restore status. BlobRestoreStatus } @@ -85,29 +95,36 @@ type AccountsClientRevokeUserDelegationKeysResponse struct { // AccountsClientUpdateResponse contains the response from method AccountsClient.Update. type AccountsClientUpdateResponse struct { + // The storage account. Account } // BlobContainersClientClearLegalHoldResponse contains the response from method BlobContainersClient.ClearLegalHold. type BlobContainersClientClearLegalHoldResponse struct { + // The LegalHold property of a blob container. LegalHold } // BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse contains the response from method BlobContainersClient.CreateOrUpdateImmutabilityPolicy. type BlobContainersClientCreateOrUpdateImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } // BlobContainersClientCreateResponse contains the response from method BlobContainersClient.Create. type BlobContainersClientCreateResponse struct { + // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer } // BlobContainersClientDeleteImmutabilityPolicyResponse contains the response from method BlobContainersClient.DeleteImmutabilityPolicy. type BlobContainersClientDeleteImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } @@ -119,36 +136,45 @@ type BlobContainersClientDeleteResponse struct { // BlobContainersClientExtendImmutabilityPolicyResponse contains the response from method BlobContainersClient.ExtendImmutabilityPolicy. type BlobContainersClientExtendImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } // BlobContainersClientGetImmutabilityPolicyResponse contains the response from method BlobContainersClient.GetImmutabilityPolicy. type BlobContainersClientGetImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } // BlobContainersClientGetResponse contains the response from method BlobContainersClient.Get. type BlobContainersClientGetResponse struct { + // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer } // BlobContainersClientLeaseResponse contains the response from method BlobContainersClient.Lease. type BlobContainersClientLeaseResponse struct { + // Lease Container response schema. LeaseContainerResponse } // BlobContainersClientListResponse contains the response from method BlobContainersClient.NewListPager. type BlobContainersClientListResponse struct { + // Response schema. Contains list of blobs returned, and if paging is requested or required, a URL to next page of containers. ListContainerItems } // BlobContainersClientLockImmutabilityPolicyResponse contains the response from method BlobContainersClient.LockImmutabilityPolicy. type BlobContainersClientLockImmutabilityPolicyResponse struct { + // The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. ImmutabilityPolicy + // ETag contains the information returned from the ETag header response. ETag *string } @@ -160,16 +186,19 @@ type BlobContainersClientObjectLevelWormResponse struct { // BlobContainersClientSetLegalHoldResponse contains the response from method BlobContainersClient.SetLegalHold. type BlobContainersClientSetLegalHoldResponse struct { + // The LegalHold property of a blob container. LegalHold } // BlobContainersClientUpdateResponse contains the response from method BlobContainersClient.Update. type BlobContainersClientUpdateResponse struct { + // Properties of the blob container, including Id, resource name, resource type, Etag. BlobContainer } // BlobInventoryPoliciesClientCreateOrUpdateResponse contains the response from method BlobInventoryPoliciesClient.CreateOrUpdate. type BlobInventoryPoliciesClientCreateOrUpdateResponse struct { + // The storage account blob inventory policy. BlobInventoryPolicy } @@ -180,16 +209,19 @@ type BlobInventoryPoliciesClientDeleteResponse struct { // BlobInventoryPoliciesClientGetResponse contains the response from method BlobInventoryPoliciesClient.Get. type BlobInventoryPoliciesClientGetResponse struct { + // The storage account blob inventory policy. BlobInventoryPolicy } // BlobInventoryPoliciesClientListResponse contains the response from method BlobInventoryPoliciesClient.NewListPager. type BlobInventoryPoliciesClientListResponse struct { + // List of blob inventory policies returned. ListBlobInventoryPolicy } // BlobServicesClientGetServicePropertiesResponse contains the response from method BlobServicesClient.GetServiceProperties. type BlobServicesClientGetServicePropertiesResponse struct { + // The properties of a storage account’s Blob service. BlobServiceProperties } @@ -200,41 +232,49 @@ type BlobServicesClientListResponse struct { // BlobServicesClientSetServicePropertiesResponse contains the response from method BlobServicesClient.SetServiceProperties. type BlobServicesClientSetServicePropertiesResponse struct { + // The properties of a storage account’s Blob service. BlobServiceProperties } // DeletedAccountsClientGetResponse contains the response from method DeletedAccountsClient.Get. type DeletedAccountsClientGetResponse struct { + // Deleted storage account DeletedAccount } // DeletedAccountsClientListResponse contains the response from method DeletedAccountsClient.NewListPager. type DeletedAccountsClientListResponse struct { + // The response from the List Deleted Accounts operation. DeletedAccountListResult } // EncryptionScopesClientGetResponse contains the response from method EncryptionScopesClient.Get. type EncryptionScopesClientGetResponse struct { + // The Encryption Scope resource. EncryptionScope } // EncryptionScopesClientListResponse contains the response from method EncryptionScopesClient.NewListPager. type EncryptionScopesClientListResponse struct { + // List of encryption scopes requested, and if paging is required, a URL to the next page of encryption scopes. EncryptionScopeListResult } // EncryptionScopesClientPatchResponse contains the response from method EncryptionScopesClient.Patch. type EncryptionScopesClientPatchResponse struct { + // The Encryption Scope resource. EncryptionScope } // EncryptionScopesClientPutResponse contains the response from method EncryptionScopesClient.Put. type EncryptionScopesClientPutResponse struct { + // The Encryption Scope resource. EncryptionScope } // FileServicesClientGetServicePropertiesResponse contains the response from method FileServicesClient.GetServiceProperties. type FileServicesClientGetServicePropertiesResponse struct { + // The properties of File services in storage account. FileServiceProperties } @@ -245,11 +285,13 @@ type FileServicesClientListResponse struct { // FileServicesClientSetServicePropertiesResponse contains the response from method FileServicesClient.SetServiceProperties. type FileServicesClientSetServicePropertiesResponse struct { + // The properties of File services in storage account. FileServiceProperties } // FileSharesClientCreateResponse contains the response from method FileSharesClient.Create. type FileSharesClientCreateResponse struct { + // Properties of the file share, including Id, resource name, resource type, Etag. FileShare } @@ -260,18 +302,22 @@ type FileSharesClientDeleteResponse struct { // FileSharesClientGetResponse contains the response from method FileSharesClient.Get. type FileSharesClientGetResponse struct { + // Properties of the file share, including Id, resource name, resource type, Etag. FileShare } // FileSharesClientLeaseResponse contains the response from method FileSharesClient.Lease. type FileSharesClientLeaseResponse struct { + // Lease Share response schema. LeaseShareResponse + // ETag contains the information returned from the ETag header response. ETag *string } // FileSharesClientListResponse contains the response from method FileSharesClient.NewListPager. type FileSharesClientListResponse struct { + // Response schema. Contains list of shares returned, and if paging is requested or required, a URL to next page of shares. FileShareItems } @@ -282,11 +328,13 @@ type FileSharesClientRestoreResponse struct { // FileSharesClientUpdateResponse contains the response from method FileSharesClient.Update. type FileSharesClientUpdateResponse struct { + // Properties of the file share, including Id, resource name, resource type, Etag. FileShare } // LocalUsersClientCreateOrUpdateResponse contains the response from method LocalUsersClient.CreateOrUpdate. type LocalUsersClientCreateOrUpdateResponse struct { + // The local user associated with the storage accounts. LocalUser } @@ -297,26 +345,31 @@ type LocalUsersClientDeleteResponse struct { // LocalUsersClientGetResponse contains the response from method LocalUsersClient.Get. type LocalUsersClientGetResponse struct { + // The local user associated with the storage accounts. LocalUser } // LocalUsersClientListKeysResponse contains the response from method LocalUsersClient.ListKeys. type LocalUsersClientListKeysResponse struct { + // The Storage Account Local User keys. LocalUserKeys } // LocalUsersClientListResponse contains the response from method LocalUsersClient.NewListPager. type LocalUsersClientListResponse struct { + // List storage account local users. LocalUsers } // LocalUsersClientRegeneratePasswordResponse contains the response from method LocalUsersClient.RegeneratePassword. type LocalUsersClientRegeneratePasswordResponse struct { + // The secrets of Storage Account Local User. LocalUserRegeneratePasswordResult } // ManagementPoliciesClientCreateOrUpdateResponse contains the response from method ManagementPoliciesClient.CreateOrUpdate. type ManagementPoliciesClientCreateOrUpdateResponse struct { + // The Get Storage Account ManagementPolicies operation response. ManagementPolicy } @@ -327,11 +380,13 @@ type ManagementPoliciesClientDeleteResponse struct { // ManagementPoliciesClientGetResponse contains the response from method ManagementPoliciesClient.Get. type ManagementPoliciesClientGetResponse struct { + // The Get Storage Account ManagementPolicies operation response. ManagementPolicy } // ObjectReplicationPoliciesClientCreateOrUpdateResponse contains the response from method ObjectReplicationPoliciesClient.CreateOrUpdate. type ObjectReplicationPoliciesClientCreateOrUpdateResponse struct { + // The replication policy between two storage accounts. Multiple rules can be defined in one policy. ObjectReplicationPolicy } @@ -342,16 +397,20 @@ type ObjectReplicationPoliciesClientDeleteResponse struct { // ObjectReplicationPoliciesClientGetResponse contains the response from method ObjectReplicationPoliciesClient.Get. type ObjectReplicationPoliciesClientGetResponse struct { + // The replication policy between two storage accounts. Multiple rules can be defined in one policy. ObjectReplicationPolicy } // ObjectReplicationPoliciesClientListResponse contains the response from method ObjectReplicationPoliciesClient.NewListPager. type ObjectReplicationPoliciesClientListResponse struct { + // List storage account object replication policies. ObjectReplicationPolicies } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } @@ -362,21 +421,25 @@ type PrivateEndpointConnectionsClientDeleteResponse struct { // PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get. type PrivateEndpointConnectionsClientGetResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { + // List of private endpoint connection associated with the specified storage account PrivateEndpointConnectionListResult } // PrivateEndpointConnectionsClientPutResponse contains the response from method PrivateEndpointConnectionsClient.Put. type PrivateEndpointConnectionsClientPutResponse struct { + // The Private Endpoint Connection resource. PrivateEndpointConnection } // PrivateLinkResourcesClientListByStorageAccountResponse contains the response from method PrivateLinkResourcesClient.ListByStorageAccount. type PrivateLinkResourcesClientListByStorageAccountResponse struct { + // A list of private link resources PrivateLinkResourceListResult } @@ -397,6 +460,7 @@ type QueueClientGetResponse struct { // QueueClientListResponse contains the response from method QueueClient.NewListPager. type QueueClientListResponse struct { + // Response schema. Contains list of queues returned ListQueueResource } @@ -407,6 +471,7 @@ type QueueClientUpdateResponse struct { // QueueServicesClientGetServicePropertiesResponse contains the response from method QueueServicesClient.GetServiceProperties. type QueueServicesClientGetServicePropertiesResponse struct { + // The properties of a storage account’s Queue service. QueueServiceProperties } @@ -417,16 +482,19 @@ type QueueServicesClientListResponse struct { // QueueServicesClientSetServicePropertiesResponse contains the response from method QueueServicesClient.SetServiceProperties. type QueueServicesClientSetServicePropertiesResponse struct { + // The properties of a storage account’s Queue service. QueueServiceProperties } // SKUsClientListResponse contains the response from method SKUsClient.NewListPager. type SKUsClientListResponse struct { + // The response from the List Storage SKUs operation. SKUListResult } // TableClientCreateResponse contains the response from method TableClient.Create. type TableClientCreateResponse struct { + // Properties of the table, including Id, resource name, resource type. Table } @@ -437,21 +505,25 @@ type TableClientDeleteResponse struct { // TableClientGetResponse contains the response from method TableClient.Get. type TableClientGetResponse struct { + // Properties of the table, including Id, resource name, resource type. Table } // TableClientListResponse contains the response from method TableClient.NewListPager. type TableClientListResponse struct { + // Response schema. Contains list of tables returned ListTableResource } // TableClientUpdateResponse contains the response from method TableClient.Update. type TableClientUpdateResponse struct { + // Properties of the table, including Id, resource name, resource type. Table } // TableServicesClientGetServicePropertiesResponse contains the response from method TableServicesClient.GetServiceProperties. type TableServicesClientGetServicePropertiesResponse struct { + // The properties of a storage account’s Table service. TableServiceProperties } @@ -462,10 +534,12 @@ type TableServicesClientListResponse struct { // TableServicesClientSetServicePropertiesResponse contains the response from method TableServicesClient.SetServiceProperties. type TableServicesClientSetServicePropertiesResponse struct { + // The properties of a storage account’s Table service. TableServiceProperties } // UsagesClientListByLocationResponse contains the response from method UsagesClient.NewListByLocationPager. type UsagesClientListByLocationResponse struct { + // The response from the List Usages operation. UsageListResult }