From fb17b0aac529e208aa6be22a1e7e8afc73e75ffd Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Tue, 18 Jul 2023 16:04:53 -0700 Subject: [PATCH] Prep latest armresources beta for release --- .../resources/armresources/CHANGELOG.md | 6 + .../resources/armresources/autorest.md | 4 +- .../resources/armresources/build.go | 2 +- .../resources/armresources/client_factory.go | 22 +- .../resources/armresources/constants.go | 2 +- .../fake/deploymentoperations_server.go | 98 ++- .../armresources/fake/deployments_server.go | 402 +++++++---- .../resources/armresources/fake/internal.go | 45 ++ .../armresources/fake/operations_server.go | 26 +- .../fake/providerresourcetypes_server.go | 4 +- .../armresources/fake/providers_server.go | 44 +- .../fake/resourcegroups_server.go | 58 +- .../resources/armresources/fake/server.go | 172 +++-- .../armresources/fake/tags_server.go | 26 +- .../resources/armresources/go.mod | 2 +- .../resources/armresources/go.sum | 4 +- .../resources/armresources/models.go | 634 ----------------- .../resources/armresources/options.go | 654 ++++++++++++++++++ .../resources/armresources/response_types.go | 69 ++ 19 files changed, 1306 insertions(+), 968 deletions(-) create mode 100644 sdk/resourcemanager/resources/armresources/options.go diff --git a/sdk/resourcemanager/resources/armresources/CHANGELOG.md b/sdk/resourcemanager/resources/armresources/CHANGELOG.md index b0eec9a19ff8..1068015e51a0 100644 --- a/sdk/resourcemanager/resources/armresources/CHANGELOG.md +++ b/sdk/resourcemanager/resources/armresources/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.2.0-beta.2 (2023-07-19) + +### Bug Fixes + +- Fixed a potential panic in faked paged and long-running operations. + ## 1.2.0-beta.1 (2023-06-12) ### Features Added diff --git a/sdk/resourcemanager/resources/armresources/autorest.md b/sdk/resourcemanager/resources/armresources/autorest.md index f89bf48982ca..fb7136eede81 100644 --- a/sdk/resourcemanager/resources/armresources/autorest.md +++ b/sdk/resourcemanager/resources/armresources/autorest.md @@ -9,9 +9,9 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/4fd842fb73656039ec94ce367bcedee25a57bd18/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources -module-version: 1.2.0-beta.1 +module-version: 1.2.0-beta.2 package-resources: true -azcore-version: 1.7.0-beta.2 +azcore-version: 1.8.0-beta.1 generate-fakes: true inject-spans: true ``` diff --git a/sdk/resourcemanager/resources/armresources/build.go b/sdk/resourcemanager/resources/armresources/build.go index d38f8bbde615..29ab47d1e9ce 100644 --- a/sdk/resourcemanager/resources/armresources/build.go +++ b/sdk/resourcemanager/resources/armresources/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/resources/armresources +//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.53" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armresources package armresources diff --git a/sdk/resourcemanager/resources/armresources/client_factory.go b/sdk/resourcemanager/resources/armresources/client_factory.go index 9206a4ff5f5a..b8c9f57170b3 100644 --- a/sdk/resourcemanager/resources/armresources/client_factory.go +++ b/sdk/resourcemanager/resources/armresources/client_factory.go @@ -37,8 +37,13 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewClient() *Client { + subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewDeploymentOperationsClient() *DeploymentOperationsClient { + subClient, _ := NewDeploymentOperationsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -47,8 +52,8 @@ func (c *ClientFactory) NewDeploymentsClient() *DeploymentsClient { return subClient } -func (c *ClientFactory) NewProvidersClient() *ProvidersClient { - subClient, _ := NewProvidersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } @@ -57,8 +62,8 @@ func (c *ClientFactory) NewProviderResourceTypesClient() *ProviderResourceTypesC return subClient } -func (c *ClientFactory) NewClient() *Client { - subClient, _ := NewClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProvidersClient() *ProvidersClient { + subClient, _ := NewProvidersClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -71,8 +76,3 @@ func (c *ClientFactory) NewTagsClient() *TagsClient { subClient, _ := NewTagsClient(c.subscriptionID, c.credential, c.options) return subClient } - -func (c *ClientFactory) NewDeploymentOperationsClient() *DeploymentOperationsClient { - subClient, _ := NewDeploymentOperationsClient(c.subscriptionID, c.credential, c.options) - return subClient -} diff --git a/sdk/resourcemanager/resources/armresources/constants.go b/sdk/resourcemanager/resources/armresources/constants.go index 0c8d99ceb9bb..53daed607c82 100644 --- a/sdk/resourcemanager/resources/armresources/constants.go +++ b/sdk/resourcemanager/resources/armresources/constants.go @@ -10,7 +10,7 @@ package armresources const ( moduleName = "armresources" - moduleVersion = "v1.2.0-beta.1" + moduleVersion = "v1.2.0-beta.2" ) // AliasPathAttributes - The attributes of the token that the alias path is referring to. diff --git a/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go b/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go index 20425af3bc31..dda04d97e2b4 100644 --- a/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/deploymentoperations_server.go @@ -67,21 +67,28 @@ type DeploymentOperationsServer struct { } // NewDeploymentOperationsServerTransport creates a new instance of DeploymentOperationsServerTransport with the provided implementation. -// The returned DeploymentOperationsServerTransport instance is connected to an instance of armresources.DeploymentOperationsClient by way of the -// undefined.Transporter field. +// The returned DeploymentOperationsServerTransport instance is connected to an instance of armresources.DeploymentOperationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDeploymentOperationsServerTransport(srv *DeploymentOperationsServer) *DeploymentOperationsServerTransport { - return &DeploymentOperationsServerTransport{srv: srv} + return &DeploymentOperationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListResponse]](), + newListAtManagementGroupScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtManagementGroupScopeResponse]](), + newListAtScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtScopeResponse]](), + newListAtSubscriptionScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtSubscriptionScopeResponse]](), + newListAtTenantScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtTenantScopeResponse]](), + } } // DeploymentOperationsServerTransport connects instances of armresources.DeploymentOperationsClient to instances of DeploymentOperationsServer. // Don't use this type directly, use NewDeploymentOperationsServerTransport instead. type DeploymentOperationsServerTransport struct { srv *DeploymentOperationsServer - newListPager *azfake.PagerResponder[armresources.DeploymentOperationsClientListResponse] - newListAtManagementGroupScopePager *azfake.PagerResponder[armresources.DeploymentOperationsClientListAtManagementGroupScopeResponse] - newListAtScopePager *azfake.PagerResponder[armresources.DeploymentOperationsClientListAtScopeResponse] - newListAtSubscriptionScopePager *azfake.PagerResponder[armresources.DeploymentOperationsClientListAtSubscriptionScopeResponse] - newListAtTenantScopePager *azfake.PagerResponder[armresources.DeploymentOperationsClientListAtTenantScopeResponse] + newListPager *tracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListResponse]] + newListAtManagementGroupScopePager *tracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtManagementGroupScopeResponse]] + newListAtScopePager *tracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtScopeResponse]] + newListAtSubscriptionScopePager *tracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtSubscriptionScopeResponse]] + newListAtTenantScopePager *tracker[azfake.PagerResponder[armresources.DeploymentOperationsClientListAtTenantScopeResponse]] } // Do implements the policy.Transporter interface for DeploymentOperationsServerTransport. @@ -308,7 +315,8 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListPager(req *http.Req 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~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -345,20 +353,22 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListPager(req *http.Req } } resp := d.srv.NewListPager(resourceGroupNameUnescaped, deploymentNameUnescaped, options) - d.newListPager = &resp - server.PagerResponderInjectNextLinks(d.newListPager, req, func(page *armresources.DeploymentOperationsClientListResponse, createLink func() string) { + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.DeploymentOperationsClientListResponse, 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 } @@ -367,7 +377,8 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtManagementGroupSc if d.srv.NewListAtManagementGroupScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtManagementGroupScopePager not implemented")} } - if d.newListAtManagementGroupScopePager == nil { + newListAtManagementGroupScopePager := d.newListAtManagementGroupScopePager.get(req) + if newListAtManagementGroupScopePager == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -404,20 +415,22 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtManagementGroupSc } } resp := d.srv.NewListAtManagementGroupScopePager(groupIDUnescaped, deploymentNameUnescaped, options) - d.newListAtManagementGroupScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtManagementGroupScopePager, req, func(page *armresources.DeploymentOperationsClientListAtManagementGroupScopeResponse, createLink func() string) { + newListAtManagementGroupScopePager = &resp + d.newListAtManagementGroupScopePager.add(req, newListAtManagementGroupScopePager) + server.PagerResponderInjectNextLinks(newListAtManagementGroupScopePager, req, func(page *armresources.DeploymentOperationsClientListAtManagementGroupScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtManagementGroupScopePager, req) + resp, err := server.PagerResponderNext(newListAtManagementGroupScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtManagementGroupScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtManagementGroupScopePager) { - d.newListAtManagementGroupScopePager = nil + if !server.PagerResponderMore(newListAtManagementGroupScopePager) { + d.newListAtManagementGroupScopePager.remove(req) } return resp, nil } @@ -426,7 +439,8 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtScopePager(req *h if d.srv.NewListAtScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtScopePager not implemented")} } - if d.newListAtScopePager == nil { + newListAtScopePager := d.newListAtScopePager.get(req) + if newListAtScopePager == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -463,20 +477,22 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtScopePager(req *h } } resp := d.srv.NewListAtScopePager(scopeUnescaped, deploymentNameUnescaped, options) - d.newListAtScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtScopePager, req, func(page *armresources.DeploymentOperationsClientListAtScopeResponse, createLink func() string) { + newListAtScopePager = &resp + d.newListAtScopePager.add(req, newListAtScopePager) + server.PagerResponderInjectNextLinks(newListAtScopePager, req, func(page *armresources.DeploymentOperationsClientListAtScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtScopePager, req) + resp, err := server.PagerResponderNext(newListAtScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtScopePager) { - d.newListAtScopePager = nil + if !server.PagerResponderMore(newListAtScopePager) { + d.newListAtScopePager.remove(req) } return resp, nil } @@ -485,7 +501,8 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtSubscriptionScope if d.srv.NewListAtSubscriptionScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtSubscriptionScopePager not implemented")} } - if d.newListAtSubscriptionScopePager == nil { + newListAtSubscriptionScopePager := d.newListAtSubscriptionScopePager.get(req) + if newListAtSubscriptionScopePager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -518,20 +535,22 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtSubscriptionScope } } resp := d.srv.NewListAtSubscriptionScopePager(deploymentNameUnescaped, options) - d.newListAtSubscriptionScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtSubscriptionScopePager, req, func(page *armresources.DeploymentOperationsClientListAtSubscriptionScopeResponse, createLink func() string) { + newListAtSubscriptionScopePager = &resp + d.newListAtSubscriptionScopePager.add(req, newListAtSubscriptionScopePager) + server.PagerResponderInjectNextLinks(newListAtSubscriptionScopePager, req, func(page *armresources.DeploymentOperationsClientListAtSubscriptionScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtSubscriptionScopePager, req) + resp, err := server.PagerResponderNext(newListAtSubscriptionScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtSubscriptionScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtSubscriptionScopePager) { - d.newListAtSubscriptionScopePager = nil + if !server.PagerResponderMore(newListAtSubscriptionScopePager) { + d.newListAtSubscriptionScopePager.remove(req) } return resp, nil } @@ -540,7 +559,8 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtTenantScopePager( if d.srv.NewListAtTenantScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtTenantScopePager not implemented")} } - if d.newListAtTenantScopePager == nil { + newListAtTenantScopePager := d.newListAtTenantScopePager.get(req) + if newListAtTenantScopePager == nil { const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -573,20 +593,22 @@ func (d *DeploymentOperationsServerTransport) dispatchNewListAtTenantScopePager( } } resp := d.srv.NewListAtTenantScopePager(deploymentNameUnescaped, options) - d.newListAtTenantScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtTenantScopePager, req, func(page *armresources.DeploymentOperationsClientListAtTenantScopeResponse, createLink func() string) { + newListAtTenantScopePager = &resp + d.newListAtTenantScopePager.add(req, newListAtTenantScopePager) + server.PagerResponderInjectNextLinks(newListAtTenantScopePager, req, func(page *armresources.DeploymentOperationsClientListAtTenantScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtTenantScopePager, req) + resp, err := server.PagerResponderNext(newListAtTenantScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtTenantScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtTenantScopePager) { - d.newListAtTenantScopePager = nil + if !server.PagerResponderMore(newListAtTenantScopePager) { + d.newListAtTenantScopePager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/resources/armresources/fake/deployments_server.go b/sdk/resourcemanager/resources/armresources/fake/deployments_server.go index b49f2def0402..d8d119a96d80 100644 --- a/sdk/resourcemanager/resources/armresources/fake/deployments_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/deployments_server.go @@ -207,40 +207,66 @@ type DeploymentsServer struct { } // NewDeploymentsServerTransport creates a new instance of DeploymentsServerTransport with the provided implementation. -// The returned DeploymentsServerTransport instance is connected to an instance of armresources.DeploymentsClient by way of the -// undefined.Transporter field. +// The returned DeploymentsServerTransport instance is connected to an instance of armresources.DeploymentsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDeploymentsServerTransport(srv *DeploymentsServer) *DeploymentsServerTransport { - return &DeploymentsServerTransport{srv: srv} + return &DeploymentsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateResponse]](), + beginCreateOrUpdateAtManagementGroupScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse]](), + beginCreateOrUpdateAtScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtScopeResponse]](), + beginCreateOrUpdateAtSubscriptionScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse]](), + beginCreateOrUpdateAtTenantScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtTenantScopeResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteResponse]](), + beginDeleteAtManagementGroupScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtManagementGroupScopeResponse]](), + beginDeleteAtScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtScopeResponse]](), + beginDeleteAtSubscriptionScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtSubscriptionScopeResponse]](), + beginDeleteAtTenantScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtTenantScopeResponse]](), + newListAtManagementGroupScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentsClientListAtManagementGroupScopeResponse]](), + newListAtScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentsClientListAtScopeResponse]](), + newListAtSubscriptionScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentsClientListAtSubscriptionScopeResponse]](), + newListAtTenantScopePager: newTracker[azfake.PagerResponder[armresources.DeploymentsClientListAtTenantScopeResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armresources.DeploymentsClientListByResourceGroupResponse]](), + beginValidate: newTracker[azfake.PollerResponder[armresources.DeploymentsClientValidateResponse]](), + beginValidateAtManagementGroupScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtManagementGroupScopeResponse]](), + beginValidateAtScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtScopeResponse]](), + beginValidateAtSubscriptionScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtSubscriptionScopeResponse]](), + beginValidateAtTenantScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtTenantScopeResponse]](), + beginWhatIf: newTracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfResponse]](), + beginWhatIfAtManagementGroupScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtManagementGroupScopeResponse]](), + beginWhatIfAtSubscriptionScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtSubscriptionScopeResponse]](), + beginWhatIfAtTenantScope: newTracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtTenantScopeResponse]](), + } } // DeploymentsServerTransport connects instances of armresources.DeploymentsClient to instances of DeploymentsServer. // Don't use this type directly, use NewDeploymentsServerTransport instead. type DeploymentsServerTransport struct { srv *DeploymentsServer - beginCreateOrUpdate *azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateResponse] - beginCreateOrUpdateAtManagementGroupScope *azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse] - beginCreateOrUpdateAtScope *azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtScopeResponse] - beginCreateOrUpdateAtSubscriptionScope *azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse] - beginCreateOrUpdateAtTenantScope *azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtTenantScopeResponse] - beginDelete *azfake.PollerResponder[armresources.DeploymentsClientDeleteResponse] - beginDeleteAtManagementGroupScope *azfake.PollerResponder[armresources.DeploymentsClientDeleteAtManagementGroupScopeResponse] - beginDeleteAtScope *azfake.PollerResponder[armresources.DeploymentsClientDeleteAtScopeResponse] - beginDeleteAtSubscriptionScope *azfake.PollerResponder[armresources.DeploymentsClientDeleteAtSubscriptionScopeResponse] - beginDeleteAtTenantScope *azfake.PollerResponder[armresources.DeploymentsClientDeleteAtTenantScopeResponse] - newListAtManagementGroupScopePager *azfake.PagerResponder[armresources.DeploymentsClientListAtManagementGroupScopeResponse] - newListAtScopePager *azfake.PagerResponder[armresources.DeploymentsClientListAtScopeResponse] - newListAtSubscriptionScopePager *azfake.PagerResponder[armresources.DeploymentsClientListAtSubscriptionScopeResponse] - newListAtTenantScopePager *azfake.PagerResponder[armresources.DeploymentsClientListAtTenantScopeResponse] - newListByResourceGroupPager *azfake.PagerResponder[armresources.DeploymentsClientListByResourceGroupResponse] - beginValidate *azfake.PollerResponder[armresources.DeploymentsClientValidateResponse] - beginValidateAtManagementGroupScope *azfake.PollerResponder[armresources.DeploymentsClientValidateAtManagementGroupScopeResponse] - beginValidateAtScope *azfake.PollerResponder[armresources.DeploymentsClientValidateAtScopeResponse] - beginValidateAtSubscriptionScope *azfake.PollerResponder[armresources.DeploymentsClientValidateAtSubscriptionScopeResponse] - beginValidateAtTenantScope *azfake.PollerResponder[armresources.DeploymentsClientValidateAtTenantScopeResponse] - beginWhatIf *azfake.PollerResponder[armresources.DeploymentsClientWhatIfResponse] - beginWhatIfAtManagementGroupScope *azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtManagementGroupScopeResponse] - beginWhatIfAtSubscriptionScope *azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtSubscriptionScopeResponse] - beginWhatIfAtTenantScope *azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtTenantScopeResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateResponse]] + beginCreateOrUpdateAtManagementGroupScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse]] + beginCreateOrUpdateAtScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtScopeResponse]] + beginCreateOrUpdateAtSubscriptionScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse]] + beginCreateOrUpdateAtTenantScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientCreateOrUpdateAtTenantScopeResponse]] + beginDelete *tracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteResponse]] + beginDeleteAtManagementGroupScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtManagementGroupScopeResponse]] + beginDeleteAtScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtScopeResponse]] + beginDeleteAtSubscriptionScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtSubscriptionScopeResponse]] + beginDeleteAtTenantScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientDeleteAtTenantScopeResponse]] + newListAtManagementGroupScopePager *tracker[azfake.PagerResponder[armresources.DeploymentsClientListAtManagementGroupScopeResponse]] + newListAtScopePager *tracker[azfake.PagerResponder[armresources.DeploymentsClientListAtScopeResponse]] + newListAtSubscriptionScopePager *tracker[azfake.PagerResponder[armresources.DeploymentsClientListAtSubscriptionScopeResponse]] + newListAtTenantScopePager *tracker[azfake.PagerResponder[armresources.DeploymentsClientListAtTenantScopeResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armresources.DeploymentsClientListByResourceGroupResponse]] + beginValidate *tracker[azfake.PollerResponder[armresources.DeploymentsClientValidateResponse]] + beginValidateAtManagementGroupScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtManagementGroupScopeResponse]] + beginValidateAtScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtScopeResponse]] + beginValidateAtSubscriptionScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtSubscriptionScopeResponse]] + beginValidateAtTenantScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientValidateAtTenantScopeResponse]] + beginWhatIf *tracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfResponse]] + beginWhatIfAtManagementGroupScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtManagementGroupScopeResponse]] + beginWhatIfAtSubscriptionScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtSubscriptionScopeResponse]] + beginWhatIfAtTenantScope *tracker[azfake.PollerResponder[armresources.DeploymentsClientWhatIfAtTenantScopeResponse]] } // Do implements the policy.Transporter interface for DeploymentsServerTransport. @@ -697,7 +723,8 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if d.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if d.beginCreateOrUpdate == nil { + beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -720,19 +747,21 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + d.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdate) { - d.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + d.beginCreateOrUpdate.remove(req) } return resp, nil @@ -742,7 +771,8 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtManagementGrou if d.srv.BeginCreateOrUpdateAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateAtManagementGroupScope not implemented")} } - if d.beginCreateOrUpdateAtManagementGroupScope == nil { + beginCreateOrUpdateAtManagementGroupScope := d.beginCreateOrUpdateAtManagementGroupScope.get(req) + if beginCreateOrUpdateAtManagementGroupScope == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -765,19 +795,21 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtManagementGrou if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdateAtManagementGroupScope = &respr + beginCreateOrUpdateAtManagementGroupScope = &respr + d.beginCreateOrUpdateAtManagementGroupScope.add(req, beginCreateOrUpdateAtManagementGroupScope) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdateAtManagementGroupScope, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdateAtManagementGroupScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdateAtManagementGroupScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdateAtManagementGroupScope) { - d.beginCreateOrUpdateAtManagementGroupScope = nil + if !server.PollerResponderMore(beginCreateOrUpdateAtManagementGroupScope) { + d.beginCreateOrUpdateAtManagementGroupScope.remove(req) } return resp, nil @@ -787,7 +819,8 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtScope(req *htt if d.srv.BeginCreateOrUpdateAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateAtScope not implemented")} } - if d.beginCreateOrUpdateAtScope == nil { + beginCreateOrUpdateAtScope := d.beginCreateOrUpdateAtScope.get(req) + if beginCreateOrUpdateAtScope == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -810,19 +843,21 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtScope(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdateAtScope = &respr + beginCreateOrUpdateAtScope = &respr + d.beginCreateOrUpdateAtScope.add(req, beginCreateOrUpdateAtScope) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdateAtScope, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdateAtScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdateAtScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdateAtScope) { - d.beginCreateOrUpdateAtScope = nil + if !server.PollerResponderMore(beginCreateOrUpdateAtScope) { + d.beginCreateOrUpdateAtScope.remove(req) } return resp, nil @@ -832,7 +867,8 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtSubscriptionSc if d.srv.BeginCreateOrUpdateAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateAtSubscriptionScope not implemented")} } - if d.beginCreateOrUpdateAtSubscriptionScope == nil { + beginCreateOrUpdateAtSubscriptionScope := d.beginCreateOrUpdateAtSubscriptionScope.get(req) + if beginCreateOrUpdateAtSubscriptionScope == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -851,19 +887,21 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtSubscriptionSc if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdateAtSubscriptionScope = &respr + beginCreateOrUpdateAtSubscriptionScope = &respr + d.beginCreateOrUpdateAtSubscriptionScope.add(req, beginCreateOrUpdateAtSubscriptionScope) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdateAtSubscriptionScope, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdateAtSubscriptionScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdateAtSubscriptionScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdateAtSubscriptionScope) { - d.beginCreateOrUpdateAtSubscriptionScope = nil + if !server.PollerResponderMore(beginCreateOrUpdateAtSubscriptionScope) { + d.beginCreateOrUpdateAtSubscriptionScope.remove(req) } return resp, nil @@ -873,7 +911,8 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtTenantScope(re if d.srv.BeginCreateOrUpdateAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateAtTenantScope not implemented")} } - if d.beginCreateOrUpdateAtTenantScope == nil { + beginCreateOrUpdateAtTenantScope := d.beginCreateOrUpdateAtTenantScope.get(req) + if beginCreateOrUpdateAtTenantScope == nil { const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -892,19 +931,21 @@ func (d *DeploymentsServerTransport) dispatchBeginCreateOrUpdateAtTenantScope(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdateAtTenantScope = &respr + beginCreateOrUpdateAtTenantScope = &respr + d.beginCreateOrUpdateAtTenantScope.add(req, beginCreateOrUpdateAtTenantScope) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdateAtTenantScope, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdateAtTenantScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdateAtTenantScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdateAtTenantScope) { - d.beginCreateOrUpdateAtTenantScope = nil + if !server.PollerResponderMore(beginCreateOrUpdateAtTenantScope) { + d.beginCreateOrUpdateAtTenantScope.remove(req) } return resp, nil @@ -914,7 +955,8 @@ func (d *DeploymentsServerTransport) dispatchBeginDelete(req *http.Request) (*ht if d.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if d.beginDelete == nil { + beginDelete := d.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -933,19 +975,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDelete(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDelete = &respr + beginDelete = &respr + d.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(d.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDelete) { - d.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + d.beginDelete.remove(req) } return resp, nil @@ -955,7 +999,8 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtManagementGroupScope(r if d.srv.BeginDeleteAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeleteAtManagementGroupScope not implemented")} } - if d.beginDeleteAtManagementGroupScope == nil { + beginDeleteAtManagementGroupScope := d.beginDeleteAtManagementGroupScope.get(req) + if beginDeleteAtManagementGroupScope == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -974,19 +1019,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtManagementGroupScope(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDeleteAtManagementGroupScope = &respr + beginDeleteAtManagementGroupScope = &respr + d.beginDeleteAtManagementGroupScope.add(req, beginDeleteAtManagementGroupScope) } - resp, err := server.PollerResponderNext(d.beginDeleteAtManagementGroupScope, req) + resp, err := server.PollerResponderNext(beginDeleteAtManagementGroupScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDeleteAtManagementGroupScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDeleteAtManagementGroupScope) { - d.beginDeleteAtManagementGroupScope = nil + if !server.PollerResponderMore(beginDeleteAtManagementGroupScope) { + d.beginDeleteAtManagementGroupScope.remove(req) } return resp, nil @@ -996,7 +1043,8 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtScope(req *http.Reques if d.srv.BeginDeleteAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeleteAtScope not implemented")} } - if d.beginDeleteAtScope == nil { + beginDeleteAtScope := d.beginDeleteAtScope.get(req) + if beginDeleteAtScope == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1015,19 +1063,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtScope(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDeleteAtScope = &respr + beginDeleteAtScope = &respr + d.beginDeleteAtScope.add(req, beginDeleteAtScope) } - resp, err := server.PollerResponderNext(d.beginDeleteAtScope, req) + resp, err := server.PollerResponderNext(beginDeleteAtScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDeleteAtScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDeleteAtScope) { - d.beginDeleteAtScope = nil + if !server.PollerResponderMore(beginDeleteAtScope) { + d.beginDeleteAtScope.remove(req) } return resp, nil @@ -1037,7 +1087,8 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtSubscriptionScope(req if d.srv.BeginDeleteAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeleteAtSubscriptionScope not implemented")} } - if d.beginDeleteAtSubscriptionScope == nil { + beginDeleteAtSubscriptionScope := d.beginDeleteAtSubscriptionScope.get(req) + if beginDeleteAtSubscriptionScope == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1052,19 +1103,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtSubscriptionScope(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDeleteAtSubscriptionScope = &respr + beginDeleteAtSubscriptionScope = &respr + d.beginDeleteAtSubscriptionScope.add(req, beginDeleteAtSubscriptionScope) } - resp, err := server.PollerResponderNext(d.beginDeleteAtSubscriptionScope, req) + resp, err := server.PollerResponderNext(beginDeleteAtSubscriptionScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDeleteAtSubscriptionScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDeleteAtSubscriptionScope) { - d.beginDeleteAtSubscriptionScope = nil + if !server.PollerResponderMore(beginDeleteAtSubscriptionScope) { + d.beginDeleteAtSubscriptionScope.remove(req) } return resp, nil @@ -1074,7 +1127,8 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtTenantScope(req *http. if d.srv.BeginDeleteAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeleteAtTenantScope not implemented")} } - if d.beginDeleteAtTenantScope == nil { + beginDeleteAtTenantScope := d.beginDeleteAtTenantScope.get(req) + if beginDeleteAtTenantScope == nil { const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1089,19 +1143,21 @@ func (d *DeploymentsServerTransport) dispatchBeginDeleteAtTenantScope(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDeleteAtTenantScope = &respr + beginDeleteAtTenantScope = &respr + d.beginDeleteAtTenantScope.add(req, beginDeleteAtTenantScope) } - resp, err := server.PollerResponderNext(d.beginDeleteAtTenantScope, req) + resp, err := server.PollerResponderNext(beginDeleteAtTenantScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDeleteAtTenantScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDeleteAtTenantScope) { - d.beginDeleteAtTenantScope = nil + if !server.PollerResponderMore(beginDeleteAtTenantScope) { + d.beginDeleteAtTenantScope.remove(req) } return resp, nil @@ -1425,7 +1481,8 @@ func (d *DeploymentsServerTransport) dispatchNewListAtManagementGroupScopePager( if d.srv.NewListAtManagementGroupScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtManagementGroupScopePager not implemented")} } - if d.newListAtManagementGroupScopePager == nil { + newListAtManagementGroupScopePager := d.newListAtManagementGroupScopePager.get(req) + if newListAtManagementGroupScopePager == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1464,20 +1521,22 @@ func (d *DeploymentsServerTransport) dispatchNewListAtManagementGroupScopePager( } } resp := d.srv.NewListAtManagementGroupScopePager(groupIDUnescaped, options) - d.newListAtManagementGroupScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtManagementGroupScopePager, req, func(page *armresources.DeploymentsClientListAtManagementGroupScopeResponse, createLink func() string) { + newListAtManagementGroupScopePager = &resp + d.newListAtManagementGroupScopePager.add(req, newListAtManagementGroupScopePager) + server.PagerResponderInjectNextLinks(newListAtManagementGroupScopePager, req, func(page *armresources.DeploymentsClientListAtManagementGroupScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtManagementGroupScopePager, req) + resp, err := server.PagerResponderNext(newListAtManagementGroupScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtManagementGroupScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtManagementGroupScopePager) { - d.newListAtManagementGroupScopePager = nil + if !server.PagerResponderMore(newListAtManagementGroupScopePager) { + d.newListAtManagementGroupScopePager.remove(req) } return resp, nil } @@ -1486,7 +1545,8 @@ func (d *DeploymentsServerTransport) dispatchNewListAtScopePager(req *http.Reque if d.srv.NewListAtScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtScopePager not implemented")} } - if d.newListAtScopePager == nil { + newListAtScopePager := d.newListAtScopePager.get(req) + if newListAtScopePager == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1525,20 +1585,22 @@ func (d *DeploymentsServerTransport) dispatchNewListAtScopePager(req *http.Reque } } resp := d.srv.NewListAtScopePager(scopeUnescaped, options) - d.newListAtScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtScopePager, req, func(page *armresources.DeploymentsClientListAtScopeResponse, createLink func() string) { + newListAtScopePager = &resp + d.newListAtScopePager.add(req, newListAtScopePager) + server.PagerResponderInjectNextLinks(newListAtScopePager, req, func(page *armresources.DeploymentsClientListAtScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtScopePager, req) + resp, err := server.PagerResponderNext(newListAtScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtScopePager) { - d.newListAtScopePager = nil + if !server.PagerResponderMore(newListAtScopePager) { + d.newListAtScopePager.remove(req) } return resp, nil } @@ -1547,7 +1609,8 @@ func (d *DeploymentsServerTransport) dispatchNewListAtSubscriptionScopePager(req if d.srv.NewListAtSubscriptionScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtSubscriptionScopePager not implemented")} } - if d.newListAtSubscriptionScopePager == nil { + newListAtSubscriptionScopePager := d.newListAtSubscriptionScopePager.get(req) + if newListAtSubscriptionScopePager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1582,20 +1645,22 @@ func (d *DeploymentsServerTransport) dispatchNewListAtSubscriptionScopePager(req } } resp := d.srv.NewListAtSubscriptionScopePager(options) - d.newListAtSubscriptionScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtSubscriptionScopePager, req, func(page *armresources.DeploymentsClientListAtSubscriptionScopeResponse, createLink func() string) { + newListAtSubscriptionScopePager = &resp + d.newListAtSubscriptionScopePager.add(req, newListAtSubscriptionScopePager) + server.PagerResponderInjectNextLinks(newListAtSubscriptionScopePager, req, func(page *armresources.DeploymentsClientListAtSubscriptionScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtSubscriptionScopePager, req) + resp, err := server.PagerResponderNext(newListAtSubscriptionScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtSubscriptionScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtSubscriptionScopePager) { - d.newListAtSubscriptionScopePager = nil + if !server.PagerResponderMore(newListAtSubscriptionScopePager) { + d.newListAtSubscriptionScopePager.remove(req) } return resp, nil } @@ -1604,7 +1669,8 @@ func (d *DeploymentsServerTransport) dispatchNewListAtTenantScopePager(req *http if d.srv.NewListAtTenantScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtTenantScopePager not implemented")} } - if d.newListAtTenantScopePager == nil { + newListAtTenantScopePager := d.newListAtTenantScopePager.get(req) + if newListAtTenantScopePager == nil { qp := req.URL.Query() filterUnescaped, err := url.QueryUnescape(qp.Get("$filter")) if err != nil { @@ -1633,20 +1699,22 @@ func (d *DeploymentsServerTransport) dispatchNewListAtTenantScopePager(req *http } } resp := d.srv.NewListAtTenantScopePager(options) - d.newListAtTenantScopePager = &resp - server.PagerResponderInjectNextLinks(d.newListAtTenantScopePager, req, func(page *armresources.DeploymentsClientListAtTenantScopeResponse, createLink func() string) { + newListAtTenantScopePager = &resp + d.newListAtTenantScopePager.add(req, newListAtTenantScopePager) + server.PagerResponderInjectNextLinks(newListAtTenantScopePager, req, func(page *armresources.DeploymentsClientListAtTenantScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAtTenantScopePager, req) + resp, err := server.PagerResponderNext(newListAtTenantScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAtTenantScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAtTenantScopePager) { - d.newListAtTenantScopePager = nil + if !server.PagerResponderMore(newListAtTenantScopePager) { + d.newListAtTenantScopePager.remove(req) } return resp, nil } @@ -1655,7 +1723,8 @@ func (d *DeploymentsServerTransport) dispatchNewListByResourceGroupPager(req *ht if d.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if d.newListByResourceGroupPager == nil { + newListByResourceGroupPager := d.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1694,20 +1763,22 @@ func (d *DeploymentsServerTransport) dispatchNewListByResourceGroupPager(req *ht } } resp := d.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, options) - d.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(d.newListByResourceGroupPager, req, func(page *armresources.DeploymentsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + d.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armresources.DeploymentsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListByResourceGroupPager) { - d.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + d.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -1716,7 +1787,8 @@ func (d *DeploymentsServerTransport) dispatchBeginValidate(req *http.Request) (* if d.srv.BeginValidate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginValidate not implemented")} } - if d.beginValidate == nil { + beginValidate := d.beginValidate.get(req) + if beginValidate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1739,19 +1811,21 @@ func (d *DeploymentsServerTransport) dispatchBeginValidate(req *http.Request) (* if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginValidate = &respr + beginValidate = &respr + d.beginValidate.add(req, beginValidate) } - resp, err := server.PollerResponderNext(d.beginValidate, req) + resp, err := server.PollerResponderNext(beginValidate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusBadRequest}, resp.StatusCode) { + d.beginValidate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusBadRequest", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginValidate) { - d.beginValidate = nil + if !server.PollerResponderMore(beginValidate) { + d.beginValidate.remove(req) } return resp, nil @@ -1761,7 +1835,8 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtManagementGroupScope if d.srv.BeginValidateAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginValidateAtManagementGroupScope not implemented")} } - if d.beginValidateAtManagementGroupScope == nil { + beginValidateAtManagementGroupScope := d.beginValidateAtManagementGroupScope.get(req) + if beginValidateAtManagementGroupScope == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1784,19 +1859,21 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtManagementGroupScope if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginValidateAtManagementGroupScope = &respr + beginValidateAtManagementGroupScope = &respr + d.beginValidateAtManagementGroupScope.add(req, beginValidateAtManagementGroupScope) } - resp, err := server.PollerResponderNext(d.beginValidateAtManagementGroupScope, req) + resp, err := server.PollerResponderNext(beginValidateAtManagementGroupScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusBadRequest}, resp.StatusCode) { + d.beginValidateAtManagementGroupScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusBadRequest", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginValidateAtManagementGroupScope) { - d.beginValidateAtManagementGroupScope = nil + if !server.PollerResponderMore(beginValidateAtManagementGroupScope) { + d.beginValidateAtManagementGroupScope.remove(req) } return resp, nil @@ -1806,7 +1883,8 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtScope(req *http.Requ if d.srv.BeginValidateAtScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginValidateAtScope not implemented")} } - if d.beginValidateAtScope == nil { + beginValidateAtScope := d.beginValidateAtScope.get(req) + if beginValidateAtScope == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1829,19 +1907,21 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtScope(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginValidateAtScope = &respr + beginValidateAtScope = &respr + d.beginValidateAtScope.add(req, beginValidateAtScope) } - resp, err := server.PollerResponderNext(d.beginValidateAtScope, req) + resp, err := server.PollerResponderNext(beginValidateAtScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusBadRequest}, resp.StatusCode) { + d.beginValidateAtScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusBadRequest", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginValidateAtScope) { - d.beginValidateAtScope = nil + if !server.PollerResponderMore(beginValidateAtScope) { + d.beginValidateAtScope.remove(req) } return resp, nil @@ -1851,7 +1931,8 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtSubscriptionScope(re if d.srv.BeginValidateAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginValidateAtSubscriptionScope not implemented")} } - if d.beginValidateAtSubscriptionScope == nil { + beginValidateAtSubscriptionScope := d.beginValidateAtSubscriptionScope.get(req) + if beginValidateAtSubscriptionScope == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1870,19 +1951,21 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtSubscriptionScope(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginValidateAtSubscriptionScope = &respr + beginValidateAtSubscriptionScope = &respr + d.beginValidateAtSubscriptionScope.add(req, beginValidateAtSubscriptionScope) } - resp, err := server.PollerResponderNext(d.beginValidateAtSubscriptionScope, req) + resp, err := server.PollerResponderNext(beginValidateAtSubscriptionScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusBadRequest}, resp.StatusCode) { + d.beginValidateAtSubscriptionScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusBadRequest", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginValidateAtSubscriptionScope) { - d.beginValidateAtSubscriptionScope = nil + if !server.PollerResponderMore(beginValidateAtSubscriptionScope) { + d.beginValidateAtSubscriptionScope.remove(req) } return resp, nil @@ -1892,7 +1975,8 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtTenantScope(req *htt if d.srv.BeginValidateAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginValidateAtTenantScope not implemented")} } - if d.beginValidateAtTenantScope == nil { + beginValidateAtTenantScope := d.beginValidateAtTenantScope.get(req) + if beginValidateAtTenantScope == nil { const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1911,19 +1995,21 @@ func (d *DeploymentsServerTransport) dispatchBeginValidateAtTenantScope(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginValidateAtTenantScope = &respr + beginValidateAtTenantScope = &respr + d.beginValidateAtTenantScope.add(req, beginValidateAtTenantScope) } - resp, err := server.PollerResponderNext(d.beginValidateAtTenantScope, req) + resp, err := server.PollerResponderNext(beginValidateAtTenantScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusBadRequest}, resp.StatusCode) { + d.beginValidateAtTenantScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusBadRequest", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginValidateAtTenantScope) { - d.beginValidateAtTenantScope = nil + if !server.PollerResponderMore(beginValidateAtTenantScope) { + d.beginValidateAtTenantScope.remove(req) } return resp, nil @@ -1933,7 +2019,8 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIf(req *http.Request) (*ht if d.srv.BeginWhatIf == nil { return nil, &nonRetriableError{errors.New("fake for method BeginWhatIf not implemented")} } - if d.beginWhatIf == nil { + beginWhatIf := d.beginWhatIf.get(req) + if beginWhatIf == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1956,19 +2043,21 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIf(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginWhatIf = &respr + beginWhatIf = &respr + d.beginWhatIf.add(req, beginWhatIf) } - resp, err := server.PollerResponderNext(d.beginWhatIf, req) + resp, err := server.PollerResponderNext(beginWhatIf, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + d.beginWhatIf.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginWhatIf) { - d.beginWhatIf = nil + if !server.PollerResponderMore(beginWhatIf) { + d.beginWhatIf.remove(req) } return resp, nil @@ -1978,7 +2067,8 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtManagementGroupScope(r if d.srv.BeginWhatIfAtManagementGroupScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginWhatIfAtManagementGroupScope not implemented")} } - if d.beginWhatIfAtManagementGroupScope == nil { + beginWhatIfAtManagementGroupScope := d.beginWhatIfAtManagementGroupScope.get(req) + if beginWhatIfAtManagementGroupScope == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -2001,19 +2091,21 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtManagementGroupScope(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginWhatIfAtManagementGroupScope = &respr + beginWhatIfAtManagementGroupScope = &respr + d.beginWhatIfAtManagementGroupScope.add(req, beginWhatIfAtManagementGroupScope) } - resp, err := server.PollerResponderNext(d.beginWhatIfAtManagementGroupScope, req) + resp, err := server.PollerResponderNext(beginWhatIfAtManagementGroupScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + d.beginWhatIfAtManagementGroupScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginWhatIfAtManagementGroupScope) { - d.beginWhatIfAtManagementGroupScope = nil + if !server.PollerResponderMore(beginWhatIfAtManagementGroupScope) { + d.beginWhatIfAtManagementGroupScope.remove(req) } return resp, nil @@ -2023,7 +2115,8 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtSubscriptionScope(req if d.srv.BeginWhatIfAtSubscriptionScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginWhatIfAtSubscriptionScope not implemented")} } - if d.beginWhatIfAtSubscriptionScope == nil { + beginWhatIfAtSubscriptionScope := d.beginWhatIfAtSubscriptionScope.get(req) + if beginWhatIfAtSubscriptionScope == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -2042,19 +2135,21 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtSubscriptionScope(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginWhatIfAtSubscriptionScope = &respr + beginWhatIfAtSubscriptionScope = &respr + d.beginWhatIfAtSubscriptionScope.add(req, beginWhatIfAtSubscriptionScope) } - resp, err := server.PollerResponderNext(d.beginWhatIfAtSubscriptionScope, req) + resp, err := server.PollerResponderNext(beginWhatIfAtSubscriptionScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + d.beginWhatIfAtSubscriptionScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginWhatIfAtSubscriptionScope) { - d.beginWhatIfAtSubscriptionScope = nil + if !server.PollerResponderMore(beginWhatIfAtSubscriptionScope) { + d.beginWhatIfAtSubscriptionScope.remove(req) } return resp, nil @@ -2064,7 +2159,8 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtTenantScope(req *http. if d.srv.BeginWhatIfAtTenantScope == nil { return nil, &nonRetriableError{errors.New("fake for method BeginWhatIfAtTenantScope not implemented")} } - if d.beginWhatIfAtTenantScope == nil { + beginWhatIfAtTenantScope := d.beginWhatIfAtTenantScope.get(req) + if beginWhatIfAtTenantScope == nil { const regexStr = `/providers/Microsoft.Resources/deployments/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/whatIf` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -2083,19 +2179,21 @@ func (d *DeploymentsServerTransport) dispatchBeginWhatIfAtTenantScope(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginWhatIfAtTenantScope = &respr + beginWhatIfAtTenantScope = &respr + d.beginWhatIfAtTenantScope.add(req, beginWhatIfAtTenantScope) } - resp, err := server.PollerResponderNext(d.beginWhatIfAtTenantScope, req) + resp, err := server.PollerResponderNext(beginWhatIfAtTenantScope, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + d.beginWhatIfAtTenantScope.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginWhatIfAtTenantScope) { - d.beginWhatIfAtTenantScope = nil + if !server.PollerResponderMore(beginWhatIfAtTenantScope) { + d.beginWhatIfAtTenantScope.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/resources/armresources/fake/internal.go b/sdk/resourcemanager/resources/armresources/fake/internal.go index e9c8222f2199..03b635903572 100644 --- a/sdk/resourcemanager/resources/armresources/fake/internal.go +++ b/sdk/resourcemanager/resources/armresources/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/resources/armresources/fake/operations_server.go b/sdk/resourcemanager/resources/armresources/fake/operations_server.go index f7e6dd1f5975..9efc0cbd4a7e 100644 --- a/sdk/resourcemanager/resources/armresources/fake/operations_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/operations_server.go @@ -27,17 +27,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 armresources.OperationsClient by way of the -// undefined.Transporter field. +// The returned OperationsServerTransport instance is connected to an instance of armresources.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[armresources.OperationsClientListResponse]](), + } } // OperationsServerTransport connects instances of armresources.OperationsClient to instances of OperationsServer. // Don't use this type directly, use NewOperationsServerTransport instead. type OperationsServerTransport struct { srv *OperationsServer - newListPager *azfake.PagerResponder[armresources.OperationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armresources.OperationsClientListResponse]] } // Do implements the policy.Transporter interface for OperationsServerTransport. @@ -69,22 +72,25 @@ 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 - server.PagerResponderInjectNextLinks(o.newListPager, req, func(page *armresources.OperationsClientListResponse, createLink func() string) { + newListPager = &resp + o.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.OperationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - 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/resources/armresources/fake/providerresourcetypes_server.go b/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go index e6b9938697fa..907b98cea2cf 100644 --- a/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/providerresourcetypes_server.go @@ -29,8 +29,8 @@ type ProviderResourceTypesServer struct { } // NewProviderResourceTypesServerTransport creates a new instance of ProviderResourceTypesServerTransport with the provided implementation. -// The returned ProviderResourceTypesServerTransport instance is connected to an instance of armresources.ProviderResourceTypesClient by way of the -// undefined.Transporter field. +// The returned ProviderResourceTypesServerTransport instance is connected to an instance of armresources.ProviderResourceTypesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewProviderResourceTypesServerTransport(srv *ProviderResourceTypesServer) *ProviderResourceTypesServerTransport { return &ProviderResourceTypesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/resources/armresources/fake/providers_server.go b/sdk/resourcemanager/resources/armresources/fake/providers_server.go index 0fb8d8e28a99..6ed17df0562a 100644 --- a/sdk/resourcemanager/resources/armresources/fake/providers_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/providers_server.go @@ -59,18 +59,22 @@ type ProvidersServer struct { } // NewProvidersServerTransport creates a new instance of ProvidersServerTransport with the provided implementation. -// The returned ProvidersServerTransport instance is connected to an instance of armresources.ProvidersClient by way of the -// undefined.Transporter field. +// The returned ProvidersServerTransport instance is connected to an instance of armresources.ProvidersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewProvidersServerTransport(srv *ProvidersServer) *ProvidersServerTransport { - return &ProvidersServerTransport{srv: srv} + return &ProvidersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armresources.ProvidersClientListResponse]](), + newListAtTenantScopePager: newTracker[azfake.PagerResponder[armresources.ProvidersClientListAtTenantScopeResponse]](), + } } // ProvidersServerTransport connects instances of armresources.ProvidersClient to instances of ProvidersServer. // Don't use this type directly, use NewProvidersServerTransport instead. type ProvidersServerTransport struct { srv *ProvidersServer - newListPager *azfake.PagerResponder[armresources.ProvidersClientListResponse] - newListAtTenantScopePager *azfake.PagerResponder[armresources.ProvidersClientListAtTenantScopeResponse] + newListPager *tracker[azfake.PagerResponder[armresources.ProvidersClientListResponse]] + newListAtTenantScopePager *tracker[azfake.PagerResponder[armresources.ProvidersClientListAtTenantScopeResponse]] } // Do implements the policy.Transporter interface for ProvidersServerTransport. @@ -198,7 +202,8 @@ func (p *ProvidersServerTransport) dispatchNewListPager(req *http.Request) (*htt 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~%@]+)/providers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -218,20 +223,22 @@ func (p *ProvidersServerTransport) dispatchNewListPager(req *http.Request) (*htt } } resp := p.srv.NewListPager(options) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armresources.ProvidersClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.ProvidersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - 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 } @@ -240,7 +247,8 @@ func (p *ProvidersServerTransport) dispatchNewListAtTenantScopePager(req *http.R if p.srv.NewListAtTenantScopePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAtTenantScopePager not implemented")} } - if p.newListAtTenantScopePager == nil { + newListAtTenantScopePager := p.newListAtTenantScopePager.get(req) + if newListAtTenantScopePager == nil { qp := req.URL.Query() expandUnescaped, err := url.QueryUnescape(qp.Get("$expand")) if err != nil { @@ -254,20 +262,22 @@ func (p *ProvidersServerTransport) dispatchNewListAtTenantScopePager(req *http.R } } resp := p.srv.NewListAtTenantScopePager(options) - p.newListAtTenantScopePager = &resp - server.PagerResponderInjectNextLinks(p.newListAtTenantScopePager, req, func(page *armresources.ProvidersClientListAtTenantScopeResponse, createLink func() string) { + newListAtTenantScopePager = &resp + p.newListAtTenantScopePager.add(req, newListAtTenantScopePager) + server.PagerResponderInjectNextLinks(newListAtTenantScopePager, req, func(page *armresources.ProvidersClientListAtTenantScopeResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListAtTenantScopePager, req) + resp, err := server.PagerResponderNext(newListAtTenantScopePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListAtTenantScopePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListAtTenantScopePager) { - p.newListAtTenantScopePager = nil + if !server.PagerResponderMore(newListAtTenantScopePager) { + p.newListAtTenantScopePager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go b/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go index 7d72d380446e..e16c5e5a7565 100644 --- a/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/resourcegroups_server.go @@ -55,19 +55,24 @@ type ResourceGroupsServer struct { } // NewResourceGroupsServerTransport creates a new instance of ResourceGroupsServerTransport with the provided implementation. -// The returned ResourceGroupsServerTransport instance is connected to an instance of armresources.ResourceGroupsClient by way of the -// undefined.Transporter field. +// The returned ResourceGroupsServerTransport instance is connected to an instance of armresources.ResourceGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewResourceGroupsServerTransport(srv *ResourceGroupsServer) *ResourceGroupsServerTransport { - return &ResourceGroupsServerTransport{srv: srv} + return &ResourceGroupsServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armresources.ResourceGroupsClientDeleteResponse]](), + beginExportTemplate: newTracker[azfake.PollerResponder[armresources.ResourceGroupsClientExportTemplateResponse]](), + newListPager: newTracker[azfake.PagerResponder[armresources.ResourceGroupsClientListResponse]](), + } } // ResourceGroupsServerTransport connects instances of armresources.ResourceGroupsClient to instances of ResourceGroupsServer. // Don't use this type directly, use NewResourceGroupsServerTransport instead. type ResourceGroupsServerTransport struct { srv *ResourceGroupsServer - beginDelete *azfake.PollerResponder[armresources.ResourceGroupsClientDeleteResponse] - beginExportTemplate *azfake.PollerResponder[armresources.ResourceGroupsClientExportTemplateResponse] - newListPager *azfake.PagerResponder[armresources.ResourceGroupsClientListResponse] + beginDelete *tracker[azfake.PollerResponder[armresources.ResourceGroupsClientDeleteResponse]] + beginExportTemplate *tracker[azfake.PollerResponder[armresources.ResourceGroupsClientExportTemplateResponse]] + newListPager *tracker[azfake.PagerResponder[armresources.ResourceGroupsClientListResponse]] } // Do implements the policy.Transporter interface for ResourceGroupsServerTransport. @@ -173,7 +178,8 @@ func (r *ResourceGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -200,19 +206,21 @@ func (r *ResourceGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -222,7 +230,8 @@ func (r *ResourceGroupsServerTransport) dispatchBeginExportTemplate(req *http.Re if r.srv.BeginExportTemplate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginExportTemplate not implemented")} } - if r.beginExportTemplate == nil { + beginExportTemplate := r.beginExportTemplate.get(req) + if beginExportTemplate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/exportTemplate` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -241,19 +250,21 @@ func (r *ResourceGroupsServerTransport) dispatchBeginExportTemplate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginExportTemplate = &respr + beginExportTemplate = &respr + r.beginExportTemplate.add(req, beginExportTemplate) } - resp, err := server.PollerResponderNext(r.beginExportTemplate, req) + resp, err := server.PollerResponderNext(beginExportTemplate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + r.beginExportTemplate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginExportTemplate) { - r.beginExportTemplate = nil + if !server.PollerResponderMore(beginExportTemplate) { + r.beginExportTemplate.remove(req) } return resp, nil @@ -292,7 +303,8 @@ func (r *ResourceGroupsServerTransport) dispatchNewListPager(req *http.Request) if r.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if r.newListPager == nil { + newListPager := r.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -327,20 +339,22 @@ func (r *ResourceGroupsServerTransport) dispatchNewListPager(req *http.Request) } } resp := r.srv.NewListPager(options) - r.newListPager = &resp - server.PagerResponderInjectNextLinks(r.newListPager, req, func(page *armresources.ResourceGroupsClientListResponse, createLink func() string) { + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.ResourceGroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListPager) { - r.newListPager = nil + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/resources/armresources/fake/server.go b/sdk/resourcemanager/resources/armresources/fake/server.go index b6905a00244a..df120d035ba5 100644 --- a/sdk/resourcemanager/resources/armresources/fake/server.go +++ b/sdk/resourcemanager/resources/armresources/fake/server.go @@ -83,26 +83,38 @@ type Server struct { } // NewServerTransport creates a new instance of ServerTransport with the provided implementation. -// The returned ServerTransport instance is connected to an instance of armresources.Client by way of the -// undefined.Transporter field. +// The returned ServerTransport instance is connected to an instance of armresources.Client via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServerTransport(srv *Server) *ServerTransport { - return &ServerTransport{srv: srv} + return &ServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armresources.ClientCreateOrUpdateResponse]](), + beginCreateOrUpdateByID: newTracker[azfake.PollerResponder[armresources.ClientCreateOrUpdateByIDResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armresources.ClientDeleteResponse]](), + beginDeleteByID: newTracker[azfake.PollerResponder[armresources.ClientDeleteByIDResponse]](), + newListPager: newTracker[azfake.PagerResponder[armresources.ClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armresources.ClientListByResourceGroupResponse]](), + beginMoveResources: newTracker[azfake.PollerResponder[armresources.ClientMoveResourcesResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[armresources.ClientUpdateResponse]](), + beginUpdateByID: newTracker[azfake.PollerResponder[armresources.ClientUpdateByIDResponse]](), + beginValidateMoveResources: newTracker[azfake.PollerResponder[armresources.ClientValidateMoveResourcesResponse]](), + } } // ServerTransport connects instances of armresources.Client to instances of Server. // Don't use this type directly, use NewServerTransport instead. type ServerTransport struct { srv *Server - beginCreateOrUpdate *azfake.PollerResponder[armresources.ClientCreateOrUpdateResponse] - beginCreateOrUpdateByID *azfake.PollerResponder[armresources.ClientCreateOrUpdateByIDResponse] - beginDelete *azfake.PollerResponder[armresources.ClientDeleteResponse] - beginDeleteByID *azfake.PollerResponder[armresources.ClientDeleteByIDResponse] - newListPager *azfake.PagerResponder[armresources.ClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armresources.ClientListByResourceGroupResponse] - beginMoveResources *azfake.PollerResponder[armresources.ClientMoveResourcesResponse] - beginUpdate *azfake.PollerResponder[armresources.ClientUpdateResponse] - beginUpdateByID *azfake.PollerResponder[armresources.ClientUpdateByIDResponse] - beginValidateMoveResources *azfake.PollerResponder[armresources.ClientValidateMoveResourcesResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armresources.ClientCreateOrUpdateResponse]] + beginCreateOrUpdateByID *tracker[azfake.PollerResponder[armresources.ClientCreateOrUpdateByIDResponse]] + beginDelete *tracker[azfake.PollerResponder[armresources.ClientDeleteResponse]] + beginDeleteByID *tracker[azfake.PollerResponder[armresources.ClientDeleteByIDResponse]] + newListPager *tracker[azfake.PagerResponder[armresources.ClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armresources.ClientListByResourceGroupResponse]] + beginMoveResources *tracker[azfake.PollerResponder[armresources.ClientMoveResourcesResponse]] + beginUpdate *tracker[azfake.PollerResponder[armresources.ClientUpdateResponse]] + beginUpdateByID *tracker[azfake.PollerResponder[armresources.ClientUpdateByIDResponse]] + beginValidateMoveResources *tracker[azfake.PollerResponder[armresources.ClientValidateMoveResourcesResponse]] } // Do implements the policy.Transporter interface for ServerTransport. @@ -244,7 +256,8 @@ func (s *ServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http. if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -284,19 +297,21 @@ func (s *ServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -306,7 +321,8 @@ func (s *ServerTransport) dispatchBeginCreateOrUpdateByID(req *http.Request) (*h if s.srv.BeginCreateOrUpdateByID == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdateByID not implemented")} } - if s.beginCreateOrUpdateByID == nil { + beginCreateOrUpdateByID := s.beginCreateOrUpdateByID.get(req) + if beginCreateOrUpdateByID == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -330,19 +346,21 @@ func (s *ServerTransport) dispatchBeginCreateOrUpdateByID(req *http.Request) (*h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdateByID = &respr + beginCreateOrUpdateByID = &respr + s.beginCreateOrUpdateByID.add(req, beginCreateOrUpdateByID) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdateByID, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdateByID, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { + s.beginCreateOrUpdateByID.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdateByID) { - s.beginCreateOrUpdateByID = nil + if !server.PollerResponderMore(beginCreateOrUpdateByID) { + s.beginCreateOrUpdateByID.remove(req) } return resp, nil @@ -352,7 +370,8 @@ func (s *ServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -388,19 +407,21 @@ func (s *ServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -410,7 +431,8 @@ func (s *ServerTransport) dispatchBeginDeleteByID(req *http.Request) (*http.Resp if s.srv.BeginDeleteByID == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeleteByID not implemented")} } - if s.beginDeleteByID == nil { + beginDeleteByID := s.beginDeleteByID.get(req) + if beginDeleteByID == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -430,19 +452,21 @@ func (s *ServerTransport) dispatchBeginDeleteByID(req *http.Request) (*http.Resp if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDeleteByID = &respr + beginDeleteByID = &respr + s.beginDeleteByID.add(req, beginDeleteByID) } - resp, err := server.PollerResponderNext(s.beginDeleteByID, req) + resp, err := server.PollerResponderNext(beginDeleteByID, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDeleteByID.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDeleteByID) { - s.beginDeleteByID = nil + if !server.PollerResponderMore(beginDeleteByID) { + s.beginDeleteByID.remove(req) } return resp, nil @@ -536,7 +560,8 @@ func (s *ServerTransport) dispatchNewListPager(req *http.Request) (*http.Respons 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~%@]+)/resources` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -577,20 +602,22 @@ func (s *ServerTransport) dispatchNewListPager(req *http.Request) (*http.Respons } } resp := s.srv.NewListPager(options) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armresources.ClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.ClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - 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 } @@ -599,7 +626,8 @@ func (s *ServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) if s.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if s.newListByResourceGroupPager == nil { + newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resources` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -644,20 +672,22 @@ func (s *ServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) } } resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, options) - s.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(s.newListByResourceGroupPager, req, func(page *armresources.ClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armresources.ClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListByResourceGroupPager) { - s.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + s.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -666,7 +696,8 @@ func (s *ServerTransport) dispatchBeginMoveResources(req *http.Request) (*http.R if s.srv.BeginMoveResources == nil { return nil, &nonRetriableError{errors.New("fake for method BeginMoveResources not implemented")} } - if s.beginMoveResources == nil { + beginMoveResources := s.beginMoveResources.get(req) + if beginMoveResources == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/moveResources` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -685,19 +716,21 @@ func (s *ServerTransport) dispatchBeginMoveResources(req *http.Request) (*http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginMoveResources = &respr + beginMoveResources = &respr + s.beginMoveResources.add(req, beginMoveResources) } - resp, err := server.PollerResponderNext(s.beginMoveResources, req) + resp, err := server.PollerResponderNext(beginMoveResources, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginMoveResources.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginMoveResources) { - s.beginMoveResources = nil + if !server.PollerResponderMore(beginMoveResources) { + s.beginMoveResources.remove(req) } return resp, nil @@ -707,7 +740,8 @@ func (s *ServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response if s.srv.BeginUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} } - if s.beginUpdate == nil { + beginUpdate := s.beginUpdate.get(req) + if beginUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourcegroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -747,19 +781,21 @@ func (s *ServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginUpdate = &respr + beginUpdate = &respr + s.beginUpdate.add(req, beginUpdate) } - resp, err := server.PollerResponderNext(s.beginUpdate, req) + resp, err := server.PollerResponderNext(beginUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginUpdate) { - s.beginUpdate = nil + if !server.PollerResponderMore(beginUpdate) { + s.beginUpdate.remove(req) } return resp, nil @@ -769,7 +805,8 @@ func (s *ServerTransport) dispatchBeginUpdateByID(req *http.Request) (*http.Resp if s.srv.BeginUpdateByID == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateByID not implemented")} } - if s.beginUpdateByID == nil { + beginUpdateByID := s.beginUpdateByID.get(req) + if beginUpdateByID == nil { const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -793,19 +830,21 @@ func (s *ServerTransport) dispatchBeginUpdateByID(req *http.Request) (*http.Resp if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginUpdateByID = &respr + beginUpdateByID = &respr + s.beginUpdateByID.add(req, beginUpdateByID) } - resp, err := server.PollerResponderNext(s.beginUpdateByID, req) + resp, err := server.PollerResponderNext(beginUpdateByID, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginUpdateByID.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginUpdateByID) { - s.beginUpdateByID = nil + if !server.PollerResponderMore(beginUpdateByID) { + s.beginUpdateByID.remove(req) } return resp, nil @@ -815,7 +854,8 @@ func (s *ServerTransport) dispatchBeginValidateMoveResources(req *http.Request) if s.srv.BeginValidateMoveResources == nil { return nil, &nonRetriableError{errors.New("fake for method BeginValidateMoveResources not implemented")} } - if s.beginValidateMoveResources == nil { + beginValidateMoveResources := s.beginValidateMoveResources.get(req) + if beginValidateMoveResources == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/validateMoveResources` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -834,19 +874,21 @@ func (s *ServerTransport) dispatchBeginValidateMoveResources(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginValidateMoveResources = &respr + beginValidateMoveResources = &respr + s.beginValidateMoveResources.add(req, beginValidateMoveResources) } - resp, err := server.PollerResponderNext(s.beginValidateMoveResources, req) + resp, err := server.PollerResponderNext(beginValidateMoveResources, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginValidateMoveResources.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginValidateMoveResources) { - s.beginValidateMoveResources = nil + if !server.PollerResponderMore(beginValidateMoveResources) { + s.beginValidateMoveResources.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/resources/armresources/fake/tags_server.go b/sdk/resourcemanager/resources/armresources/fake/tags_server.go index e32765315f4b..94d66494208a 100644 --- a/sdk/resourcemanager/resources/armresources/fake/tags_server.go +++ b/sdk/resourcemanager/resources/armresources/fake/tags_server.go @@ -62,17 +62,20 @@ type TagsServer struct { } // NewTagsServerTransport creates a new instance of TagsServerTransport with the provided implementation. -// The returned TagsServerTransport instance is connected to an instance of armresources.TagsClient by way of the -// undefined.Transporter field. +// The returned TagsServerTransport instance is connected to an instance of armresources.TagsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewTagsServerTransport(srv *TagsServer) *TagsServerTransport { - return &TagsServerTransport{srv: srv} + return &TagsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armresources.TagsClientListResponse]](), + } } // TagsServerTransport connects instances of armresources.TagsClient to instances of TagsServer. // Don't use this type directly, use NewTagsServerTransport instead. type TagsServerTransport struct { srv *TagsServer - newListPager *azfake.PagerResponder[armresources.TagsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armresources.TagsClientListResponse]] } // Do implements the policy.Transporter interface for TagsServerTransport. @@ -335,7 +338,8 @@ func (t *TagsServerTransport) dispatchNewListPager(req *http.Request) (*http.Res 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~%@]+)/tagNames` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -343,20 +347,22 @@ func (t *TagsServerTransport) dispatchNewListPager(req *http.Request) (*http.Res return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := t.srv.NewListPager(nil) - t.newListPager = &resp - server.PagerResponderInjectNextLinks(t.newListPager, req, func(page *armresources.TagsClientListResponse, createLink func() string) { + newListPager = &resp + t.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armresources.TagsClientListResponse, 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/resources/armresources/go.mod b/sdk/resourcemanager/resources/armresources/go.mod index 11f2a0a0ac2a..75604d97fa90 100644 --- a/sdk/resourcemanager/resources/armresources/go.mod +++ b/sdk/resourcemanager/resources/armresources/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresour 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.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managementgroups/armmanagementgroups v1.0.0 diff --git a/sdk/resourcemanager/resources/armresources/go.sum b/sdk/resourcemanager/resources/armresources/go.sum index 1391105aef01..3425c132f530 100644 --- a/sdk/resourcemanager/resources/armresources/go.sum +++ b/sdk/resourcemanager/resources/armresources/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.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= diff --git a/sdk/resourcemanager/resources/armresources/models.go b/sdk/resourcemanager/resources/armresources/models.go index d841ed06037a..ce98f859a61d 100644 --- a/sdk/resourcemanager/resources/armresources/models.go +++ b/sdk/resourcemanager/resources/armresources/models.go @@ -86,128 +86,6 @@ type BasicDependency struct { ResourceType *string } -// ClientBeginCreateOrUpdateByIDOptions contains the optional parameters for the Client.BeginCreateOrUpdateByID method. -type ClientBeginCreateOrUpdateByIDOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. -type ClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginDeleteByIDOptions contains the optional parameters for the Client.BeginDeleteByID method. -type ClientBeginDeleteByIDOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. -type ClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginMoveResourcesOptions contains the optional parameters for the Client.BeginMoveResources method. -type ClientBeginMoveResourcesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginUpdateByIDOptions contains the optional parameters for the Client.BeginUpdateByID method. -type ClientBeginUpdateByIDOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. -type ClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientBeginValidateMoveResourcesOptions contains the optional parameters for the Client.BeginValidateMoveResources method. -type ClientBeginValidateMoveResourcesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ClientCheckExistenceByIDOptions contains the optional parameters for the Client.CheckExistenceByID method. -type ClientCheckExistenceByIDOptions struct { - // placeholder for future optional parameters -} - -// ClientCheckExistenceOptions contains the optional parameters for the Client.CheckExistence method. -type ClientCheckExistenceOptions struct { - // placeholder for future optional parameters -} - -// ClientGetByIDOptions contains the optional parameters for the Client.GetByID method. -type ClientGetByIDOptions struct { - // placeholder for future optional parameters -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. -type ClientListByResourceGroupOptions struct { - // Comma-separated list of additional properties to be included in the response. Valid values include createdTime, changedTime - // and provisioningState. For example, $expand=createdTime,changedTime. - Expand *string - // The filter to apply on the operation. - // The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, - // identity/principalId, plan, plan/publisher, plan/product, plan/name, - // plan/version, and plan/promotionCode. - // For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks' - // You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup. - // For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name) - // You can link more than one substringof together by adding and/or operators. - // You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' - // and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for - // each resource are not returned in the results. - // You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, - // plan and plan/publisher and plan/name, identity and identity/principalId. - Filter *string - // The number of results to return. If null is passed, returns all resources. - Top *int32 -} - -// ClientListOptions contains the optional parameters for the Client.NewListPager method. -type ClientListOptions struct { - // Comma-separated list of additional properties to be included in the response. Valid values include createdTime, changedTime - // and provisioningState. For example, $expand=createdTime,changedTime. - Expand *string - // The filter to apply on the operation. - // Filter comparison operators include eq (equals) and ne (not equals) and may be used with the following properties: location, - // resourceType, name, resourceGroup, identity, identity/principalId, plan, - // plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode. - // For example, to filter by a resource type, use $filter=resourceType eq 'Microsoft.Network/virtualNetworks' - // substringof(value, property) can be used to filter for substrings of the following currently-supported properties: name - // and resourceGroup - // For example, to get all resources with 'demo' anywhere in the resource name, use $filter=substringof('demo', name) - // Multiple substring operations can also be combined using and/or operators. - // Note that any truncated number of results queried via $top may also not be compatible when using a filter. - // Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use $filter=tagName - // eq 'tag1' and tagValue eq 'Value1'. Note that when resources are filtered by tag - // name and value, the original tags for each resource will not be returned in the results. Any list of additional properties - // queried via $expand may also not be compatible when filtering by tag - // names/values. - // For tag names only, resources can be filtered by prefix using the following syntax: $filter=startswith(tagName, 'depart'). - // This query will return all resources with a tag name prefixed by the phrase - // depart (i.e.department, departureDate, departureTime, etc.) - // Note that some properties can be combined when filtering resources, which include the following: substringof() and/or resourceType, - // plan and plan/publisher and plan/name, and identity and - // identity/principalId. - Filter *string - // The number of results to return. If null is passed, returns all resources. - Top *int32 -} - // DebugSetting - The debug setting. type DebugSetting struct { // Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, @@ -334,70 +212,6 @@ type DeploymentOperationProperties struct { Timestamp *time.Time } -// DeploymentOperationsClientGetAtManagementGroupScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtManagementGroupScope -// method. -type DeploymentOperationsClientGetAtManagementGroupScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentOperationsClientGetAtScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtScope -// method. -type DeploymentOperationsClientGetAtScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentOperationsClientGetAtSubscriptionScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtSubscriptionScope -// method. -type DeploymentOperationsClientGetAtSubscriptionScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentOperationsClientGetAtTenantScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtTenantScope -// method. -type DeploymentOperationsClientGetAtTenantScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentOperationsClientGetOptions contains the optional parameters for the DeploymentOperationsClient.Get method. -type DeploymentOperationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DeploymentOperationsClientListAtManagementGroupScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtManagementGroupScopePager -// method. -type DeploymentOperationsClientListAtManagementGroupScopeOptions struct { - // The number of results to return. - Top *int32 -} - -// DeploymentOperationsClientListAtScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtScopePager -// method. -type DeploymentOperationsClientListAtScopeOptions struct { - // The number of results to return. - Top *int32 -} - -// DeploymentOperationsClientListAtSubscriptionScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtSubscriptionScopePager -// method. -type DeploymentOperationsClientListAtSubscriptionScopeOptions struct { - // The number of results to return. - Top *int32 -} - -// DeploymentOperationsClientListAtTenantScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtTenantScopePager -// method. -type DeploymentOperationsClientListAtTenantScopeOptions struct { - // The number of results to return. - Top *int32 -} - -// DeploymentOperationsClientListOptions contains the optional parameters for the DeploymentOperationsClient.NewListPager -// method. -type DeploymentOperationsClientListOptions struct { - // The number of results to return. - Top *int32 -} - // DeploymentOperationsListResult - List of deployment operations. type DeploymentOperationsListResult struct { // An array of deployment operations. @@ -564,299 +378,6 @@ type DeploymentWhatIfSettings struct { ResultFormat *WhatIfResultFormat } -// DeploymentsClientBeginCreateOrUpdateAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtManagementGroupScope -// method. -type DeploymentsClientBeginCreateOrUpdateAtManagementGroupScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginCreateOrUpdateAtScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtScope -// method. -type DeploymentsClientBeginCreateOrUpdateAtScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginCreateOrUpdateAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtSubscriptionScope -// method. -type DeploymentsClientBeginCreateOrUpdateAtSubscriptionScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginCreateOrUpdateAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtTenantScope -// method. -type DeploymentsClientBeginCreateOrUpdateAtTenantScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate -// method. -type DeploymentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtManagementGroupScope -// method. -type DeploymentsClientBeginDeleteAtManagementGroupScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteAtScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtScope -// method. -type DeploymentsClientBeginDeleteAtScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtSubscriptionScope -// method. -type DeploymentsClientBeginDeleteAtSubscriptionScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtTenantScope -// method. -type DeploymentsClientBeginDeleteAtTenantScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. -type DeploymentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginValidateAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtManagementGroupScope -// method. -type DeploymentsClientBeginValidateAtManagementGroupScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginValidateAtScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtScope -// method. -type DeploymentsClientBeginValidateAtScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginValidateAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtSubscriptionScope -// method. -type DeploymentsClientBeginValidateAtSubscriptionScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginValidateAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtTenantScope -// method. -type DeploymentsClientBeginValidateAtTenantScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginValidateOptions contains the optional parameters for the DeploymentsClient.BeginValidate method. -type DeploymentsClientBeginValidateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginWhatIfAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginWhatIfAtManagementGroupScope -// method. -type DeploymentsClientBeginWhatIfAtManagementGroupScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginWhatIfAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginWhatIfAtSubscriptionScope -// method. -type DeploymentsClientBeginWhatIfAtSubscriptionScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginWhatIfAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginWhatIfAtTenantScope -// method. -type DeploymentsClientBeginWhatIfAtTenantScopeOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientBeginWhatIfOptions contains the optional parameters for the DeploymentsClient.BeginWhatIf method. -type DeploymentsClientBeginWhatIfOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DeploymentsClientCalculateTemplateHashOptions contains the optional parameters for the DeploymentsClient.CalculateTemplateHash -// method. -type DeploymentsClientCalculateTemplateHashOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCancelAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtManagementGroupScope -// method. -type DeploymentsClientCancelAtManagementGroupScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCancelAtScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtScope method. -type DeploymentsClientCancelAtScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCancelAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtSubscriptionScope -// method. -type DeploymentsClientCancelAtSubscriptionScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCancelAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtTenantScope -// method. -type DeploymentsClientCancelAtTenantScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCancelOptions contains the optional parameters for the DeploymentsClient.Cancel method. -type DeploymentsClientCancelOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCheckExistenceAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtManagementGroupScope -// method. -type DeploymentsClientCheckExistenceAtManagementGroupScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCheckExistenceAtScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtScope -// method. -type DeploymentsClientCheckExistenceAtScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCheckExistenceAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtSubscriptionScope -// method. -type DeploymentsClientCheckExistenceAtSubscriptionScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCheckExistenceAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtTenantScope -// method. -type DeploymentsClientCheckExistenceAtTenantScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientCheckExistenceOptions contains the optional parameters for the DeploymentsClient.CheckExistence method. -type DeploymentsClientCheckExistenceOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientExportTemplateAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtManagementGroupScope -// method. -type DeploymentsClientExportTemplateAtManagementGroupScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientExportTemplateAtScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtScope -// method. -type DeploymentsClientExportTemplateAtScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientExportTemplateAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtSubscriptionScope -// method. -type DeploymentsClientExportTemplateAtSubscriptionScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientExportTemplateAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtTenantScope -// method. -type DeploymentsClientExportTemplateAtTenantScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientExportTemplateOptions contains the optional parameters for the DeploymentsClient.ExportTemplate method. -type DeploymentsClientExportTemplateOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.GetAtManagementGroupScope -// method. -type DeploymentsClientGetAtManagementGroupScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetAtScopeOptions contains the optional parameters for the DeploymentsClient.GetAtScope method. -type DeploymentsClientGetAtScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.GetAtSubscriptionScope -// method. -type DeploymentsClientGetAtSubscriptionScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.GetAtTenantScope method. -type DeploymentsClientGetAtTenantScopeOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. -type DeploymentsClientGetOptions struct { - // placeholder for future optional parameters -} - -// DeploymentsClientListAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtManagementGroupScopePager -// method. -type DeploymentsClientListAtManagementGroupScopeOptions struct { - // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. - Filter *string - // The number of results to get. If null is passed, returns all deployments. - Top *int32 -} - -// DeploymentsClientListAtScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtScopePager method. -type DeploymentsClientListAtScopeOptions struct { - // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. - Filter *string - // The number of results to get. If null is passed, returns all deployments. - Top *int32 -} - -// DeploymentsClientListAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtSubscriptionScopePager -// method. -type DeploymentsClientListAtSubscriptionScopeOptions struct { - // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. - Filter *string - // The number of results to get. If null is passed, returns all deployments. - Top *int32 -} - -// DeploymentsClientListAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtTenantScopePager -// method. -type DeploymentsClientListAtTenantScopeOptions struct { - // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. - Filter *string - // The number of results to get. If null is passed, returns all deployments. - Top *int32 -} - -// DeploymentsClientListByResourceGroupOptions contains the optional parameters for the DeploymentsClient.NewListByResourceGroupPager -// method. -type DeploymentsClientListByResourceGroupOptions struct { - // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. - Filter *string - // The number of results to get. If null is passed, returns all deployments. - Top *int32 -} - // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. @@ -1106,11 +627,6 @@ type OperationListResult struct { Value []*Operation } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // ParametersLink - Entity representing the reference to the deployment parameters. type ParametersLink struct { // REQUIRED; The URI of the parameters file. @@ -1271,64 +787,6 @@ type ProviderResourceTypeListResult struct { NextLink *string } -// ProviderResourceTypesClientListOptions contains the optional parameters for the ProviderResourceTypesClient.List method. -type ProviderResourceTypesClientListOptions struct { - // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. - Expand *string -} - -// ProvidersClientGetAtTenantScopeOptions contains the optional parameters for the ProvidersClient.GetAtTenantScope method. -type ProvidersClientGetAtTenantScopeOptions struct { - // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. - Expand *string -} - -// ProvidersClientGetOptions contains the optional parameters for the ProvidersClient.Get method. -type ProvidersClientGetOptions struct { - // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. - Expand *string -} - -// ProvidersClientListAtTenantScopeOptions contains the optional parameters for the ProvidersClient.NewListAtTenantScopePager -// method. -type ProvidersClientListAtTenantScopeOptions struct { - // The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider - // metadata. To include property aliases in response, use - // $expand=resourceTypes/aliases. - Expand *string -} - -// ProvidersClientListOptions contains the optional parameters for the ProvidersClient.NewListPager method. -type ProvidersClientListOptions struct { - // The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider - // metadata. To include property aliases in response, use - // $expand=resourceTypes/aliases. - Expand *string -} - -// ProvidersClientProviderPermissionsOptions contains the optional parameters for the ProvidersClient.ProviderPermissions -// method. -type ProvidersClientProviderPermissionsOptions struct { - // placeholder for future optional parameters -} - -// ProvidersClientRegisterAtManagementGroupScopeOptions contains the optional parameters for the ProvidersClient.RegisterAtManagementGroupScope -// method. -type ProvidersClientRegisterAtManagementGroupScopeOptions struct { - // placeholder for future optional parameters -} - -// ProvidersClientRegisterOptions contains the optional parameters for the ProvidersClient.Register method. -type ProvidersClientRegisterOptions struct { - // The third party consent for S2S. - Properties *ProviderRegistrationRequest -} - -// ProvidersClientUnregisterOptions contains the optional parameters for the ProvidersClient.Unregister method. -type ProvidersClientUnregisterOptions struct { - // placeholder for future optional parameters -} - // Resource - Specified resource. type Resource struct { // Resource extended location. @@ -1423,53 +881,6 @@ type ResourceGroupProperties struct { ProvisioningState *string } -// ResourceGroupsClientBeginDeleteOptions contains the optional parameters for the ResourceGroupsClient.BeginDelete method. -type ResourceGroupsClientBeginDeleteOptions struct { - // The resource types you want to force delete. Currently, only the following is supported: forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets - ForceDeletionTypes *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceGroupsClientBeginExportTemplateOptions contains the optional parameters for the ResourceGroupsClient.BeginExportTemplate -// method. -type ResourceGroupsClientBeginExportTemplateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ResourceGroupsClientCheckExistenceOptions contains the optional parameters for the ResourceGroupsClient.CheckExistence -// method. -type ResourceGroupsClientCheckExistenceOptions struct { - // placeholder for future optional parameters -} - -// ResourceGroupsClientCreateOrUpdateOptions contains the optional parameters for the ResourceGroupsClient.CreateOrUpdate -// method. -type ResourceGroupsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ResourceGroupsClientGetOptions contains the optional parameters for the ResourceGroupsClient.Get method. -type ResourceGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ResourceGroupsClientListOptions contains the optional parameters for the ResourceGroupsClient.NewListPager method. -type ResourceGroupsClientListOptions struct { - // The filter to apply on the operation. - // You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' - // and tagValue eq 'Value1' - Filter *string - // The number of results to return. If null is passed, returns all resource groups. - Top *int32 -} - -// ResourceGroupsClientUpdateOptions contains the optional parameters for the ResourceGroupsClient.Update method. -type ResourceGroupsClientUpdateOptions struct { - // placeholder for future optional parameters -} - // ResourceListResult - List of resource groups. type ResourceListResult struct { // An array of resources. @@ -1621,51 +1032,6 @@ type Tags struct { Tags map[string]*string } -// TagsClientCreateOrUpdateAtScopeOptions contains the optional parameters for the TagsClient.CreateOrUpdateAtScope method. -type TagsClientCreateOrUpdateAtScopeOptions struct { - // placeholder for future optional parameters -} - -// TagsClientCreateOrUpdateOptions contains the optional parameters for the TagsClient.CreateOrUpdate method. -type TagsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// TagsClientCreateOrUpdateValueOptions contains the optional parameters for the TagsClient.CreateOrUpdateValue method. -type TagsClientCreateOrUpdateValueOptions struct { - // placeholder for future optional parameters -} - -// TagsClientDeleteAtScopeOptions contains the optional parameters for the TagsClient.DeleteAtScope method. -type TagsClientDeleteAtScopeOptions struct { - // placeholder for future optional parameters -} - -// TagsClientDeleteOptions contains the optional parameters for the TagsClient.Delete method. -type TagsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// TagsClientDeleteValueOptions contains the optional parameters for the TagsClient.DeleteValue method. -type TagsClientDeleteValueOptions struct { - // placeholder for future optional parameters -} - -// TagsClientGetAtScopeOptions contains the optional parameters for the TagsClient.GetAtScope method. -type TagsClientGetAtScopeOptions struct { - // placeholder for future optional parameters -} - -// TagsClientListOptions contains the optional parameters for the TagsClient.NewListPager method. -type TagsClientListOptions struct { - // placeholder for future optional parameters -} - -// TagsClientUpdateAtScopeOptions contains the optional parameters for the TagsClient.UpdateAtScope method. -type TagsClientUpdateAtScopeOptions struct { - // placeholder for future optional parameters -} - // TagsListResult - List of subscription tags. type TagsListResult struct { // An array of tags. diff --git a/sdk/resourcemanager/resources/armresources/options.go b/sdk/resourcemanager/resources/armresources/options.go new file mode 100644 index 000000000000..dfdb23b0cc8f --- /dev/null +++ b/sdk/resourcemanager/resources/armresources/options.go @@ -0,0 +1,654 @@ +//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 armresources + +// ClientBeginCreateOrUpdateByIDOptions contains the optional parameters for the Client.BeginCreateOrUpdateByID method. +type ClientBeginCreateOrUpdateByIDOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method. +type ClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteByIDOptions contains the optional parameters for the Client.BeginDeleteByID method. +type ClientBeginDeleteByIDOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginDeleteOptions contains the optional parameters for the Client.BeginDelete method. +type ClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginMoveResourcesOptions contains the optional parameters for the Client.BeginMoveResources method. +type ClientBeginMoveResourcesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateByIDOptions contains the optional parameters for the Client.BeginUpdateByID method. +type ClientBeginUpdateByIDOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method. +type ClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientBeginValidateMoveResourcesOptions contains the optional parameters for the Client.BeginValidateMoveResources method. +type ClientBeginValidateMoveResourcesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ClientCheckExistenceByIDOptions contains the optional parameters for the Client.CheckExistenceByID method. +type ClientCheckExistenceByIDOptions struct { + // placeholder for future optional parameters +} + +// ClientCheckExistenceOptions contains the optional parameters for the Client.CheckExistence method. +type ClientCheckExistenceOptions struct { + // placeholder for future optional parameters +} + +// ClientGetByIDOptions contains the optional parameters for the Client.GetByID method. +type ClientGetByIDOptions struct { + // placeholder for future optional parameters +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListByResourceGroupOptions contains the optional parameters for the Client.NewListByResourceGroupPager method. +type ClientListByResourceGroupOptions struct { + // Comma-separated list of additional properties to be included in the response. Valid values include createdTime, changedTime + // and provisioningState. For example, $expand=createdTime,changedTime. + Expand *string + + // The filter to apply on the operation. + // The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, + // identity/principalId, plan, plan/publisher, plan/product, plan/name, + // plan/version, and plan/promotionCode. + // For example, to filter by a resource type, use: $filter=resourceType eq 'Microsoft.Network/virtualNetworks' + // You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup. + // For example, to get all resources with 'demo' anywhere in the name, use: $filter=substringof('demo', name) + // You can link more than one substringof together by adding and/or operators. + // You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' + // and tagValue eq 'Value1'. When you filter by a tag name and value, the tags for + // each resource are not returned in the results. + // You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, + // plan and plan/publisher and plan/name, identity and identity/principalId. + Filter *string + + // The number of results to return. If null is passed, returns all resources. + Top *int32 +} + +// ClientListOptions contains the optional parameters for the Client.NewListPager method. +type ClientListOptions struct { + // Comma-separated list of additional properties to be included in the response. Valid values include createdTime, changedTime + // and provisioningState. For example, $expand=createdTime,changedTime. + Expand *string + + // The filter to apply on the operation. + // Filter comparison operators include eq (equals) and ne (not equals) and may be used with the following properties: location, + // resourceType, name, resourceGroup, identity, identity/principalId, plan, + // plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode. + // For example, to filter by a resource type, use $filter=resourceType eq 'Microsoft.Network/virtualNetworks' + // substringof(value, property) can be used to filter for substrings of the following currently-supported properties: name + // and resourceGroup + // For example, to get all resources with 'demo' anywhere in the resource name, use $filter=substringof('demo', name) + // Multiple substring operations can also be combined using and/or operators. + // Note that any truncated number of results queried via $top may also not be compatible when using a filter. + // Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use $filter=tagName + // eq 'tag1' and tagValue eq 'Value1'. Note that when resources are filtered by tag + // name and value, the original tags for each resource will not be returned in the results. Any list of additional properties + // queried via $expand may also not be compatible when filtering by tag + // names/values. + // For tag names only, resources can be filtered by prefix using the following syntax: $filter=startswith(tagName, 'depart'). + // This query will return all resources with a tag name prefixed by the phrase + // depart (i.e.department, departureDate, departureTime, etc.) + // Note that some properties can be combined when filtering resources, which include the following: substringof() and/or resourceType, + // plan and plan/publisher and plan/name, and identity and + // identity/principalId. + Filter *string + + // The number of results to return. If null is passed, returns all resources. + Top *int32 +} + +// DeploymentOperationsClientGetAtManagementGroupScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtManagementGroupScope +// method. +type DeploymentOperationsClientGetAtManagementGroupScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentOperationsClientGetAtScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtScope +// method. +type DeploymentOperationsClientGetAtScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentOperationsClientGetAtSubscriptionScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtSubscriptionScope +// method. +type DeploymentOperationsClientGetAtSubscriptionScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentOperationsClientGetAtTenantScopeOptions contains the optional parameters for the DeploymentOperationsClient.GetAtTenantScope +// method. +type DeploymentOperationsClientGetAtTenantScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentOperationsClientGetOptions contains the optional parameters for the DeploymentOperationsClient.Get method. +type DeploymentOperationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeploymentOperationsClientListAtManagementGroupScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtManagementGroupScopePager +// method. +type DeploymentOperationsClientListAtManagementGroupScopeOptions struct { + // The number of results to return. + Top *int32 +} + +// DeploymentOperationsClientListAtScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtScopePager +// method. +type DeploymentOperationsClientListAtScopeOptions struct { + // The number of results to return. + Top *int32 +} + +// DeploymentOperationsClientListAtSubscriptionScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtSubscriptionScopePager +// method. +type DeploymentOperationsClientListAtSubscriptionScopeOptions struct { + // The number of results to return. + Top *int32 +} + +// DeploymentOperationsClientListAtTenantScopeOptions contains the optional parameters for the DeploymentOperationsClient.NewListAtTenantScopePager +// method. +type DeploymentOperationsClientListAtTenantScopeOptions struct { + // The number of results to return. + Top *int32 +} + +// DeploymentOperationsClientListOptions contains the optional parameters for the DeploymentOperationsClient.NewListPager +// method. +type DeploymentOperationsClientListOptions struct { + // The number of results to return. + Top *int32 +} + +// DeploymentsClientBeginCreateOrUpdateAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtManagementGroupScope +// method. +type DeploymentsClientBeginCreateOrUpdateAtManagementGroupScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginCreateOrUpdateAtScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtScope +// method. +type DeploymentsClientBeginCreateOrUpdateAtScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginCreateOrUpdateAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtSubscriptionScope +// method. +type DeploymentsClientBeginCreateOrUpdateAtSubscriptionScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginCreateOrUpdateAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdateAtTenantScope +// method. +type DeploymentsClientBeginCreateOrUpdateAtTenantScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the DeploymentsClient.BeginCreateOrUpdate +// method. +type DeploymentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDeleteAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtManagementGroupScope +// method. +type DeploymentsClientBeginDeleteAtManagementGroupScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDeleteAtScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtScope +// method. +type DeploymentsClientBeginDeleteAtScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDeleteAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtSubscriptionScope +// method. +type DeploymentsClientBeginDeleteAtSubscriptionScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDeleteAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginDeleteAtTenantScope +// method. +type DeploymentsClientBeginDeleteAtTenantScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginDeleteOptions contains the optional parameters for the DeploymentsClient.BeginDelete method. +type DeploymentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginValidateAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtManagementGroupScope +// method. +type DeploymentsClientBeginValidateAtManagementGroupScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginValidateAtScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtScope +// method. +type DeploymentsClientBeginValidateAtScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginValidateAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtSubscriptionScope +// method. +type DeploymentsClientBeginValidateAtSubscriptionScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginValidateAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginValidateAtTenantScope +// method. +type DeploymentsClientBeginValidateAtTenantScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginValidateOptions contains the optional parameters for the DeploymentsClient.BeginValidate method. +type DeploymentsClientBeginValidateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginWhatIfAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.BeginWhatIfAtManagementGroupScope +// method. +type DeploymentsClientBeginWhatIfAtManagementGroupScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginWhatIfAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.BeginWhatIfAtSubscriptionScope +// method. +type DeploymentsClientBeginWhatIfAtSubscriptionScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginWhatIfAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.BeginWhatIfAtTenantScope +// method. +type DeploymentsClientBeginWhatIfAtTenantScopeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientBeginWhatIfOptions contains the optional parameters for the DeploymentsClient.BeginWhatIf method. +type DeploymentsClientBeginWhatIfOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DeploymentsClientCalculateTemplateHashOptions contains the optional parameters for the DeploymentsClient.CalculateTemplateHash +// method. +type DeploymentsClientCalculateTemplateHashOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCancelAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtManagementGroupScope +// method. +type DeploymentsClientCancelAtManagementGroupScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCancelAtScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtScope method. +type DeploymentsClientCancelAtScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCancelAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtSubscriptionScope +// method. +type DeploymentsClientCancelAtSubscriptionScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCancelAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.CancelAtTenantScope +// method. +type DeploymentsClientCancelAtTenantScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCancelOptions contains the optional parameters for the DeploymentsClient.Cancel method. +type DeploymentsClientCancelOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCheckExistenceAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtManagementGroupScope +// method. +type DeploymentsClientCheckExistenceAtManagementGroupScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCheckExistenceAtScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtScope +// method. +type DeploymentsClientCheckExistenceAtScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCheckExistenceAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtSubscriptionScope +// method. +type DeploymentsClientCheckExistenceAtSubscriptionScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCheckExistenceAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.CheckExistenceAtTenantScope +// method. +type DeploymentsClientCheckExistenceAtTenantScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientCheckExistenceOptions contains the optional parameters for the DeploymentsClient.CheckExistence method. +type DeploymentsClientCheckExistenceOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientExportTemplateAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtManagementGroupScope +// method. +type DeploymentsClientExportTemplateAtManagementGroupScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientExportTemplateAtScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtScope +// method. +type DeploymentsClientExportTemplateAtScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientExportTemplateAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtSubscriptionScope +// method. +type DeploymentsClientExportTemplateAtSubscriptionScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientExportTemplateAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.ExportTemplateAtTenantScope +// method. +type DeploymentsClientExportTemplateAtTenantScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientExportTemplateOptions contains the optional parameters for the DeploymentsClient.ExportTemplate method. +type DeploymentsClientExportTemplateOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.GetAtManagementGroupScope +// method. +type DeploymentsClientGetAtManagementGroupScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetAtScopeOptions contains the optional parameters for the DeploymentsClient.GetAtScope method. +type DeploymentsClientGetAtScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.GetAtSubscriptionScope +// method. +type DeploymentsClientGetAtSubscriptionScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.GetAtTenantScope method. +type DeploymentsClientGetAtTenantScopeOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientGetOptions contains the optional parameters for the DeploymentsClient.Get method. +type DeploymentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// DeploymentsClientListAtManagementGroupScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtManagementGroupScopePager +// method. +type DeploymentsClientListAtManagementGroupScopeOptions struct { + // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. + Filter *string + + // The number of results to get. If null is passed, returns all deployments. + Top *int32 +} + +// DeploymentsClientListAtScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtScopePager method. +type DeploymentsClientListAtScopeOptions struct { + // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. + Filter *string + + // The number of results to get. If null is passed, returns all deployments. + Top *int32 +} + +// DeploymentsClientListAtSubscriptionScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtSubscriptionScopePager +// method. +type DeploymentsClientListAtSubscriptionScopeOptions struct { + // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. + Filter *string + + // The number of results to get. If null is passed, returns all deployments. + Top *int32 +} + +// DeploymentsClientListAtTenantScopeOptions contains the optional parameters for the DeploymentsClient.NewListAtTenantScopePager +// method. +type DeploymentsClientListAtTenantScopeOptions struct { + // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. + Filter *string + + // The number of results to get. If null is passed, returns all deployments. + Top *int32 +} + +// DeploymentsClientListByResourceGroupOptions contains the optional parameters for the DeploymentsClient.NewListByResourceGroupPager +// method. +type DeploymentsClientListByResourceGroupOptions struct { + // The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. + Filter *string + + // The number of results to get. If null is passed, returns all deployments. + Top *int32 +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ProviderResourceTypesClientListOptions contains the optional parameters for the ProviderResourceTypesClient.List method. +type ProviderResourceTypesClientListOptions struct { + // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. + Expand *string +} + +// ProvidersClientGetAtTenantScopeOptions contains the optional parameters for the ProvidersClient.GetAtTenantScope method. +type ProvidersClientGetAtTenantScopeOptions struct { + // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. + Expand *string +} + +// ProvidersClientGetOptions contains the optional parameters for the ProvidersClient.Get method. +type ProvidersClientGetOptions struct { + // The $expand query parameter. For example, to include property aliases in response, use $expand=resourceTypes/aliases. + Expand *string +} + +// ProvidersClientListAtTenantScopeOptions contains the optional parameters for the ProvidersClient.NewListAtTenantScopePager +// method. +type ProvidersClientListAtTenantScopeOptions struct { + // The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider + // metadata. To include property aliases in response, use + // $expand=resourceTypes/aliases. + Expand *string +} + +// ProvidersClientListOptions contains the optional parameters for the ProvidersClient.NewListPager method. +type ProvidersClientListOptions struct { + // The properties to include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider + // metadata. To include property aliases in response, use + // $expand=resourceTypes/aliases. + Expand *string +} + +// ProvidersClientProviderPermissionsOptions contains the optional parameters for the ProvidersClient.ProviderPermissions +// method. +type ProvidersClientProviderPermissionsOptions struct { + // placeholder for future optional parameters +} + +// ProvidersClientRegisterAtManagementGroupScopeOptions contains the optional parameters for the ProvidersClient.RegisterAtManagementGroupScope +// method. +type ProvidersClientRegisterAtManagementGroupScopeOptions struct { + // placeholder for future optional parameters +} + +// ProvidersClientRegisterOptions contains the optional parameters for the ProvidersClient.Register method. +type ProvidersClientRegisterOptions struct { + // The third party consent for S2S. + Properties *ProviderRegistrationRequest +} + +// ProvidersClientUnregisterOptions contains the optional parameters for the ProvidersClient.Unregister method. +type ProvidersClientUnregisterOptions struct { + // placeholder for future optional parameters +} + +// ResourceGroupsClientBeginDeleteOptions contains the optional parameters for the ResourceGroupsClient.BeginDelete method. +type ResourceGroupsClientBeginDeleteOptions struct { + // The resource types you want to force delete. Currently, only the following is supported: forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets + ForceDeletionTypes *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceGroupsClientBeginExportTemplateOptions contains the optional parameters for the ResourceGroupsClient.BeginExportTemplate +// method. +type ResourceGroupsClientBeginExportTemplateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ResourceGroupsClientCheckExistenceOptions contains the optional parameters for the ResourceGroupsClient.CheckExistence +// method. +type ResourceGroupsClientCheckExistenceOptions struct { + // placeholder for future optional parameters +} + +// ResourceGroupsClientCreateOrUpdateOptions contains the optional parameters for the ResourceGroupsClient.CreateOrUpdate +// method. +type ResourceGroupsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ResourceGroupsClientGetOptions contains the optional parameters for the ResourceGroupsClient.Get method. +type ResourceGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ResourceGroupsClientListOptions contains the optional parameters for the ResourceGroupsClient.NewListPager method. +type ResourceGroupsClientListOptions struct { + // The filter to apply on the operation. + // You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' + // and tagValue eq 'Value1' + Filter *string + + // The number of results to return. If null is passed, returns all resource groups. + Top *int32 +} + +// ResourceGroupsClientUpdateOptions contains the optional parameters for the ResourceGroupsClient.Update method. +type ResourceGroupsClientUpdateOptions struct { + // placeholder for future optional parameters +} + +// TagsClientCreateOrUpdateAtScopeOptions contains the optional parameters for the TagsClient.CreateOrUpdateAtScope method. +type TagsClientCreateOrUpdateAtScopeOptions struct { + // placeholder for future optional parameters +} + +// TagsClientCreateOrUpdateOptions contains the optional parameters for the TagsClient.CreateOrUpdate method. +type TagsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TagsClientCreateOrUpdateValueOptions contains the optional parameters for the TagsClient.CreateOrUpdateValue method. +type TagsClientCreateOrUpdateValueOptions struct { + // placeholder for future optional parameters +} + +// TagsClientDeleteAtScopeOptions contains the optional parameters for the TagsClient.DeleteAtScope method. +type TagsClientDeleteAtScopeOptions struct { + // placeholder for future optional parameters +} + +// TagsClientDeleteOptions contains the optional parameters for the TagsClient.Delete method. +type TagsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TagsClientDeleteValueOptions contains the optional parameters for the TagsClient.DeleteValue method. +type TagsClientDeleteValueOptions struct { + // placeholder for future optional parameters +} + +// TagsClientGetAtScopeOptions contains the optional parameters for the TagsClient.GetAtScope method. +type TagsClientGetAtScopeOptions struct { + // placeholder for future optional parameters +} + +// TagsClientListOptions contains the optional parameters for the TagsClient.NewListPager method. +type TagsClientListOptions struct { + // placeholder for future optional parameters +} + +// TagsClientUpdateAtScopeOptions contains the optional parameters for the TagsClient.UpdateAtScope method. +type TagsClientUpdateAtScopeOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/resources/armresources/response_types.go b/sdk/resourcemanager/resources/armresources/response_types.go index 01f1cfb79649..fb04138cd76c 100644 --- a/sdk/resourcemanager/resources/armresources/response_types.go +++ b/sdk/resourcemanager/resources/armresources/response_types.go @@ -22,11 +22,13 @@ type ClientCheckExistenceResponse struct { // ClientCreateOrUpdateByIDResponse contains the response from method Client.BeginCreateOrUpdateByID. type ClientCreateOrUpdateByIDResponse struct { + // Resource information. GenericResource } // ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate. type ClientCreateOrUpdateResponse struct { + // Resource information. GenericResource } @@ -42,21 +44,25 @@ type ClientDeleteResponse struct { // ClientGetByIDResponse contains the response from method Client.GetByID. type ClientGetByIDResponse struct { + // Resource information. GenericResource } // ClientGetResponse contains the response from method Client.Get. type ClientGetResponse struct { + // Resource information. GenericResource } // ClientListByResourceGroupResponse contains the response from method Client.NewListByResourceGroupPager. type ClientListByResourceGroupResponse struct { + // List of resource groups. ResourceListResult } // ClientListResponse contains the response from method Client.NewListPager. type ClientListResponse struct { + // List of resource groups. ResourceListResult } @@ -67,11 +73,13 @@ type ClientMoveResourcesResponse struct { // ClientUpdateByIDResponse contains the response from method Client.BeginUpdateByID. type ClientUpdateByIDResponse struct { + // Resource information. GenericResource } // ClientUpdateResponse contains the response from method Client.BeginUpdate. type ClientUpdateResponse struct { + // Resource information. GenericResource } @@ -82,56 +90,67 @@ type ClientValidateMoveResourcesResponse struct { // DeploymentOperationsClientGetAtManagementGroupScopeResponse contains the response from method DeploymentOperationsClient.GetAtManagementGroupScope. type DeploymentOperationsClientGetAtManagementGroupScopeResponse struct { + // Deployment operation information. DeploymentOperation } // DeploymentOperationsClientGetAtScopeResponse contains the response from method DeploymentOperationsClient.GetAtScope. type DeploymentOperationsClientGetAtScopeResponse struct { + // Deployment operation information. DeploymentOperation } // DeploymentOperationsClientGetAtSubscriptionScopeResponse contains the response from method DeploymentOperationsClient.GetAtSubscriptionScope. type DeploymentOperationsClientGetAtSubscriptionScopeResponse struct { + // Deployment operation information. DeploymentOperation } // DeploymentOperationsClientGetAtTenantScopeResponse contains the response from method DeploymentOperationsClient.GetAtTenantScope. type DeploymentOperationsClientGetAtTenantScopeResponse struct { + // Deployment operation information. DeploymentOperation } // DeploymentOperationsClientGetResponse contains the response from method DeploymentOperationsClient.Get. type DeploymentOperationsClientGetResponse struct { + // Deployment operation information. DeploymentOperation } // DeploymentOperationsClientListAtManagementGroupScopeResponse contains the response from method DeploymentOperationsClient.NewListAtManagementGroupScopePager. type DeploymentOperationsClientListAtManagementGroupScopeResponse struct { + // List of deployment operations. DeploymentOperationsListResult } // DeploymentOperationsClientListAtScopeResponse contains the response from method DeploymentOperationsClient.NewListAtScopePager. type DeploymentOperationsClientListAtScopeResponse struct { + // List of deployment operations. DeploymentOperationsListResult } // DeploymentOperationsClientListAtSubscriptionScopeResponse contains the response from method DeploymentOperationsClient.NewListAtSubscriptionScopePager. type DeploymentOperationsClientListAtSubscriptionScopeResponse struct { + // List of deployment operations. DeploymentOperationsListResult } // DeploymentOperationsClientListAtTenantScopeResponse contains the response from method DeploymentOperationsClient.NewListAtTenantScopePager. type DeploymentOperationsClientListAtTenantScopeResponse struct { + // List of deployment operations. DeploymentOperationsListResult } // DeploymentOperationsClientListResponse contains the response from method DeploymentOperationsClient.NewListPager. type DeploymentOperationsClientListResponse struct { + // List of deployment operations. DeploymentOperationsListResult } // DeploymentsClientCalculateTemplateHashResponse contains the response from method DeploymentsClient.CalculateTemplateHash. type DeploymentsClientCalculateTemplateHashResponse struct { + // Result of the request to calculate template hash. It contains a string of minified template and its hash. TemplateHashResult } @@ -192,26 +211,31 @@ type DeploymentsClientCheckExistenceResponse struct { // DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse contains the response from method DeploymentsClient.BeginCreateOrUpdateAtManagementGroupScope. type DeploymentsClientCreateOrUpdateAtManagementGroupScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientCreateOrUpdateAtScopeResponse contains the response from method DeploymentsClient.BeginCreateOrUpdateAtScope. type DeploymentsClientCreateOrUpdateAtScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse contains the response from method DeploymentsClient.BeginCreateOrUpdateAtSubscriptionScope. type DeploymentsClientCreateOrUpdateAtSubscriptionScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientCreateOrUpdateAtTenantScopeResponse contains the response from method DeploymentsClient.BeginCreateOrUpdateAtTenantScope. type DeploymentsClientCreateOrUpdateAtTenantScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientCreateOrUpdateResponse contains the response from method DeploymentsClient.BeginCreateOrUpdate. type DeploymentsClientCreateOrUpdateResponse struct { + // Deployment information. DeploymentExtended } @@ -242,156 +266,188 @@ type DeploymentsClientDeleteResponse struct { // DeploymentsClientExportTemplateAtManagementGroupScopeResponse contains the response from method DeploymentsClient.ExportTemplateAtManagementGroupScope. type DeploymentsClientExportTemplateAtManagementGroupScopeResponse struct { + // The deployment export result. DeploymentExportResult } // DeploymentsClientExportTemplateAtScopeResponse contains the response from method DeploymentsClient.ExportTemplateAtScope. type DeploymentsClientExportTemplateAtScopeResponse struct { + // The deployment export result. DeploymentExportResult } // DeploymentsClientExportTemplateAtSubscriptionScopeResponse contains the response from method DeploymentsClient.ExportTemplateAtSubscriptionScope. type DeploymentsClientExportTemplateAtSubscriptionScopeResponse struct { + // The deployment export result. DeploymentExportResult } // DeploymentsClientExportTemplateAtTenantScopeResponse contains the response from method DeploymentsClient.ExportTemplateAtTenantScope. type DeploymentsClientExportTemplateAtTenantScopeResponse struct { + // The deployment export result. DeploymentExportResult } // DeploymentsClientExportTemplateResponse contains the response from method DeploymentsClient.ExportTemplate. type DeploymentsClientExportTemplateResponse struct { + // The deployment export result. DeploymentExportResult } // DeploymentsClientGetAtManagementGroupScopeResponse contains the response from method DeploymentsClient.GetAtManagementGroupScope. type DeploymentsClientGetAtManagementGroupScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientGetAtScopeResponse contains the response from method DeploymentsClient.GetAtScope. type DeploymentsClientGetAtScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientGetAtSubscriptionScopeResponse contains the response from method DeploymentsClient.GetAtSubscriptionScope. type DeploymentsClientGetAtSubscriptionScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientGetAtTenantScopeResponse contains the response from method DeploymentsClient.GetAtTenantScope. type DeploymentsClientGetAtTenantScopeResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientGetResponse contains the response from method DeploymentsClient.Get. type DeploymentsClientGetResponse struct { + // Deployment information. DeploymentExtended } // DeploymentsClientListAtManagementGroupScopeResponse contains the response from method DeploymentsClient.NewListAtManagementGroupScopePager. type DeploymentsClientListAtManagementGroupScopeResponse struct { + // List of deployments. DeploymentListResult } // DeploymentsClientListAtScopeResponse contains the response from method DeploymentsClient.NewListAtScopePager. type DeploymentsClientListAtScopeResponse struct { + // List of deployments. DeploymentListResult } // DeploymentsClientListAtSubscriptionScopeResponse contains the response from method DeploymentsClient.NewListAtSubscriptionScopePager. type DeploymentsClientListAtSubscriptionScopeResponse struct { + // List of deployments. DeploymentListResult } // DeploymentsClientListAtTenantScopeResponse contains the response from method DeploymentsClient.NewListAtTenantScopePager. type DeploymentsClientListAtTenantScopeResponse struct { + // List of deployments. DeploymentListResult } // DeploymentsClientListByResourceGroupResponse contains the response from method DeploymentsClient.NewListByResourceGroupPager. type DeploymentsClientListByResourceGroupResponse struct { + // List of deployments. DeploymentListResult } // DeploymentsClientValidateAtManagementGroupScopeResponse contains the response from method DeploymentsClient.BeginValidateAtManagementGroupScope. type DeploymentsClientValidateAtManagementGroupScopeResponse struct { + // Information from validate template deployment response. DeploymentValidateResult } // DeploymentsClientValidateAtScopeResponse contains the response from method DeploymentsClient.BeginValidateAtScope. type DeploymentsClientValidateAtScopeResponse struct { + // Information from validate template deployment response. DeploymentValidateResult } // DeploymentsClientValidateAtSubscriptionScopeResponse contains the response from method DeploymentsClient.BeginValidateAtSubscriptionScope. type DeploymentsClientValidateAtSubscriptionScopeResponse struct { + // Information from validate template deployment response. DeploymentValidateResult } // DeploymentsClientValidateAtTenantScopeResponse contains the response from method DeploymentsClient.BeginValidateAtTenantScope. type DeploymentsClientValidateAtTenantScopeResponse struct { + // Information from validate template deployment response. DeploymentValidateResult } // DeploymentsClientValidateResponse contains the response from method DeploymentsClient.BeginValidate. type DeploymentsClientValidateResponse struct { + // Information from validate template deployment response. DeploymentValidateResult } // DeploymentsClientWhatIfAtManagementGroupScopeResponse contains the response from method DeploymentsClient.BeginWhatIfAtManagementGroupScope. type DeploymentsClientWhatIfAtManagementGroupScopeResponse struct { + // Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of results. WhatIfOperationResult } // DeploymentsClientWhatIfAtSubscriptionScopeResponse contains the response from method DeploymentsClient.BeginWhatIfAtSubscriptionScope. type DeploymentsClientWhatIfAtSubscriptionScopeResponse struct { + // Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of results. WhatIfOperationResult } // DeploymentsClientWhatIfAtTenantScopeResponse contains the response from method DeploymentsClient.BeginWhatIfAtTenantScope. type DeploymentsClientWhatIfAtTenantScopeResponse struct { + // Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of results. WhatIfOperationResult } // DeploymentsClientWhatIfResponse contains the response from method DeploymentsClient.BeginWhatIf. type DeploymentsClientWhatIfResponse struct { + // Result of the What-If operation. Contains a list of predicted changes and a URL link to get to the next set of results. WhatIfOperationResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Microsoft.Resources operations. It contains a list of operations and a URL link to get the + // next set of results. OperationListResult } // ProviderResourceTypesClientListResponse contains the response from method ProviderResourceTypesClient.List. type ProviderResourceTypesClientListResponse struct { + // List of resource types of a resource provider. ProviderResourceTypeListResult } // ProvidersClientGetAtTenantScopeResponse contains the response from method ProvidersClient.GetAtTenantScope. type ProvidersClientGetAtTenantScopeResponse struct { + // Resource provider information. Provider } // ProvidersClientGetResponse contains the response from method ProvidersClient.Get. type ProvidersClientGetResponse struct { + // Resource provider information. Provider } // ProvidersClientListAtTenantScopeResponse contains the response from method ProvidersClient.NewListAtTenantScopePager. type ProvidersClientListAtTenantScopeResponse struct { + // List of resource providers. ProviderListResult } // ProvidersClientListResponse contains the response from method ProvidersClient.NewListPager. type ProvidersClientListResponse struct { + // List of resource providers. ProviderListResult } // ProvidersClientProviderPermissionsResponse contains the response from method ProvidersClient.ProviderPermissions. type ProvidersClientProviderPermissionsResponse struct { + // List of provider permissions. ProviderPermissionListResult } @@ -402,11 +458,13 @@ type ProvidersClientRegisterAtManagementGroupScopeResponse struct { // ProvidersClientRegisterResponse contains the response from method ProvidersClient.Register. type ProvidersClientRegisterResponse struct { + // Resource provider information. Provider } // ProvidersClientUnregisterResponse contains the response from method ProvidersClient.Unregister. type ProvidersClientUnregisterResponse struct { + // Resource provider information. Provider } @@ -418,6 +476,7 @@ type ResourceGroupsClientCheckExistenceResponse struct { // ResourceGroupsClientCreateOrUpdateResponse contains the response from method ResourceGroupsClient.CreateOrUpdate. type ResourceGroupsClientCreateOrUpdateResponse struct { + // Resource group information. ResourceGroup } @@ -428,36 +487,43 @@ type ResourceGroupsClientDeleteResponse struct { // ResourceGroupsClientExportTemplateResponse contains the response from method ResourceGroupsClient.BeginExportTemplate. type ResourceGroupsClientExportTemplateResponse struct { + // Resource group export result. ResourceGroupExportResult } // ResourceGroupsClientGetResponse contains the response from method ResourceGroupsClient.Get. type ResourceGroupsClientGetResponse struct { + // Resource group information. ResourceGroup } // ResourceGroupsClientListResponse contains the response from method ResourceGroupsClient.NewListPager. type ResourceGroupsClientListResponse struct { + // List of resource groups. ResourceGroupListResult } // ResourceGroupsClientUpdateResponse contains the response from method ResourceGroupsClient.Update. type ResourceGroupsClientUpdateResponse struct { + // Resource group information. ResourceGroup } // TagsClientCreateOrUpdateAtScopeResponse contains the response from method TagsClient.CreateOrUpdateAtScope. type TagsClientCreateOrUpdateAtScopeResponse struct { + // Wrapper resource for tags API requests and responses. TagsResource } // TagsClientCreateOrUpdateResponse contains the response from method TagsClient.CreateOrUpdate. type TagsClientCreateOrUpdateResponse struct { + // Tag details. TagDetails } // TagsClientCreateOrUpdateValueResponse contains the response from method TagsClient.CreateOrUpdateValue. type TagsClientCreateOrUpdateValueResponse struct { + // Tag information. TagValue } @@ -478,15 +544,18 @@ type TagsClientDeleteValueResponse struct { // TagsClientGetAtScopeResponse contains the response from method TagsClient.GetAtScope. type TagsClientGetAtScopeResponse struct { + // Wrapper resource for tags API requests and responses. TagsResource } // TagsClientListResponse contains the response from method TagsClient.NewListPager. type TagsClientListResponse struct { + // List of subscription tags. TagsListResult } // TagsClientUpdateAtScopeResponse contains the response from method TagsClient.UpdateAtScope. type TagsClientUpdateAtScopeResponse struct { + // Wrapper resource for tags API requests and responses. TagsResource }