From ca51e689acdbce9cde9641cc6f0c53ba8ef67b0e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 12 Nov 2020 05:22:44 +0000 Subject: [PATCH] CodeGen from PR 11641 in Azure/azure-rest-api-specs update (#11641) --- .../mgmt/2017-05-10/resources/models.go | 58 +++++++++++++------ 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/services/resources/mgmt/2017-05-10/resources/models.go b/services/resources/mgmt/2017-05-10/resources/models.go index 8d3597b3ba4c..10eb26208d13 100644 --- a/services/resources/mgmt/2017-05-10/resources/models.go +++ b/services/resources/mgmt/2017-05-10/resources/models.go @@ -91,7 +91,8 @@ func (future *CreateOrUpdateByIDFuture) Result(client Client) (gr GenericResourc return } -// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type CreateOrUpdateFuture struct { azure.Future } @@ -384,8 +385,11 @@ func (page DeploymentListResultPage) Values() []DeploymentExtended { } // Creates a new instance of the DeploymentListResultPage type. -func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage { - return DeploymentListResultPage{fn: getNextPage} +func NewDeploymentListResultPage(cur DeploymentListResult, getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage { + return DeploymentListResultPage{ + fn: getNextPage, + dlr: cur, + } } // DeploymentOperation deployment operation information. @@ -446,7 +450,8 @@ func (dolr DeploymentOperationsListResult) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation values. +// DeploymentOperationsListResultIterator provides access to a complete listing of DeploymentOperation +// values. type DeploymentOperationsListResultIterator struct { i int page DeploymentOperationsListResultPage @@ -589,8 +594,11 @@ func (page DeploymentOperationsListResultPage) Values() []DeploymentOperation { } // Creates a new instance of the DeploymentOperationsListResultPage type. -func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage { - return DeploymentOperationsListResultPage{fn: getNextPage} +func NewDeploymentOperationsListResultPage(cur DeploymentOperationsListResult, getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage { + return DeploymentOperationsListResultPage{ + fn: getNextPage, + dolr: cur, + } } // DeploymentProperties deployment properties. @@ -670,8 +678,8 @@ func (dpe DeploymentPropertiesExtended) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// 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 } @@ -739,7 +747,8 @@ type ErrorAdditionalInfo struct { Info interface{} `json:"info,omitempty"` } -// ErrorResponse the resource management error response. +// ErrorResponse common error response for all Azure Resource Manager APIs to return error details for +// failed operations. (This also follows the OData error response format.) type ErrorResponse struct { // Code - READ-ONLY; The error code. Code *string `json:"code,omitempty"` @@ -1105,8 +1114,11 @@ func (page GroupListResultPage) Values() []Group { } // Creates a new instance of the GroupListResultPage type. -func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage { - return GroupListResultPage{fn: getNextPage} +func NewGroupListResultPage(cur GroupListResult, getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage { + return GroupListResultPage{ + fn: getNextPage, + glr: cur, + } } // GroupPatchable resource group information. @@ -1352,8 +1364,11 @@ func (page ListResultPage) Values() []GenericResourceExpanded { } // Creates a new instance of the ListResultPage type. -func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { - return ListResultPage{fn: getNextPage} +func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { + return ListResultPage{ + fn: getNextPage, + lr: cur, + } } // ManagementErrorWithDetails the detailed error message of resource management. @@ -1376,7 +1391,8 @@ type MoveInfo struct { TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` } -// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running operation. +// MoveResourcesFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type MoveResourcesFuture struct { azure.Future } @@ -1603,8 +1619,11 @@ func (page ProviderListResultPage) Values() []Provider { } // Creates a new instance of the ProviderListResultPage type. -func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage { - return ProviderListResultPage{fn: getNextPage} +func NewProviderListResultPage(cur ProviderListResult, getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage { + return ProviderListResultPage{ + fn: getNextPage, + plr: cur, + } } // ProviderOperationDisplayProperties resource provider operation's display properties. @@ -1901,8 +1920,11 @@ func (page TagsListResultPage) Values() []TagDetails { } // Creates a new instance of the TagsListResultPage type. -func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage { - return TagsListResultPage{fn: getNextPage} +func NewTagsListResultPage(cur TagsListResult, getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage { + return TagsListResultPage{ + fn: getNextPage, + tlr: cur, + } } // TagValue tag information.