From 37bec1d18d036c1450f2bbec647b19bbf7789a42 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 30 Jul 2020 02:45:45 +0000 Subject: [PATCH] Generated from 222c6820550f2d760710701b21c2ac8dc9f30e73 Address PR comments --- .../features/deploymentoperations.go | 25 +- .../mgmt/2019-07-01/features/deployments.go | 58 +-- .../mgmt/2019-07-01/features/enums.go | 133 +++++ .../mgmt/2019-07-01/features/models.go | 481 +++++++++++------- .../mgmt/2019-07-01/features/operations.go | 4 +- .../mgmt/2019-07-01/features/providers.go | 12 +- .../2019-07-01/features/resourcegroups.go | 10 +- .../mgmt/2019-07-01/features/resources.go | 20 +- .../mgmt/2019-07-01/features/tags.go | 8 +- .../mgmt/2019-07-01/features/version.go | 2 +- 10 files changed, 496 insertions(+), 257 deletions(-) create mode 100644 services/resources/mgmt/2019-07-01/features/enums.go diff --git a/services/resources/mgmt/2019-07-01/features/deploymentoperations.go b/services/resources/mgmt/2019-07-01/features/deploymentoperations.go index e32daa1a7a31..43a9591a80ad 100644 --- a/services/resources/mgmt/2019-07-01/features/deploymentoperations.go +++ b/services/resources/mgmt/2019-07-01/features/deploymentoperations.go @@ -125,7 +125,6 @@ func (client DeploymentOperationsClient) GetSender(req *http.Request) (*http.Res func (client DeploymentOperationsClient) GetResponder(resp *http.Response) (result DeploymentOperation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -213,7 +212,6 @@ func (client DeploymentOperationsClient) GetAtManagementGroupScopeSender(req *ht func (client DeploymentOperationsClient) GetAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentOperation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -298,7 +296,6 @@ func (client DeploymentOperationsClient) GetAtScopeSender(req *http.Request) (*h func (client DeploymentOperationsClient) GetAtScopeResponder(resp *http.Response) (result DeploymentOperation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -382,7 +379,6 @@ func (client DeploymentOperationsClient) GetAtSubscriptionScopeSender(req *http. func (client DeploymentOperationsClient) GetAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentOperation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -465,7 +461,6 @@ func (client DeploymentOperationsClient) GetAtTenantScopeSender(req *http.Reques func (client DeploymentOperationsClient) GetAtTenantScopeResponder(resp *http.Response) (result DeploymentOperation, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -519,6 +514,9 @@ func (client DeploymentOperationsClient) List(ctx context.Context, resourceGroup if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentOperationsClient", "List", resp, "Failure responding to request") } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -558,7 +556,6 @@ func (client DeploymentOperationsClient) ListSender(req *http.Request) (*http.Re func (client DeploymentOperationsClient) ListResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -648,6 +645,9 @@ func (client DeploymentOperationsClient) ListAtManagementGroupScope(ctx context. if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentOperationsClient", "ListAtManagementGroupScope", resp, "Failure responding to request") } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -686,7 +686,6 @@ func (client DeploymentOperationsClient) ListAtManagementGroupScopeSender(req *h func (client DeploymentOperationsClient) ListAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -773,6 +772,9 @@ func (client DeploymentOperationsClient) ListAtScope(ctx context.Context, scope if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentOperationsClient", "ListAtScope", resp, "Failure responding to request") } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -811,7 +813,6 @@ func (client DeploymentOperationsClient) ListAtScopeSender(req *http.Request) (* func (client DeploymentOperationsClient) ListAtScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -897,6 +898,9 @@ func (client DeploymentOperationsClient) ListAtSubscriptionScope(ctx context.Con if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentOperationsClient", "ListAtSubscriptionScope", resp, "Failure responding to request") } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -935,7 +939,6 @@ func (client DeploymentOperationsClient) ListAtSubscriptionScopeSender(req *http func (client DeploymentOperationsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1021,6 +1024,9 @@ func (client DeploymentOperationsClient) ListAtTenantScope(ctx context.Context, if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentOperationsClient", "ListAtTenantScope", resp, "Failure responding to request") } + if result.dolr.hasNextLink() && result.dolr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -1058,7 +1064,6 @@ func (client DeploymentOperationsClient) ListAtTenantScopeSender(req *http.Reque func (client DeploymentOperationsClient) ListAtTenantScopeResponder(resp *http.Response) (result DeploymentOperationsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/resources/mgmt/2019-07-01/features/deployments.go b/services/resources/mgmt/2019-07-01/features/deployments.go index 42efb78dad0f..0358d3de7fdc 100644 --- a/services/resources/mgmt/2019-07-01/features/deployments.go +++ b/services/resources/mgmt/2019-07-01/features/deployments.go @@ -105,7 +105,6 @@ func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) ( func (client DeploymentsClient) CalculateTemplateHashResponder(resp *http.Response) (result TemplateHashResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -195,7 +194,6 @@ func (client DeploymentsClient) CancelSender(req *http.Request) (*http.Response, func (client DeploymentsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -282,7 +280,6 @@ func (client DeploymentsClient) CancelAtManagementGroupScopeSender(req *http.Req func (client DeploymentsClient) CancelAtManagementGroupScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -366,7 +363,6 @@ func (client DeploymentsClient) CancelAtScopeSender(req *http.Request) (*http.Re func (client DeploymentsClient) CancelAtScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -449,7 +445,6 @@ func (client DeploymentsClient) CancelAtSubscriptionScopeSender(req *http.Reques func (client DeploymentsClient) CancelAtSubscriptionScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -531,7 +526,6 @@ func (client DeploymentsClient) CancelAtTenantScopeSender(req *http.Request) (*h func (client DeploymentsClient) CancelAtTenantScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -619,7 +613,6 @@ func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.R func (client DeploymentsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -704,7 +697,6 @@ func (client DeploymentsClient) CheckExistenceAtManagementGroupScopeSender(req * func (client DeploymentsClient) CheckExistenceAtManagementGroupScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -786,7 +778,6 @@ func (client DeploymentsClient) CheckExistenceAtScopeSender(req *http.Request) ( func (client DeploymentsClient) CheckExistenceAtScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -867,7 +858,6 @@ func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeSender(req *htt func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -947,7 +937,6 @@ func (client DeploymentsClient) CheckExistenceAtTenantScopeSender(req *http.Requ func (client DeploymentsClient) CheckExistenceAtTenantScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -1045,7 +1034,6 @@ func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1142,7 +1130,6 @@ func (client DeploymentsClient) CreateOrUpdateAtManagementGroupScopeSender(req * func (client DeploymentsClient) CreateOrUpdateAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1235,7 +1222,6 @@ func (client DeploymentsClient) CreateOrUpdateAtScopeSender(req *http.Request) ( func (client DeploymentsClient) CreateOrUpdateAtScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1328,7 +1314,6 @@ func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeSender(req *htt func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1420,7 +1405,6 @@ func (client DeploymentsClient) CreateOrUpdateAtTenantScopeSender(req *http.Requ func (client DeploymentsClient) CreateOrUpdateAtTenantScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1515,7 +1499,6 @@ func (client DeploymentsClient) DeleteSender(req *http.Request) (future Deployme func (client DeploymentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1605,7 +1588,6 @@ func (client DeploymentsClient) DeleteAtManagementGroupScopeSender(req *http.Req func (client DeploymentsClient) DeleteAtManagementGroupScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1692,7 +1674,6 @@ func (client DeploymentsClient) DeleteAtScopeSender(req *http.Request) (future D func (client DeploymentsClient) DeleteAtScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1778,7 +1759,6 @@ func (client DeploymentsClient) DeleteAtSubscriptionScopeSender(req *http.Reques func (client DeploymentsClient) DeleteAtSubscriptionScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1863,7 +1843,6 @@ func (client DeploymentsClient) DeleteAtTenantScopeSender(req *http.Request) (fu func (client DeploymentsClient) DeleteAtTenantScopeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1950,7 +1929,6 @@ func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.R func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (result DeploymentExportResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2036,7 +2014,6 @@ func (client DeploymentsClient) ExportTemplateAtManagementGroupScopeSender(req * func (client DeploymentsClient) ExportTemplateAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentExportResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2119,7 +2096,6 @@ func (client DeploymentsClient) ExportTemplateAtScopeSender(req *http.Request) ( func (client DeploymentsClient) ExportTemplateAtScopeResponder(resp *http.Response) (result DeploymentExportResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2201,7 +2177,6 @@ func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeSender(req *htt func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExportResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2282,7 +2257,6 @@ func (client DeploymentsClient) ExportTemplateAtTenantScopeSender(req *http.Requ func (client DeploymentsClient) ExportTemplateAtTenantScopeResponder(resp *http.Response) (result DeploymentExportResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2370,7 +2344,6 @@ func (client DeploymentsClient) GetSender(req *http.Request) (*http.Response, er func (client DeploymentsClient) GetResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2456,7 +2429,6 @@ func (client DeploymentsClient) GetAtManagementGroupScopeSender(req *http.Reques func (client DeploymentsClient) GetAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2539,7 +2511,6 @@ func (client DeploymentsClient) GetAtScopeSender(req *http.Request) (*http.Respo func (client DeploymentsClient) GetAtScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2621,7 +2592,6 @@ func (client DeploymentsClient) GetAtSubscriptionScopeSender(req *http.Request) func (client DeploymentsClient) GetAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2702,7 +2672,6 @@ func (client DeploymentsClient) GetAtTenantScopeSender(req *http.Request) (*http func (client DeploymentsClient) GetAtTenantScopeResponder(resp *http.Response) (result DeploymentExtended, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2752,6 +2721,9 @@ func (client DeploymentsClient) ListAtManagementGroupScope(ctx context.Context, if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentsClient", "ListAtManagementGroupScope", resp, "Failure responding to request") } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -2792,7 +2764,6 @@ func (client DeploymentsClient) ListAtManagementGroupScopeSender(req *http.Reque func (client DeploymentsClient) ListAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2872,6 +2843,9 @@ func (client DeploymentsClient) ListAtScope(ctx context.Context, scope string, f if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentsClient", "ListAtScope", resp, "Failure responding to request") } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -2912,7 +2886,6 @@ func (client DeploymentsClient) ListAtScopeSender(req *http.Request) (*http.Resp func (client DeploymentsClient) ListAtScopeResponder(resp *http.Response) (result DeploymentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2991,6 +2964,9 @@ func (client DeploymentsClient) ListAtSubscriptionScope(ctx context.Context, fil if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentsClient", "ListAtSubscriptionScope", resp, "Failure responding to request") } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -3031,7 +3007,6 @@ func (client DeploymentsClient) ListAtSubscriptionScopeSender(req *http.Request) func (client DeploymentsClient) ListAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3110,6 +3085,9 @@ func (client DeploymentsClient) ListAtTenantScope(ctx context.Context, filter st if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentsClient", "ListAtTenantScope", resp, "Failure responding to request") } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -3146,7 +3124,6 @@ func (client DeploymentsClient) ListAtTenantScopeSender(req *http.Request) (*htt func (client DeploymentsClient) ListAtTenantScopeResponder(resp *http.Response) (result DeploymentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3235,6 +3212,9 @@ func (client DeploymentsClient) ListByResourceGroup(ctx context.Context, resourc if err != nil { err = autorest.NewErrorWithError(err, "features.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request") } + if result.dlr.hasNextLink() && result.dlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -3276,7 +3256,6 @@ func (client DeploymentsClient) ListByResourceGroupSender(req *http.Request) (*h func (client DeploymentsClient) ListByResourceGroupResponder(resp *http.Response) (result DeploymentListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3413,7 +3392,6 @@ func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Respons func (client DeploymentsClient) ValidateResponder(resp *http.Response) (result DeploymentValidateResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3510,7 +3488,6 @@ func (client DeploymentsClient) ValidateAtManagementGroupScopeSender(req *http.R func (client DeploymentsClient) ValidateAtManagementGroupScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3604,7 +3581,6 @@ func (client DeploymentsClient) ValidateAtScopeSender(req *http.Request) (*http. func (client DeploymentsClient) ValidateAtScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3697,7 +3673,6 @@ func (client DeploymentsClient) ValidateAtSubscriptionScopeSender(req *http.Requ func (client DeploymentsClient) ValidateAtSubscriptionScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3789,7 +3764,6 @@ func (client DeploymentsClient) ValidateAtTenantScopeSender(req *http.Request) ( func (client DeploymentsClient) ValidateAtTenantScopeResponder(resp *http.Response) (result DeploymentValidateResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusBadRequest), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3883,7 +3857,6 @@ func (client DeploymentsClient) WhatIfSender(req *http.Request) (future Deployme func (client DeploymentsClient) WhatIfResponder(resp *http.Response) (result WhatIfOperationResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3971,7 +3944,6 @@ func (client DeploymentsClient) WhatIfAtSubscriptionScopeSender(req *http.Reques func (client DeploymentsClient) WhatIfAtSubscriptionScopeResponder(resp *http.Response) (result WhatIfOperationResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/resources/mgmt/2019-07-01/features/enums.go b/services/resources/mgmt/2019-07-01/features/enums.go new file mode 100644 index 000000000000..c78f755f02eb --- /dev/null +++ b/services/resources/mgmt/2019-07-01/features/enums.go @@ -0,0 +1,133 @@ +package features + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ChangeType enumerates the values for change type. +type ChangeType string + +const ( + // Create The resource does not exist in the current state but is present in the desired state. The + // resource will be created when the deployment is executed. + Create ChangeType = "Create" + // Delete The resource exists in the current state and is missing from the desired state. The resource will + // be deleted when the deployment is executed. + Delete ChangeType = "Delete" + // Deploy The resource exists in the current state and the desired state and will be redeployed when the + // deployment is executed. The properties of the resource may or may not change. + Deploy ChangeType = "Deploy" + // Ignore The resource exists in the current state and is missing from the desired state. The resource will + // not be deployed or modified when the deployment is executed. + Ignore ChangeType = "Ignore" + // Modify The resource exists in the current state and the desired state and will be redeployed when the + // deployment is executed. The properties of the resource will change. + Modify ChangeType = "Modify" + // NoChange The resource exists in the current state and the desired state and will be redeployed when the + // deployment is executed. The properties of the resource will not change. + NoChange ChangeType = "NoChange" +) + +// PossibleChangeTypeValues returns an array of possible values for the ChangeType const type. +func PossibleChangeTypeValues() []ChangeType { + return []ChangeType{Create, Delete, Deploy, Ignore, Modify, NoChange} +} + +// DeploymentMode enumerates the values for deployment mode. +type DeploymentMode string + +const ( + // Complete ... + Complete DeploymentMode = "Complete" + // Incremental ... + Incremental DeploymentMode = "Incremental" +) + +// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type. +func PossibleDeploymentModeValues() []DeploymentMode { + return []DeploymentMode{Complete, Incremental} +} + +// OnErrorDeploymentType enumerates the values for on error deployment type. +type OnErrorDeploymentType string + +const ( + // LastSuccessful ... + LastSuccessful OnErrorDeploymentType = "LastSuccessful" + // SpecificDeployment ... + SpecificDeployment OnErrorDeploymentType = "SpecificDeployment" +) + +// PossibleOnErrorDeploymentTypeValues returns an array of possible values for the OnErrorDeploymentType const type. +func PossibleOnErrorDeploymentTypeValues() []OnErrorDeploymentType { + return []OnErrorDeploymentType{LastSuccessful, SpecificDeployment} +} + +// PropertyChangeType enumerates the values for property change type. +type PropertyChangeType string + +const ( + // PropertyChangeTypeArray The property is an array and contains nested changes. + PropertyChangeTypeArray PropertyChangeType = "Array" + // PropertyChangeTypeCreate The property does not exist in the current state but is present in the desired + // state. The property will be created when the deployment is executed. + PropertyChangeTypeCreate PropertyChangeType = "Create" + // PropertyChangeTypeDelete The property exists in the current state and is missing from the desired state. + // It will be deleted when the deployment is executed. + PropertyChangeTypeDelete PropertyChangeType = "Delete" + // PropertyChangeTypeModify The property exists in both current and desired state and is different. The + // value of the property will change when the deployment is executed. + PropertyChangeTypeModify PropertyChangeType = "Modify" +) + +// PossiblePropertyChangeTypeValues returns an array of possible values for the PropertyChangeType const type. +func PossiblePropertyChangeTypeValues() []PropertyChangeType { + return []PropertyChangeType{PropertyChangeTypeArray, PropertyChangeTypeCreate, PropertyChangeTypeDelete, PropertyChangeTypeModify} +} + +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // None ... + None ResourceIdentityType = "None" + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" + // SystemAssignedUserAssigned ... + SystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" + // UserAssigned ... + UserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned} +} + +// WhatIfResultFormat enumerates the values for what if result format. +type WhatIfResultFormat string + +const ( + // FullResourcePayloads ... + FullResourcePayloads WhatIfResultFormat = "FullResourcePayloads" + // ResourceIDOnly ... + ResourceIDOnly WhatIfResultFormat = "ResourceIdOnly" +) + +// PossibleWhatIfResultFormatValues returns an array of possible values for the WhatIfResultFormat const type. +func PossibleWhatIfResultFormatValues() []WhatIfResultFormat { + return []WhatIfResultFormat{FullResourcePayloads, ResourceIDOnly} +} diff --git a/services/resources/mgmt/2019-07-01/features/models.go b/services/resources/mgmt/2019-07-01/features/models.go index d52a3442dc14..b01606e30494 100644 --- a/services/resources/mgmt/2019-07-01/features/models.go +++ b/services/resources/mgmt/2019-07-01/features/models.go @@ -31,121 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/features" -// ChangeType enumerates the values for change type. -type ChangeType string - -const ( - // Create The resource does not exist in the current state but is present in the desired state. The - // resource will be created when the deployment is executed. - Create ChangeType = "Create" - // Delete The resource exists in the current state and is missing from the desired state. The resource will - // be deleted when the deployment is executed. - Delete ChangeType = "Delete" - // Deploy The resource exists in the current state and the desired state and will be redeployed when the - // deployment is executed. The properties of the resource may or may not change. - Deploy ChangeType = "Deploy" - // Ignore The resource exists in the current state and is missing from the desired state. The resource will - // not be deployed or modified when the deployment is executed. - Ignore ChangeType = "Ignore" - // Modify The resource exists in the current state and the desired state and will be redeployed when the - // deployment is executed. The properties of the resource will change. - Modify ChangeType = "Modify" - // NoChange The resource exists in the current state and the desired state and will be redeployed when the - // deployment is executed. The properties of the resource will not change. - NoChange ChangeType = "NoChange" -) - -// PossibleChangeTypeValues returns an array of possible values for the ChangeType const type. -func PossibleChangeTypeValues() []ChangeType { - return []ChangeType{Create, Delete, Deploy, Ignore, Modify, NoChange} -} - -// DeploymentMode enumerates the values for deployment mode. -type DeploymentMode string - -const ( - // Complete ... - Complete DeploymentMode = "Complete" - // Incremental ... - Incremental DeploymentMode = "Incremental" -) - -// PossibleDeploymentModeValues returns an array of possible values for the DeploymentMode const type. -func PossibleDeploymentModeValues() []DeploymentMode { - return []DeploymentMode{Complete, Incremental} -} - -// OnErrorDeploymentType enumerates the values for on error deployment type. -type OnErrorDeploymentType string - -const ( - // LastSuccessful ... - LastSuccessful OnErrorDeploymentType = "LastSuccessful" - // SpecificDeployment ... - SpecificDeployment OnErrorDeploymentType = "SpecificDeployment" -) - -// PossibleOnErrorDeploymentTypeValues returns an array of possible values for the OnErrorDeploymentType const type. -func PossibleOnErrorDeploymentTypeValues() []OnErrorDeploymentType { - return []OnErrorDeploymentType{LastSuccessful, SpecificDeployment} -} - -// PropertyChangeType enumerates the values for property change type. -type PropertyChangeType string - -const ( - // PropertyChangeTypeArray The property is an array and contains nested changes. - PropertyChangeTypeArray PropertyChangeType = "Array" - // PropertyChangeTypeCreate The property does not exist in the current state but is present in the desired - // state. The property will be created when the deployment is executed. - PropertyChangeTypeCreate PropertyChangeType = "Create" - // PropertyChangeTypeDelete The property exists in the current state and is missing from the desired state. - // It will be deleted when the deployment is executed. - PropertyChangeTypeDelete PropertyChangeType = "Delete" - // PropertyChangeTypeModify The property exists in both current and desired state and is different. The - // value of the property will change when the deployment is executed. - PropertyChangeTypeModify PropertyChangeType = "Modify" -) - -// PossiblePropertyChangeTypeValues returns an array of possible values for the PropertyChangeType const type. -func PossiblePropertyChangeTypeValues() []PropertyChangeType { - return []PropertyChangeType{PropertyChangeTypeArray, PropertyChangeTypeCreate, PropertyChangeTypeDelete, PropertyChangeTypeModify} -} - -// ResourceIdentityType enumerates the values for resource identity type. -type ResourceIdentityType string - -const ( - // None ... - None ResourceIdentityType = "None" - // SystemAssigned ... - SystemAssigned ResourceIdentityType = "SystemAssigned" - // SystemAssignedUserAssigned ... - SystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned" - // UserAssigned ... - UserAssigned ResourceIdentityType = "UserAssigned" -) - -// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. -func PossibleResourceIdentityTypeValues() []ResourceIdentityType { - return []ResourceIdentityType{None, SystemAssigned, SystemAssignedUserAssigned, UserAssigned} -} - -// WhatIfResultFormat enumerates the values for what if result format. -type WhatIfResultFormat string - -const ( - // FullResourcePayloads ... - FullResourcePayloads WhatIfResultFormat = "FullResourcePayloads" - // ResourceIDOnly ... - ResourceIDOnly WhatIfResultFormat = "ResourceIdOnly" -) - -// PossibleWhatIfResultFormatValues returns an array of possible values for the WhatIfResultFormat const type. -func PossibleWhatIfResultFormatValues() []WhatIfResultFormat { - return []WhatIfResultFormat{FullResourcePayloads, ResourceIDOnly} -} - // AliasPathType the type of the paths for alias. type AliasPathType struct { // Path - The path of an alias. @@ -225,6 +110,18 @@ type DeploymentExtended struct { Properties *DeploymentPropertiesExtended `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentExtended. +func (de DeploymentExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if de.Location != nil { + objectMap["location"] = de.Location + } + if de.Properties != nil { + objectMap["properties"] = de.Properties + } + return json.Marshal(objectMap) +} + // DeploymentExtendedFilter deployment filter. type DeploymentExtendedFilter struct { // ProvisioningState - The provisioning state. @@ -240,6 +137,15 @@ type DeploymentListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentListResult. +func (dlr DeploymentListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dlr.Value != nil { + objectMap["value"] = dlr.Value + } + return json.Marshal(objectMap) +} + // DeploymentListResultIterator provides access to a complete listing of DeploymentExtended values. type DeploymentListResultIterator struct { i int @@ -308,10 +214,15 @@ func (dlr DeploymentListResult) IsEmpty() bool { return dlr.Value == nil || len(*dlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dlr DeploymentListResult) hasNextLink() bool { + return dlr.NextLink != nil && len(*dlr.NextLink) != 0 +} + // deploymentListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dlr DeploymentListResult) deploymentListResultPreparer(ctx context.Context) (*http.Request, error) { - if dlr.NextLink == nil || len(to.String(dlr.NextLink)) < 1 { + if !dlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -339,11 +250,16 @@ func (page *DeploymentListResultPage) NextWithContext(ctx context.Context) (err tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dlr) + if err != nil { + return err + } + page.dlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dlr = next return nil } @@ -388,6 +304,15 @@ type DeploymentOperation struct { Properties *DeploymentOperationProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentOperation. +func (do DeploymentOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if do.Properties != nil { + objectMap["properties"] = do.Properties + } + return json.Marshal(objectMap) +} + // DeploymentOperationProperties deployment operation properties. type DeploymentOperationProperties struct { // ProvisioningState - READ-ONLY; The state of the provisioning. @@ -410,6 +335,12 @@ type DeploymentOperationProperties struct { Response *HTTPMessage `json:"response,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentOperationProperties. +func (dop DeploymentOperationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // DeploymentOperationsListResult list of deployment operations. type DeploymentOperationsListResult struct { autorest.Response `json:"-"` @@ -419,8 +350,16 @@ type DeploymentOperationsListResult struct { NextLink *string `json:"nextLink,omitempty"` } -// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation -// values. +// MarshalJSON is the custom marshaler for DeploymentOperationsListResult. +func (dolr DeploymentOperationsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dolr.Value != nil { + objectMap["value"] = dolr.Value + } + return json.Marshal(objectMap) +} + +// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation values. type DeploymentOperationsListResultIterator struct { i int page DeploymentOperationsListResultPage @@ -488,10 +427,15 @@ func (dolr DeploymentOperationsListResult) IsEmpty() bool { return dolr.Value == nil || len(*dolr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (dolr DeploymentOperationsListResult) hasNextLink() bool { + return dolr.NextLink != nil && len(*dolr.NextLink) != 0 +} + // deploymentOperationsListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (dolr DeploymentOperationsListResult) deploymentOperationsListResultPreparer(ctx context.Context) (*http.Request, error) { - if dolr.NextLink == nil || len(to.String(dolr.NextLink)) < 1 { + if !dolr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -519,11 +463,16 @@ func (page *DeploymentOperationsListResultPage) NextWithContext(ctx context.Cont tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.dolr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.dolr) + if err != nil { + return err + } + page.dolr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.dolr = next return nil } @@ -607,6 +556,42 @@ type DeploymentPropertiesExtended struct { OnErrorDeployment *OnErrorDeploymentExtended `json:"onErrorDeployment,omitempty"` } +// MarshalJSON is the custom marshaler for DeploymentPropertiesExtended. +func (dpe DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dpe.Outputs != nil { + objectMap["outputs"] = dpe.Outputs + } + if dpe.Providers != nil { + objectMap["providers"] = dpe.Providers + } + if dpe.Dependencies != nil { + objectMap["dependencies"] = dpe.Dependencies + } + if dpe.Template != nil { + objectMap["template"] = dpe.Template + } + if dpe.TemplateLink != nil { + objectMap["templateLink"] = dpe.TemplateLink + } + if dpe.Parameters != nil { + objectMap["parameters"] = dpe.Parameters + } + if dpe.ParametersLink != nil { + objectMap["parametersLink"] = dpe.ParametersLink + } + if dpe.Mode != "" { + objectMap["mode"] = dpe.Mode + } + if dpe.DebugSetting != nil { + objectMap["debugSetting"] = dpe.DebugSetting + } + if dpe.OnErrorDeployment != nil { + objectMap["onErrorDeployment"] = dpe.OnErrorDeployment + } + return json.Marshal(objectMap) +} + // DeploymentsCreateOrUpdateAtManagementGroupScopeFuture an abstraction for monitoring and retrieving the // results of a long-running operation. type DeploymentsCreateOrUpdateAtManagementGroupScopeFuture struct { @@ -665,8 +650,8 @@ func (future *DeploymentsCreateOrUpdateAtScopeFuture) Result(client DeploymentsC return } -// DeploymentsCreateOrUpdateAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DeploymentsCreateOrUpdateAtSubscriptionScopeFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DeploymentsCreateOrUpdateAtSubscriptionScopeFuture struct { azure.Future } @@ -694,8 +679,8 @@ func (future *DeploymentsCreateOrUpdateAtSubscriptionScopeFuture) Result(client return } -// DeploymentsCreateOrUpdateAtTenantScopeFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DeploymentsCreateOrUpdateAtTenantScopeFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DeploymentsCreateOrUpdateAtTenantScopeFuture struct { azure.Future } @@ -723,8 +708,8 @@ func (future *DeploymentsCreateOrUpdateAtTenantScopeFuture) Result(client Deploy return } -// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// DeploymentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type DeploymentsCreateOrUpdateFuture struct { azure.Future } @@ -752,8 +737,8 @@ func (future *DeploymentsCreateOrUpdateFuture) Result(client DeploymentsClient) return } -// DeploymentsDeleteAtManagementGroupScopeFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DeploymentsDeleteAtManagementGroupScopeFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DeploymentsDeleteAtManagementGroupScopeFuture struct { azure.Future } @@ -775,8 +760,8 @@ func (future *DeploymentsDeleteAtManagementGroupScopeFuture) Result(client Deplo return } -// DeploymentsDeleteAtScopeFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// DeploymentsDeleteAtScopeFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type DeploymentsDeleteAtScopeFuture struct { azure.Future } @@ -976,6 +961,12 @@ type ErrorAdditionalInfo struct { Info interface{} `json:"info,omitempty"` } +// MarshalJSON is the custom marshaler for ErrorAdditionalInfo. +func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ErrorResponse the resource management error response. type ErrorResponse struct { // Code - READ-ONLY; The error code. @@ -990,6 +981,12 @@ type ErrorResponse struct { AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"` } +// MarshalJSON is the custom marshaler for ErrorResponse. +func (er ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ExportTemplateRequest export resource group template request parameters. type ExportTemplateRequest struct { // Resources - The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'. @@ -1165,6 +1162,12 @@ type IdentityUserAssignedIdentitiesValue struct { ClientID *string `json:"clientId,omitempty"` } +// MarshalJSON is the custom marshaler for IdentityUserAssignedIdentitiesValue. +func (iAiv IdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // OnErrorDeployment deployment on error behavior. type OnErrorDeployment struct { // Type - The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment. Possible values include: 'LastSuccessful', 'SpecificDeployment' @@ -1183,6 +1186,18 @@ type OnErrorDeploymentExtended struct { DeploymentName *string `json:"deploymentName,omitempty"` } +// MarshalJSON is the custom marshaler for OnErrorDeploymentExtended. +func (oede OnErrorDeploymentExtended) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if oede.Type != "" { + objectMap["type"] = oede.Type + } + if oede.DeploymentName != nil { + objectMap["deploymentName"] = oede.DeploymentName + } + return json.Marshal(objectMap) +} + // Operation microsoft.Resources operation type Operation struct { // Name - Operation name: {provider}/{resource}/{operation} @@ -1281,10 +1296,15 @@ func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 0 +} + // operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + if !olr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1312,11 +1332,16 @@ func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.olr = next return nil } @@ -1387,6 +1412,15 @@ type Provider struct { ResourceTypes *[]ProviderResourceType `json:"resourceTypes,omitempty"` } +// MarshalJSON is the custom marshaler for Provider. +func (p Provider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if p.Namespace != nil { + objectMap["namespace"] = p.Namespace + } + return json.Marshal(objectMap) +} + // ProviderListResult list of resource providers. type ProviderListResult struct { autorest.Response `json:"-"` @@ -1396,6 +1430,15 @@ type ProviderListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ProviderListResult. +func (plr ProviderListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if plr.Value != nil { + objectMap["value"] = plr.Value + } + return json.Marshal(objectMap) +} + // ProviderListResultIterator provides access to a complete listing of Provider values. type ProviderListResultIterator struct { i int @@ -1464,10 +1507,15 @@ func (plr ProviderListResult) IsEmpty() bool { return plr.Value == nil || len(*plr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (plr ProviderListResult) hasNextLink() bool { + return plr.NextLink != nil && len(*plr.NextLink) != 0 +} + // providerListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (plr ProviderListResult) providerListResultPreparer(ctx context.Context) (*http.Request, error) { - if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 { + if !plr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1495,11 +1543,16 @@ func (page *ProviderListResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.plr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.plr) + if err != nil { + return err + } + page.plr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.plr = next return nil } @@ -1662,6 +1715,15 @@ type ResourceGroupListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ResourceGroupListResult. +func (rglr ResourceGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rglr.Value != nil { + objectMap["value"] = rglr.Value + } + return json.Marshal(objectMap) +} + // ResourceGroupListResultIterator provides access to a complete listing of ResourceGroup values. type ResourceGroupListResultIterator struct { i int @@ -1730,10 +1792,15 @@ func (rglr ResourceGroupListResult) IsEmpty() bool { return rglr.Value == nil || len(*rglr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rglr ResourceGroupListResult) hasNextLink() bool { + return rglr.NextLink != nil && len(*rglr.NextLink) != 0 +} + // resourceGroupListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rglr ResourceGroupListResult) resourceGroupListResultPreparer(ctx context.Context) (*http.Request, error) { - if rglr.NextLink == nil || len(to.String(rglr.NextLink)) < 1 { + if !rglr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1761,11 +1828,16 @@ func (page *ResourceGroupListResultPage) NextWithContext(ctx context.Context) (e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rglr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rglr) + if err != nil { + return err + } + page.rglr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rglr = next return nil } @@ -1835,6 +1907,12 @@ type ResourceGroupProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } +// MarshalJSON is the custom marshaler for ResourceGroupProperties. +func (rgp ResourceGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + // ResourceGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type ResourceGroupsDeleteFuture struct { @@ -1867,6 +1945,15 @@ type ResourceListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for ResourceListResult. +func (rlr ResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rlr.Value != nil { + objectMap["value"] = rlr.Value + } + return json.Marshal(objectMap) +} + // ResourceListResultIterator provides access to a complete listing of GenericResourceExpanded values. type ResourceListResultIterator struct { i int @@ -1935,10 +2022,15 @@ func (rlr ResourceListResult) IsEmpty() bool { return rlr.Value == nil || len(*rlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (rlr ResourceListResult) hasNextLink() bool { + return rlr.NextLink != nil && len(*rlr.NextLink) != 0 +} + // resourceListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (rlr ResourceListResult) resourceListResultPreparer(ctx context.Context) (*http.Request, error) { - if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 { + if !rlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -1966,11 +2058,16 @@ func (page *ResourceListResultPage) NextWithContext(ctx context.Context) (err er tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.rlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.rlr) + if err != nil { + return err + } + page.rlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.rlr = next return nil } @@ -2018,8 +2115,8 @@ type ResourceProviderOperationDisplayProperties struct { Description *string `json:"description,omitempty"` } -// ResourcesCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// ResourcesCreateOrUpdateByIDFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type ResourcesCreateOrUpdateByIDFuture struct { azure.Future } @@ -2099,8 +2196,7 @@ func (future *ResourcesDeleteByIDFuture) Result(client ResourcesClient) (ar auto return } -// ResourcesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ResourcesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. type ResourcesDeleteFuture struct { azure.Future } @@ -2182,8 +2278,7 @@ func (future *ResourcesUpdateByIDFuture) Result(client ResourcesClient) (gr Gene return } -// ResourcesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// ResourcesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. type ResourcesUpdateFuture struct { azure.Future } @@ -2277,6 +2372,21 @@ type TagDetails struct { Values *[]TagValue `json:"values,omitempty"` } +// MarshalJSON is the custom marshaler for TagDetails. +func (td TagDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if td.TagName != nil { + objectMap["tagName"] = td.TagName + } + if td.Count != nil { + objectMap["count"] = td.Count + } + if td.Values != nil { + objectMap["values"] = td.Values + } + return json.Marshal(objectMap) +} + // TagsListResult list of subscription tags. type TagsListResult struct { autorest.Response `json:"-"` @@ -2286,6 +2396,15 @@ type TagsListResult struct { NextLink *string `json:"nextLink,omitempty"` } +// MarshalJSON is the custom marshaler for TagsListResult. +func (tlr TagsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tlr.Value != nil { + objectMap["value"] = tlr.Value + } + return json.Marshal(objectMap) +} + // TagsListResultIterator provides access to a complete listing of TagDetails values. type TagsListResultIterator struct { i int @@ -2354,10 +2473,15 @@ func (tlr TagsListResult) IsEmpty() bool { return tlr.Value == nil || len(*tlr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (tlr TagsListResult) hasNextLink() bool { + return tlr.NextLink != nil && len(*tlr.NextLink) != 0 +} + // tagsListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (tlr TagsListResult) tagsListResultPreparer(ctx context.Context) (*http.Request, error) { - if tlr.NextLink == nil || len(to.String(tlr.NextLink)) < 1 { + if !tlr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -2385,11 +2509,16 @@ func (page *TagsListResultPage) NextWithContext(ctx context.Context) (err error) tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.tlr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.tlr) + if err != nil { + return err + } + page.tlr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.tlr = next return nil } @@ -2434,6 +2563,18 @@ type TagValue struct { Count *TagCount `json:"count,omitempty"` } +// MarshalJSON is the custom marshaler for TagValue. +func (tv TagValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if tv.TagValue != nil { + objectMap["tagValue"] = tv.TagValue + } + if tv.Count != nil { + objectMap["count"] = tv.Count + } + return json.Marshal(objectMap) +} + // TargetResource target resource. type TargetResource struct { // ID - The ID of the resource. @@ -2482,8 +2623,8 @@ type WhatIfOperationProperties struct { Changes *[]WhatIfChange `json:"changes,omitempty"` } -// WhatIfOperationResult 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 result of the What-If operation. Contains a list of predicted changes and a URL link +// to get to the next set of results. type WhatIfOperationResult struct { autorest.Response `json:"-"` // Status - Status of the What-If operation. diff --git a/services/resources/mgmt/2019-07-01/features/operations.go b/services/resources/mgmt/2019-07-01/features/operations.go index 905f8a155db1..76b0d3899e6c 100644 --- a/services/resources/mgmt/2019-07-01/features/operations.go +++ b/services/resources/mgmt/2019-07-01/features/operations.go @@ -71,6 +71,9 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe if err != nil { err = autorest.NewErrorWithError(err, "features.OperationsClient", "List", resp, "Failure responding to request") } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -101,7 +104,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/resources/mgmt/2019-07-01/features/providers.go b/services/resources/mgmt/2019-07-01/features/providers.go index bbd48c961cde..6add3c0d8143 100644 --- a/services/resources/mgmt/2019-07-01/features/providers.go +++ b/services/resources/mgmt/2019-07-01/features/providers.go @@ -112,7 +112,6 @@ func (client ProvidersClient) GetSender(req *http.Request) (*http.Response, erro func (client ProvidersClient) GetResponder(resp *http.Response) (result Provider, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -190,7 +189,6 @@ func (client ProvidersClient) GetAtTenantScopeSender(req *http.Request) (*http.R func (client ProvidersClient) GetAtTenantScopeResponder(resp *http.Response) (result Provider, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -233,6 +231,9 @@ func (client ProvidersClient) List(ctx context.Context, top *int32, expand strin if err != nil { err = autorest.NewErrorWithError(err, "features.ProvidersClient", "List", resp, "Failure responding to request") } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -273,7 +274,6 @@ func (client ProvidersClient) ListSender(req *http.Request) (*http.Response, err func (client ProvidersClient) ListResponder(resp *http.Response) (result ProviderListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -353,6 +353,9 @@ func (client ProvidersClient) ListAtTenantScope(ctx context.Context, top *int32, if err != nil { err = autorest.NewErrorWithError(err, "features.ProvidersClient", "ListAtTenantScope", resp, "Failure responding to request") } + if result.plr.hasNextLink() && result.plr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -389,7 +392,6 @@ func (client ProvidersClient) ListAtTenantScopeSender(req *http.Request) (*http. func (client ProvidersClient) ListAtTenantScopeResponder(resp *http.Response) (result ProviderListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -500,7 +502,6 @@ func (client ProvidersClient) RegisterSender(req *http.Request) (*http.Response, func (client ProvidersClient) RegisterResponder(resp *http.Response) (result Provider, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -574,7 +575,6 @@ func (client ProvidersClient) UnregisterSender(req *http.Request) (*http.Respons func (client ProvidersClient) UnregisterResponder(resp *http.Response) (result Provider, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/resources/mgmt/2019-07-01/features/resourcegroups.go b/services/resources/mgmt/2019-07-01/features/resourcegroups.go index 03f9b5cfb30f..43a61c50a553 100644 --- a/services/resources/mgmt/2019-07-01/features/resourcegroups.go +++ b/services/resources/mgmt/2019-07-01/features/resourcegroups.go @@ -116,7 +116,6 @@ func (client ResourceGroupsClient) CheckExistenceSender(req *http.Request) (*htt func (client ResourceGroupsClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -207,7 +206,6 @@ func (client ResourceGroupsClient) CreateOrUpdateSender(req *http.Request) (*htt func (client ResourceGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ResourceGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -290,7 +288,6 @@ func (client ResourceGroupsClient) DeleteSender(req *http.Request) (future Resou func (client ResourceGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -374,7 +371,6 @@ func (client ResourceGroupsClient) ExportTemplateSender(req *http.Request) (*htt func (client ResourceGroupsClient) ExportTemplateResponder(resp *http.Response) (result ResourceGroupExportResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -456,7 +452,6 @@ func (client ResourceGroupsClient) GetSender(req *http.Request) (*http.Response, func (client ResourceGroupsClient) GetResponder(resp *http.Response) (result ResourceGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -498,6 +493,9 @@ func (client ResourceGroupsClient) List(ctx context.Context, filter string, top if err != nil { err = autorest.NewErrorWithError(err, "features.ResourceGroupsClient", "List", resp, "Failure responding to request") } + if result.rglr.hasNextLink() && result.rglr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -538,7 +536,6 @@ func (client ResourceGroupsClient) ListSender(req *http.Request) (*http.Response func (client ResourceGroupsClient) ListResponder(resp *http.Response) (result ResourceGroupListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -661,7 +658,6 @@ func (client ResourceGroupsClient) UpdateSender(req *http.Request) (*http.Respon func (client ResourceGroupsClient) UpdateResponder(resp *http.Response) (result ResourceGroup, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/resources/mgmt/2019-07-01/features/resources.go b/services/resources/mgmt/2019-07-01/features/resources.go index f2c762d0508d..72d16a394ca4 100644 --- a/services/resources/mgmt/2019-07-01/features/resources.go +++ b/services/resources/mgmt/2019-07-01/features/resources.go @@ -125,7 +125,6 @@ func (client ResourcesClient) CheckExistenceSender(req *http.Request) (*http.Res func (client ResourcesClient) CheckExistenceResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -199,7 +198,6 @@ func (client ResourcesClient) CheckExistenceByIDSender(req *http.Request) (*http func (client ResourcesClient) CheckExistenceByIDResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -294,7 +292,6 @@ func (client ResourcesClient) CreateOrUpdateSender(req *http.Request) (future Re func (client ResourcesClient) CreateOrUpdateResponder(resp *http.Response) (result GenericResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -379,7 +376,6 @@ func (client ResourcesClient) CreateOrUpdateByIDSender(req *http.Request) (futur func (client ResourcesClient) CreateOrUpdateByIDResponder(resp *http.Response) (result GenericResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -470,7 +466,6 @@ func (client ResourcesClient) DeleteSender(req *http.Request) (future ResourcesD func (client ResourcesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -544,7 +539,6 @@ func (client ResourcesClient) DeleteByIDSender(req *http.Request) (future Resour func (client ResourcesClient) DeleteByIDResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -634,7 +628,6 @@ func (client ResourcesClient) GetSender(req *http.Request) (*http.Response, erro func (client ResourcesClient) GetResponder(resp *http.Response) (result GenericResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -709,7 +702,6 @@ func (client ResourcesClient) GetByIDSender(req *http.Request) (*http.Response, func (client ResourcesClient) GetByIDResponder(resp *http.Response) (result GenericResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -762,6 +754,9 @@ func (client ResourcesClient) List(ctx context.Context, filter string, expand st if err != nil { err = autorest.NewErrorWithError(err, "features.ResourcesClient", "List", resp, "Failure responding to request") } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -805,7 +800,6 @@ func (client ResourcesClient) ListSender(req *http.Request) (*http.Response, err func (client ResourcesClient) ListResponder(resp *http.Response) (result ResourceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -904,6 +898,9 @@ func (client ResourcesClient) ListByResourceGroup(ctx context.Context, resourceG if err != nil { err = autorest.NewErrorWithError(err, "features.ResourcesClient", "ListByResourceGroup", resp, "Failure responding to request") } + if result.rlr.hasNextLink() && result.rlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -948,7 +945,6 @@ func (client ResourcesClient) ListByResourceGroupSender(req *http.Request) (*htt func (client ResourcesClient) ListByResourceGroupResponder(resp *http.Response) (result ResourceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1072,7 +1068,6 @@ func (client ResourcesClient) MoveResourcesSender(req *http.Request) (future Res func (client ResourcesClient) MoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1164,7 +1159,6 @@ func (client ResourcesClient) UpdateSender(req *http.Request) (future ResourcesU func (client ResourcesClient) UpdateResponder(resp *http.Response) (result GenericResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1242,7 +1236,6 @@ func (client ResourcesClient) UpdateByIDSender(req *http.Request) (future Resour func (client ResourcesClient) UpdateByIDResponder(resp *http.Response) (result GenericResource, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1331,7 +1324,6 @@ func (client ResourcesClient) ValidateMoveResourcesSender(req *http.Request) (fu func (client ResourcesClient) ValidateMoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp diff --git a/services/resources/mgmt/2019-07-01/features/tags.go b/services/resources/mgmt/2019-07-01/features/tags.go index c2b6d8763fc2..4bad976d73b4 100644 --- a/services/resources/mgmt/2019-07-01/features/tags.go +++ b/services/resources/mgmt/2019-07-01/features/tags.go @@ -108,7 +108,6 @@ func (client TagsClient) CreateOrUpdateSender(req *http.Request) (*http.Response func (client TagsClient) CreateOrUpdateResponder(resp *http.Response) (result TagDetails, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -184,7 +183,6 @@ func (client TagsClient) CreateOrUpdateValueSender(req *http.Request) (*http.Res func (client TagsClient) CreateOrUpdateValueResponder(resp *http.Response) (result TagValue, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -258,7 +256,6 @@ func (client TagsClient) DeleteSender(req *http.Request) (*http.Response, error) func (client TagsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -333,7 +330,6 @@ func (client TagsClient) DeleteValueSender(req *http.Request) (*http.Response, e func (client TagsClient) DeleteValueResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -370,6 +366,9 @@ func (client TagsClient) List(ctx context.Context) (result TagsListResultPage, e if err != nil { err = autorest.NewErrorWithError(err, "features.TagsClient", "List", resp, "Failure responding to request") } + if result.tlr.hasNextLink() && result.tlr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -404,7 +403,6 @@ func (client TagsClient) ListSender(req *http.Request) (*http.Response, error) { func (client TagsClient) ListResponder(resp *http.Response) (result TagsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/resources/mgmt/2019-07-01/features/version.go b/services/resources/mgmt/2019-07-01/features/version.go index 25d3b7e03caf..5e6c5a997bdb 100644 --- a/services/resources/mgmt/2019-07-01/features/version.go +++ b/services/resources/mgmt/2019-07-01/features/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " features/2019-07-01" + return "Azure-SDK-For-Go/" + Version() + " features/2019-07-01" } // Version returns the semantic version (see http://semver.org) of the client.