From 29b1f48a19c10dc7d2f71fedd7f776d37e6066e9 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 11 Nov 2020 04:37:35 +0000 Subject: [PATCH] Generated from 4f8e7579f1b7c3177463dcee79ae93d399eff086 --- .../resourcemover/client.go | 6 +- .../2019-10-01-preview/resourcemover/enums.go | 4 +- .../resourcemover/models.go | 371 ++++++++---------- .../resourcemover/movecollections.go | 161 ++++++-- .../resourcemover/moveresources.go | 30 +- .../resourcemover/operationsdiscovery.go | 6 +- .../resourcemoverapi/interfaces.go | 3 +- .../resourcemover/unresolveddependencies.go | 6 +- .../resourcemover/version.go | 2 +- 9 files changed, 306 insertions(+), 283 deletions(-) diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/client.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/client.go index 2bc649ae8b65..a130037a2161 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/client.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/client.go @@ -1,4 +1,4 @@ -// Package regionmove implements the Azure ARM Regionmove service API version 2019-10-01-preview. +// Package resourcemover implements the Azure ARM Resourcemover service API version 2019-10-01-preview. // // A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between // zones within a region. @@ -26,11 +26,11 @@ import ( ) const ( - // DefaultBaseURI is the default URI used for the service Regionmove + // DefaultBaseURI is the default URI used for the service Resourcemover DefaultBaseURI = "https://management.azure.com" ) -// BaseClient is the base client for Regionmove. +// BaseClient is the base client for Resourcemover. type BaseClient struct { autorest.Client BaseURI string diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/enums.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/enums.go index b911f793e879..33a9cbba3ebc 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/enums.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/enums.go @@ -172,8 +172,6 @@ const ( ResourceTypeMicrosoftSqlserversdatabases ResourceType = "Microsoft.Sql/servers/databases" // ResourceTypeMicrosoftSqlserverselasticPools ... ResourceTypeMicrosoftSqlserverselasticPools ResourceType = "Microsoft.Sql/servers/elasticPools" - // ResourceTypeMoveResourcePropertiesSourceResourceSettings ... - ResourceTypeMoveResourcePropertiesSourceResourceSettings ResourceType = "MoveResourceProperties_sourceResourceSettings" // ResourceTypeResourceGroups ... ResourceTypeResourceGroups ResourceType = "resourceGroups" // ResourceTypeResourceSettings ... @@ -182,7 +180,7 @@ const ( // PossibleResourceTypeValues returns an array of possible values for the ResourceType const type. func PossibleResourceTypeValues() []ResourceType { - return []ResourceType{ResourceTypeMicrosoftComputeavailabilitySets, ResourceTypeMicrosoftComputevirtualMachines, ResourceTypeMicrosoftNetworkloadBalancers, ResourceTypeMicrosoftNetworknetworkInterfaces, ResourceTypeMicrosoftNetworknetworkSecurityGroups, ResourceTypeMicrosoftNetworkpublicIPAddresses, ResourceTypeMicrosoftNetworkvirtualNetworks, ResourceTypeMicrosoftSqlservers, ResourceTypeMicrosoftSqlserversdatabases, ResourceTypeMicrosoftSqlserverselasticPools, ResourceTypeMoveResourcePropertiesSourceResourceSettings, ResourceTypeResourceGroups, ResourceTypeResourceSettings} + return []ResourceType{ResourceTypeMicrosoftComputeavailabilitySets, ResourceTypeMicrosoftComputevirtualMachines, ResourceTypeMicrosoftNetworkloadBalancers, ResourceTypeMicrosoftNetworknetworkInterfaces, ResourceTypeMicrosoftNetworknetworkSecurityGroups, ResourceTypeMicrosoftNetworkpublicIPAddresses, ResourceTypeMicrosoftNetworkvirtualNetworks, ResourceTypeMicrosoftSqlservers, ResourceTypeMicrosoftSqlserversdatabases, ResourceTypeMicrosoftSqlserverselasticPools, ResourceTypeResourceGroups, ResourceTypeResourceSettings} } // TargetAvailabilityZone enumerates the values for target availability zone. diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/models.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/models.go index 542e7d2b6b21..15b92c8da9f3 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/models.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/models.go @@ -28,7 +28,7 @@ import ( ) // The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/regionmove/mgmt/2019-10-01-preview/regionmove" +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover" // AffectedMoveResource the RP custom operation error info. type AffectedMoveResource struct { @@ -55,7 +55,7 @@ type AvailabilitySetResourceSettings struct { UpdateDomain *int32 `json:"updateDomain,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -78,11 +78,6 @@ func (asrs AvailabilitySetResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings. -func (asrs AvailabilitySetResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for AvailabilitySetResourceSettings. func (asrs AvailabilitySetResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -154,6 +149,16 @@ type AzureResourceReference struct { SourceArmResourceID *string `json:"sourceArmResourceId,omitempty"` } +// BulkRemoveRequest defines the request body for bulk remove of move resources operation. +type BulkRemoveRequest struct { + // ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite. + ValidateOnly *bool `json:"validateOnly,omitempty"` + // MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property. + MoveResources *[]string `json:"moveResources,omitempty"` + // MoveResourceInputType - Possible values include: 'MoveResourceID', 'MoveResourceSourceID' + MoveResourceInputType MoveResourceInputType `json:"moveResourceInputType,omitempty"` +} + // CloudError an error response from the service. type CloudError struct { // Error - Cloud error body. @@ -248,10 +253,19 @@ type Identity struct { type JobStatus struct { // JobName - Possible values include: 'InitialSync' JobName JobName `json:"jobName,omitempty"` - // JobProgress - Gets or sets the monitoring job percentage. + // JobProgress - READ-ONLY; Gets or sets the monitoring job percentage. JobProgress *string `json:"jobProgress,omitempty"` } +// MarshalJSON is the custom marshaler for JobStatus. +func (js JobStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if js.JobName != "" { + objectMap["jobName"] = js.JobName + } + return json.Marshal(objectMap) +} + // LBBackendAddressPoolResourceSettings defines load balancer backend address pool properties. type LBBackendAddressPoolResourceSettings struct { // Name - Gets or sets the backend address pool name. @@ -301,7 +315,7 @@ type LoadBalancerResourceSettings struct { Zones *string `json:"zones,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -330,11 +344,6 @@ func (lbrs LoadBalancerResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings. -func (lbrs LoadBalancerResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for LoadBalancerResourceSettings. func (lbrs LoadBalancerResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -603,8 +612,40 @@ func (page MoveCollectionResultListPage) Values() []MoveCollection { } // Creates a new instance of the MoveCollectionResultListPage type. -func NewMoveCollectionResultListPage(getNextPage func(context.Context, MoveCollectionResultList) (MoveCollectionResultList, error)) MoveCollectionResultListPage { - return MoveCollectionResultListPage{fn: getNextPage} +func NewMoveCollectionResultListPage(cur MoveCollectionResultList, getNextPage func(context.Context, MoveCollectionResultList) (MoveCollectionResultList, error)) MoveCollectionResultListPage { + return MoveCollectionResultListPage{ + fn: getNextPage, + mcrl: cur, + } +} + +// MoveCollectionsBulkRemoveFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type MoveCollectionsBulkRemoveFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *MoveCollectionsBulkRemoveFuture) Result(client MoveCollectionsClient) (osVar OperationStatus, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsBulkRemoveFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsBulkRemoveFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { + osVar, err = client.BulkRemoveResponder(osVar.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsBulkRemoveFuture", "Result", osVar.Response.Response, "Failure responding to request") + } + } + return } // MoveCollectionsCommitFuture an abstraction for monitoring and retrieving the results of a long-running @@ -619,18 +660,18 @@ func (future *MoveCollectionsCommitFuture) Result(client MoveCollectionsClient) var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsCommitFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsCommitFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveCollectionsCommitFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsCommitFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.CommitResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsCommitFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsCommitFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return @@ -648,18 +689,18 @@ func (future *MoveCollectionsDeleteFuture) Result(client MoveCollectionsClient) var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveCollectionsDeleteFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsDeleteFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.DeleteResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsDeleteFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDeleteFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return @@ -677,25 +718,25 @@ func (future *MoveCollectionsDiscardFuture) Result(client MoveCollectionsClient) var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsDiscardFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDiscardFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveCollectionsDiscardFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsDiscardFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.DiscardResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsDiscardFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsDiscardFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return } -// MoveCollectionsInitiateMoveFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. +// MoveCollectionsInitiateMoveFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type MoveCollectionsInitiateMoveFuture struct { azure.Future } @@ -706,18 +747,18 @@ func (future *MoveCollectionsInitiateMoveFuture) Result(client MoveCollectionsCl var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsInitiateMoveFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsInitiateMoveFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveCollectionsInitiateMoveFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsInitiateMoveFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.InitiateMoveResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsInitiateMoveFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsInitiateMoveFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return @@ -735,18 +776,18 @@ func (future *MoveCollectionsPrepareFuture) Result(client MoveCollectionsClient) var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsPrepareFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsPrepareFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveCollectionsPrepareFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsPrepareFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.PrepareResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsPrepareFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsPrepareFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return @@ -764,18 +805,18 @@ func (future *MoveCollectionsResolveDependenciesFuture) Result(client MoveCollec var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsResolveDependenciesFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsResolveDependenciesFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveCollectionsResolveDependenciesFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveCollectionsResolveDependenciesFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.ResolveDependenciesResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsResolveDependenciesFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsResolveDependenciesFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return @@ -815,6 +856,8 @@ type MoveResourceCollection struct { Value *[]MoveResource `json:"value,omitempty"` // NextLink - Gets the value of next link. NextLink *string `json:"nextLink,omitempty"` + // Summary - Gets or the list of summary items. + Summary *[]SummaryItem `json:"summary,omitempty"` } // MoveResourceCollectionIterator provides access to a complete listing of MoveResource values. @@ -960,8 +1003,11 @@ func (page MoveResourceCollectionPage) Values() []MoveResource { } // Creates a new instance of the MoveResourceCollectionPage type. -func NewMoveResourceCollectionPage(getNextPage func(context.Context, MoveResourceCollection) (MoveResourceCollection, error)) MoveResourceCollectionPage { - return MoveResourceCollectionPage{fn: getNextPage} +func NewMoveResourceCollectionPage(cur MoveResourceCollection, getNextPage func(context.Context, MoveResourceCollection) (MoveResourceCollection, error)) MoveResourceCollectionPage { + return MoveResourceCollectionPage{ + fn: getNextPage, + mrc: cur, + } } // MoveResourceDependency defines the dependency of the move resource. @@ -989,7 +1035,7 @@ type MoveResourceDependencyOverride struct { TargetID *string `json:"targetId,omitempty"` } -// MoveResourceError an error response from the azure region move service. +// MoveResourceError an error response from the azure resource mover service. type MoveResourceError struct { // Properties - The move resource error body. Properties *MoveResourceErrorBody `json:"properties,omitempty"` @@ -997,13 +1043,13 @@ type MoveResourceError struct { // MoveResourceErrorBody an error response from the Azure Migrate service. type MoveResourceErrorBody struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + // Code - READ-ONLY; An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. + // Message - READ-ONLY; A message describing the error, intended to be suitable for display in a user interface. Message *string `json:"message,omitempty"` - // Target - The target of the particular error. For example, the name of the property in error. + // Target - READ-ONLY; The target of the particular error. For example, the name of the property in error. Target *string `json:"target,omitempty"` - // Details - A list of additional details about the error. + // Details - READ-ONLY; A list of additional details about the error. Details *[]MoveResourceErrorBody `json:"details,omitempty"` } @@ -1031,14 +1077,15 @@ type MoveResourceProperties struct { // ResourceSettings - Gets or sets the resource settings. ResourceSettings BasicResourceSettings `json:"resourceSettings,omitempty"` // SourceResourceSettings - READ-ONLY; Gets or sets the source resource settings. - SourceResourceSettings *MoveResourcePropertiesSourceResourceSettings `json:"sourceResourceSettings,omitempty"` + SourceResourceSettings BasicResourceSettings `json:"sourceResourceSettings,omitempty"` // MoveStatus - READ-ONLY; Defines the move resource status. MoveStatus *MoveResourcePropertiesMoveStatus `json:"moveStatus,omitempty"` // DependsOn - READ-ONLY; Gets or sets the move resource dependencies. DependsOn *[]MoveResourceDependency `json:"dependsOn,omitempty"` // DependsOnOverrides - Gets or sets the move resource dependencies overrides. DependsOnOverrides *[]MoveResourceDependencyOverride `json:"dependsOnOverrides,omitempty"` - Errors *MoveResourceError `json:"errors,omitempty"` + // Errors - READ-ONLY; Defines the move resource errors. + Errors *MoveResourcePropertiesErrors `json:"errors,omitempty"` } // MarshalJSON is the custom marshaler for MoveResourceProperties. @@ -1057,9 +1104,6 @@ func (mrp MoveResourceProperties) MarshalJSON() ([]byte, error) { if mrp.DependsOnOverrides != nil { objectMap["dependsOnOverrides"] = mrp.DependsOnOverrides } - if mrp.Errors != nil { - objectMap["errors"] = mrp.Errors - } return json.Marshal(objectMap) } @@ -1118,12 +1162,11 @@ func (mrp *MoveResourceProperties) UnmarshalJSON(body []byte) error { } case "sourceResourceSettings": if v != nil { - var sourceResourceSettings MoveResourcePropertiesSourceResourceSettings - err = json.Unmarshal(*v, &sourceResourceSettings) + sourceResourceSettings, err := unmarshalBasicResourceSettings(*v) if err != nil { return err } - mrp.SourceResourceSettings = &sourceResourceSettings + mrp.SourceResourceSettings = sourceResourceSettings } case "moveStatus": if v != nil { @@ -1154,7 +1197,7 @@ func (mrp *MoveResourceProperties) UnmarshalJSON(body []byte) error { } case "errors": if v != nil { - var errorsVar MoveResourceError + var errorsVar MoveResourcePropertiesErrors err = json.Unmarshal(*v, &errorsVar) if err != nil { return err @@ -1167,107 +1210,37 @@ func (mrp *MoveResourceProperties) UnmarshalJSON(body []byte) error { return nil } +// MoveResourcePropertiesErrors defines the move resource errors. +type MoveResourcePropertiesErrors struct { + // Properties - The move resource error body. + Properties *MoveResourceErrorBody `json:"properties,omitempty"` +} + // MoveResourcePropertiesMoveStatus defines the move resource status. type MoveResourcePropertiesMoveStatus struct { // MoveState - Possible values include: 'AssignmentPending', 'PreparePending', 'PrepareInProgress', 'PrepareFailed', 'MovePending', 'MoveInProgress', 'MoveFailed', 'DiscardInProgress', 'DiscardFailed', 'CommitPending', 'CommitInProgress', 'CommitFailed', 'Committed' MoveState MoveState `json:"moveState,omitempty"` JobStatus *JobStatus `json:"jobStatus,omitempty"` Errors *MoveResourceError `json:"errors,omitempty"` - // TargetID - Gets the Target ARM Id of the resource. + // TargetID - READ-ONLY; Gets the Target ARM Id of the resource. TargetID *string `json:"targetId,omitempty"` } -// MoveResourcePropertiesSourceResourceSettings gets or sets the source resource settings. -type MoveResourcePropertiesSourceResourceSettings struct { - // TargetResourceName - Gets or sets the target Resource name. - TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' - ResourceType ResourceType `json:"resourceType,omitempty"` -} - -// MarshalJSON is the custom marshaler for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) MarshalJSON() ([]byte, error) { - mrpRs.ResourceType = ResourceTypeMoveResourcePropertiesSourceResourceSettings +// MarshalJSON is the custom marshaler for MoveResourcePropertiesMoveStatus. +func (mrpS MoveResourcePropertiesMoveStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if mrpRs.TargetResourceName != nil { - objectMap["targetResourceName"] = mrpRs.TargetResourceName + if mrpS.MoveState != "" { + objectMap["moveState"] = mrpS.MoveState } - if mrpRs.ResourceType != "" { - objectMap["resourceType"] = mrpRs.ResourceType + if mrpS.JobStatus != nil { + objectMap["jobStatus"] = mrpS.JobStatus + } + if mrpS.Errors != nil { + objectMap["errors"] = mrpS.Errors } return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return &mrpRs, true -} - -// AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { - return nil, false -} - -// AsAvailabilitySetResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) { - return nil, false -} - -// AsVirtualNetworkResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) { - return nil, false -} - -// AsNetworkInterfaceResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsNetworkInterfaceResourceSettings() (*NetworkInterfaceResourceSettings, bool) { - return nil, false -} - -// AsNetworkSecurityGroupResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsNetworkSecurityGroupResourceSettings() (*NetworkSecurityGroupResourceSettings, bool) { - return nil, false -} - -// AsLoadBalancerResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsLoadBalancerResourceSettings() (*LoadBalancerResourceSettings, bool) { - return nil, false -} - -// AsSQLServerResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsSQLServerResourceSettings() (*SQLServerResourceSettings, bool) { - return nil, false -} - -// AsSQLElasticPoolResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsSQLElasticPoolResourceSettings() (*SQLElasticPoolResourceSettings, bool) { - return nil, false -} - -// AsSQLDatabaseResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsSQLDatabaseResourceSettings() (*SQLDatabaseResourceSettings, bool) { - return nil, false -} - -// AsResourceGroupResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsResourceGroupResourceSettings() (*ResourceGroupResourceSettings, bool) { - return nil, false -} - -// AsPublicIPAddressResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsPublicIPAddressResourceSettings() (*PublicIPAddressResourceSettings, bool) { - return nil, false -} - -// AsResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsResourceSettings() (*ResourceSettings, bool) { - return nil, false -} - -// AsBasicResourceSettings is the BasicResourceSettings implementation for MoveResourcePropertiesSourceResourceSettings. -func (mrpRs MoveResourcePropertiesSourceResourceSettings) AsBasicResourceSettings() (BasicResourceSettings, bool) { - return &mrpRs, true -} - // MoveResourcesCreateFuture an abstraction for monitoring and retrieving the results of a long-running // operation. type MoveResourcesCreateFuture struct { @@ -1280,18 +1253,18 @@ func (future *MoveResourcesCreateFuture) Result(client MoveResourcesClient) (mr var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesCreateFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesCreateFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveResourcesCreateFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveResourcesCreateFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if mr.Response.Response, err = future.GetResult(sender); err == nil && mr.Response.Response.StatusCode != http.StatusNoContent { mr, err = client.CreateResponder(mr.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesCreateFuture", "Result", mr.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesCreateFuture", "Result", mr.Response.Response, "Failure responding to request") } } return @@ -1309,18 +1282,18 @@ func (future *MoveResourcesDeleteFuture) Result(client MoveResourcesClient) (osV var done bool done, err = future.DoneWithContext(context.Background(), client) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesDeleteFuture", "Result", future.Response(), "Polling failure") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesDeleteFuture", "Result", future.Response(), "Polling failure") return } if !done { - err = azure.NewAsyncOpIncompleteError("regionmove.MoveResourcesDeleteFuture") + err = azure.NewAsyncOpIncompleteError("resourcemover.MoveResourcesDeleteFuture") return } sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if osVar.Response.Response, err = future.GetResult(sender); err == nil && osVar.Response.Response.StatusCode != http.StatusNoContent { osVar, err = client.DeleteResponder(osVar.Response.Response) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesDeleteFuture", "Result", osVar.Response.Response, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesDeleteFuture", "Result", osVar.Response.Response, "Failure responding to request") } } return @@ -1332,10 +1305,25 @@ type MoveResourceStatus struct { MoveState MoveState `json:"moveState,omitempty"` JobStatus *JobStatus `json:"jobStatus,omitempty"` Errors *MoveResourceError `json:"errors,omitempty"` - // TargetID - Gets the Target ARM Id of the resource. + // TargetID - READ-ONLY; Gets the Target ARM Id of the resource. TargetID *string `json:"targetId,omitempty"` } +// MarshalJSON is the custom marshaler for MoveResourceStatus. +func (mrs MoveResourceStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mrs.MoveState != "" { + objectMap["moveState"] = mrs.MoveState + } + if mrs.JobStatus != nil { + objectMap["jobStatus"] = mrs.JobStatus + } + if mrs.Errors != nil { + objectMap["errors"] = mrs.Errors + } + return json.Marshal(objectMap) +} + // NetworkInterfaceResourceSettings defines the network interface resource settings. type NetworkInterfaceResourceSettings struct { // IPConfigurations - Gets or sets the IP configurations of the NIC. @@ -1344,7 +1332,7 @@ type NetworkInterfaceResourceSettings struct { EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -1367,11 +1355,6 @@ func (nirs NetworkInterfaceResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings. -func (nirs NetworkInterfaceResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for NetworkInterfaceResourceSettings. func (nirs NetworkInterfaceResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -1443,7 +1426,7 @@ type NetworkSecurityGroupResourceSettings struct { SecurityRules *[]NsgSecurityRule `json:"securityRules,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -1463,11 +1446,6 @@ func (nsgrs NetworkSecurityGroupResourceSettings) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings. -func (nsgrs NetworkSecurityGroupResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for NetworkSecurityGroupResourceSettings. func (nsgrs NetworkSecurityGroupResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -1615,8 +1593,10 @@ type OperationsDiscovery struct { // This API is used to register for their service, and should include details about the // operation (e.g. a localized name for the resource provider + any special // considerations like PII release). - Name *string `json:"name,omitempty"` - Display *Display `json:"display,omitempty"` + Name *string `json:"name,omitempty"` + // IsDataAction - Indicates whether the operation is a data action + IsDataAction *bool `json:"isDataAction,omitempty"` + Display *Display `json:"display,omitempty"` // Origin - Gets or sets Origin. // The intended executor of the operation; governs the display of the operation in the // RBAC UX and the audit logs UX. @@ -1697,7 +1677,7 @@ type PublicIPAddressResourceSettings struct { Zones *string `json:"zones,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -1729,11 +1709,6 @@ func (piars PublicIPAddressResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings. -func (piars PublicIPAddressResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for PublicIPAddressResourceSettings. func (piars PublicIPAddressResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -1803,7 +1778,7 @@ func (piars PublicIPAddressResourceSettings) AsBasicResourceSettings() (BasicRes type ResourceGroupResourceSettings struct { // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -1820,11 +1795,6 @@ func (rgrs ResourceGroupResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings. -func (rgrs ResourceGroupResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for ResourceGroupResourceSettings. func (rgrs ResourceGroupResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -1890,8 +1860,8 @@ func (rgrs ResourceGroupResourceSettings) AsBasicResourceSettings() (BasicResour return &rgrs, true } -// ResourceMoveRequest defines the request body for resource move operation. -type ResourceMoveRequest struct { +// ResourceMoveRequestType defines the request body for resource move operation. +type ResourceMoveRequestType struct { // ValidateOnly - Gets or sets a value indicating whether the operation needs to only run pre-requisite. ValidateOnly *bool `json:"validateOnly,omitempty"` // MoveResources - Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property. @@ -1902,7 +1872,6 @@ type ResourceMoveRequest struct { // BasicResourceSettings gets or sets the resource settings. type BasicResourceSettings interface { - AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) AsAvailabilitySetResourceSettings() (*AvailabilitySetResourceSettings, bool) AsVirtualNetworkResourceSettings() (*VirtualNetworkResourceSettings, bool) @@ -1921,7 +1890,7 @@ type BasicResourceSettings interface { type ResourceSettings struct { // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -1933,10 +1902,6 @@ func unmarshalBasicResourceSettings(body []byte) (BasicResourceSettings, error) } switch m["resourceType"] { - case string(ResourceTypeMoveResourcePropertiesSourceResourceSettings): - var mrpRs MoveResourcePropertiesSourceResourceSettings - err := json.Unmarshal(body, &mrpRs) - return mrpRs, err case string(ResourceTypeMicrosoftComputevirtualMachines): var vmrs VirtualMachineResourceSettings err := json.Unmarshal(body, &vmrs) @@ -2019,11 +1984,6 @@ func (rs ResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for ResourceSettings. -func (rs ResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for ResourceSettings. func (rs ResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -2095,7 +2055,7 @@ type SQLDatabaseResourceSettings struct { ZoneRedundant ZoneRedundant `json:"zoneRedundant,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -2115,11 +2075,6 @@ func (sdrs SQLDatabaseResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings. -func (sdrs SQLDatabaseResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for SQLDatabaseResourceSettings. func (sdrs SQLDatabaseResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -2191,7 +2146,7 @@ type SQLElasticPoolResourceSettings struct { ZoneRedundant ZoneRedundant `json:"zoneRedundant,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -2211,11 +2166,6 @@ func (seprs SQLElasticPoolResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings. -func (seprs SQLElasticPoolResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for SQLElasticPoolResourceSettings. func (seprs SQLElasticPoolResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -2285,7 +2235,7 @@ func (seprs SQLElasticPoolResourceSettings) AsBasicResourceSettings() (BasicReso type SQLServerResourceSettings struct { // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -2302,11 +2252,6 @@ func (ssrs SQLServerResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings. -func (ssrs SQLServerResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for SQLServerResourceSettings. func (ssrs SQLServerResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false @@ -2388,6 +2333,14 @@ type SubnetResourceSettings struct { AddressPrefix *string `json:"addressPrefix,omitempty"` } +// SummaryItem summary item. +type SummaryItem struct { + // Count - Gets the count. + Count *int32 `json:"count,omitempty"` + // Item - Gets the item. + Item *string `json:"item,omitempty"` +} + // UnresolvedDependency unresolved dependency. type UnresolvedDependency struct { // Count - Gets or sets the count. @@ -2434,7 +2387,7 @@ type VirtualMachineResourceSettings struct { TargetAvailabilitySetID *string `json:"targetAvailabilitySetId,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -2460,11 +2413,6 @@ func (vmrs VirtualMachineResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings. -func (vmrs VirtualMachineResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for VirtualMachineResourceSettings. func (vmrs VirtualMachineResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return &vmrs, true @@ -2544,7 +2492,7 @@ type VirtualNetworkResourceSettings struct { Subnets *[]SubnetResourceSettings `json:"subnets,omitempty"` // TargetResourceName - Gets or sets the target Resource name. TargetResourceName *string `json:"targetResourceName,omitempty"` - // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMoveResourcePropertiesSourceResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' + // ResourceType - Possible values include: 'ResourceTypeResourceSettings', 'ResourceTypeMicrosoftComputevirtualMachines', 'ResourceTypeMicrosoftComputeavailabilitySets', 'ResourceTypeMicrosoftNetworkvirtualNetworks', 'ResourceTypeMicrosoftNetworknetworkInterfaces', 'ResourceTypeMicrosoftNetworknetworkSecurityGroups', 'ResourceTypeMicrosoftNetworkloadBalancers', 'ResourceTypeMicrosoftSqlservers', 'ResourceTypeMicrosoftSqlserverselasticPools', 'ResourceTypeMicrosoftSqlserversdatabases', 'ResourceTypeResourceGroups', 'ResourceTypeMicrosoftNetworkpublicIPAddresses' ResourceType ResourceType `json:"resourceType,omitempty"` } @@ -2573,11 +2521,6 @@ func (vnrs VirtualNetworkResourceSettings) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// AsMoveResourcePropertiesSourceResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings. -func (vnrs VirtualNetworkResourceSettings) AsMoveResourcePropertiesSourceResourceSettings() (*MoveResourcePropertiesSourceResourceSettings, bool) { - return nil, false -} - // AsVirtualMachineResourceSettings is the BasicResourceSettings implementation for VirtualNetworkResourceSettings. func (vnrs VirtualNetworkResourceSettings) AsVirtualMachineResourceSettings() (*VirtualMachineResourceSettings, bool) { return nil, false diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/movecollections.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/movecollections.go index 675f7572422b..e47f05e14c1a 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/movecollections.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/movecollections.go @@ -43,6 +43,85 @@ func NewMoveCollectionsClientWithBaseURI(baseURI string, subscriptionID string) return MoveCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } +// BulkRemove removes the set of move resources included in the request body from move collection. The orchestration is +// done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly +// property set to true. +func (client MoveCollectionsClient) BulkRemove(ctx context.Context, resourceGroupName string, moveCollectionName string, body *BulkRemoveRequest) (result MoveCollectionsBulkRemoveFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/MoveCollectionsClient.BulkRemove") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.BulkRemovePreparer(ctx, resourceGroupName, moveCollectionName, body) + if err != nil { + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "BulkRemove", nil, "Failure preparing request") + return + } + + result, err = client.BulkRemoveSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "BulkRemove", result.Response(), "Failure sending request") + return + } + + return +} + +// BulkRemovePreparer prepares the BulkRemove request. +func (client MoveCollectionsClient) BulkRemovePreparer(ctx context.Context, resourceGroupName string, moveCollectionName string, body *BulkRemoveRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "moveCollectionName": autorest.Encode("path", moveCollectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2019-10-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/bulkRemove", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if body != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(body)) + } + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// BulkRemoveSender sends the BulkRemove request. The method will close the +// http.Response Body if it receives an error. +func (client MoveCollectionsClient) BulkRemoveSender(req *http.Request) (future MoveCollectionsBulkRemoveFuture, err error) { + var resp *http.Response + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// BulkRemoveResponder handles the response to the BulkRemove request. The method always +// closes the http.Response Body. +func (client MoveCollectionsClient) BulkRemoveResponder(resp *http.Response) (result OperationStatus, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // Commit commits the set of resources included in the request body. The commit operation is triggered on the // moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource // moveState do a transition to Committed. To aid the user to prerequisite the operation the client can call operation @@ -65,18 +144,18 @@ func (client MoveCollectionsClient) Commit(ctx context.Context, resourceGroupNam {TargetValue: body, Constraints: []validation.Constraint{{Target: "body", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.MoveResources", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("regionmove.MoveCollectionsClient", "Commit", err.Error()) + return result, validation.NewError("resourcemover.MoveCollectionsClient", "Commit", err.Error()) } req, err := client.CommitPreparer(ctx, resourceGroupName, moveCollectionName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Commit", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Commit", nil, "Failure preparing request") return } result, err = client.CommitSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Commit", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Commit", result.Response(), "Failure sending request") return } @@ -133,7 +212,7 @@ func (client MoveCollectionsClient) CommitResponder(resp *http.Response) (result return } -// Create creates a move collection. +// Create creates or updates a move collection. // Parameters: // resourceGroupName - the Resource Group Name. // moveCollectionName - the Move Collection Name. @@ -156,25 +235,25 @@ func (client MoveCollectionsClient) Create(ctx context.Context, resourceGroupNam {Target: "body.Properties.TargetRegion", Name: validation.Null, Rule: true, Chain: nil}, }}, }}}}}); err != nil { - return result, validation.NewError("regionmove.MoveCollectionsClient", "Create", err.Error()) + return result, validation.NewError("resourcemover.MoveCollectionsClient", "Create", err.Error()) } req, err := client.CreatePreparer(ctx, resourceGroupName, moveCollectionName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Create", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Create", nil, "Failure preparing request") return } resp, err := client.CreateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Create", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Create", resp, "Failure sending request") return } result, err = client.CreateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Create", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Create", resp, "Failure responding to request") } return @@ -244,13 +323,13 @@ func (client MoveCollectionsClient) Delete(ctx context.Context, resourceGroupNam } req, err := client.DeletePreparer(ctx, resourceGroupName, moveCollectionName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Delete", nil, "Failure preparing request") return } result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Delete", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Delete", result.Response(), "Failure sending request") return } @@ -324,18 +403,18 @@ func (client MoveCollectionsClient) Discard(ctx context.Context, resourceGroupNa {TargetValue: body, Constraints: []validation.Constraint{{Target: "body", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.MoveResources", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("regionmove.MoveCollectionsClient", "Discard", err.Error()) + return result, validation.NewError("resourcemover.MoveCollectionsClient", "Discard", err.Error()) } req, err := client.DiscardPreparer(ctx, resourceGroupName, moveCollectionName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Discard", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Discard", nil, "Failure preparing request") return } result, err = client.DiscardSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Discard", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Discard", result.Response(), "Failure sending request") return } @@ -409,20 +488,20 @@ func (client MoveCollectionsClient) Get(ctx context.Context, resourceGroupName s } req, err := client.GetPreparer(ctx, resourceGroupName, moveCollectionName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Get", resp, "Failure responding to request") } return @@ -474,7 +553,7 @@ func (client MoveCollectionsClient) GetResponder(resp *http.Response) (result Mo // Parameters: // resourceGroupName - the Resource Group Name. // moveCollectionName - the Move Collection Name. -func (client MoveCollectionsClient) InitiateMove(ctx context.Context, resourceGroupName string, moveCollectionName string, body *ResourceMoveRequest) (result MoveCollectionsInitiateMoveFuture, err error) { +func (client MoveCollectionsClient) InitiateMove(ctx context.Context, resourceGroupName string, moveCollectionName string, body *ResourceMoveRequestType) (result MoveCollectionsInitiateMoveFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/MoveCollectionsClient.InitiateMove") defer func() { @@ -489,18 +568,18 @@ func (client MoveCollectionsClient) InitiateMove(ctx context.Context, resourceGr {TargetValue: body, Constraints: []validation.Constraint{{Target: "body", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.MoveResources", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("regionmove.MoveCollectionsClient", "InitiateMove", err.Error()) + return result, validation.NewError("resourcemover.MoveCollectionsClient", "InitiateMove", err.Error()) } req, err := client.InitiateMovePreparer(ctx, resourceGroupName, moveCollectionName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "InitiateMove", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "InitiateMove", nil, "Failure preparing request") return } result, err = client.InitiateMoveSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "InitiateMove", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "InitiateMove", result.Response(), "Failure sending request") return } @@ -508,7 +587,7 @@ func (client MoveCollectionsClient) InitiateMove(ctx context.Context, resourceGr } // InitiateMovePreparer prepares the InitiateMove request. -func (client MoveCollectionsClient) InitiateMovePreparer(ctx context.Context, resourceGroupName string, moveCollectionName string, body *ResourceMoveRequest) (*http.Request, error) { +func (client MoveCollectionsClient) InitiateMovePreparer(ctx context.Context, resourceGroupName string, moveCollectionName string, body *ResourceMoveRequestType) (*http.Request, error) { pathParameters := map[string]interface{}{ "moveCollectionName": autorest.Encode("path", moveCollectionName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -574,20 +653,20 @@ func (client MoveCollectionsClient) ListMoveCollectionsByResourceGroup(ctx conte result.fn = client.listMoveCollectionsByResourceGroupNextResults req, err := client.ListMoveCollectionsByResourceGroupPreparer(ctx, resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ListMoveCollectionsByResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ListMoveCollectionsByResourceGroup", nil, "Failure preparing request") return } resp, err := client.ListMoveCollectionsByResourceGroupSender(req) if err != nil { result.mcrl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ListMoveCollectionsByResourceGroup", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ListMoveCollectionsByResourceGroup", resp, "Failure sending request") return } result.mcrl, err = client.ListMoveCollectionsByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ListMoveCollectionsByResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ListMoveCollectionsByResourceGroup", resp, "Failure responding to request") } if result.mcrl.hasNextLink() && result.mcrl.IsEmpty() { err = result.NextWithContext(ctx) @@ -638,7 +717,7 @@ func (client MoveCollectionsClient) ListMoveCollectionsByResourceGroupResponder( func (client MoveCollectionsClient) listMoveCollectionsByResourceGroupNextResults(ctx context.Context, lastResults MoveCollectionResultList) (result MoveCollectionResultList, err error) { req, err := lastResults.moveCollectionResultListPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "listMoveCollectionsByResourceGroupNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "listMoveCollectionsByResourceGroupNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -646,11 +725,11 @@ func (client MoveCollectionsClient) listMoveCollectionsByResourceGroupNextResult resp, err := client.ListMoveCollectionsByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "listMoveCollectionsByResourceGroupNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "listMoveCollectionsByResourceGroupNextResults", resp, "Failure sending next results request") } result, err = client.ListMoveCollectionsByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "listMoveCollectionsByResourceGroupNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "listMoveCollectionsByResourceGroupNextResults", resp, "Failure responding to next results request") } return } @@ -686,20 +765,20 @@ func (client MoveCollectionsClient) ListMoveCollectionsBySubscription(ctx contex result.fn = client.listMoveCollectionsBySubscriptionNextResults req, err := client.ListMoveCollectionsBySubscriptionPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ListMoveCollectionsBySubscription", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ListMoveCollectionsBySubscription", nil, "Failure preparing request") return } resp, err := client.ListMoveCollectionsBySubscriptionSender(req) if err != nil { result.mcrl.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ListMoveCollectionsBySubscription", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ListMoveCollectionsBySubscription", resp, "Failure sending request") return } result.mcrl, err = client.ListMoveCollectionsBySubscriptionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ListMoveCollectionsBySubscription", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ListMoveCollectionsBySubscription", resp, "Failure responding to request") } if result.mcrl.hasNextLink() && result.mcrl.IsEmpty() { err = result.NextWithContext(ctx) @@ -749,7 +828,7 @@ func (client MoveCollectionsClient) ListMoveCollectionsBySubscriptionResponder(r func (client MoveCollectionsClient) listMoveCollectionsBySubscriptionNextResults(ctx context.Context, lastResults MoveCollectionResultList) (result MoveCollectionResultList, err error) { req, err := lastResults.moveCollectionResultListPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "listMoveCollectionsBySubscriptionNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "listMoveCollectionsBySubscriptionNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -757,11 +836,11 @@ func (client MoveCollectionsClient) listMoveCollectionsBySubscriptionNextResults resp, err := client.ListMoveCollectionsBySubscriptionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "listMoveCollectionsBySubscriptionNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "listMoveCollectionsBySubscriptionNextResults", resp, "Failure sending next results request") } result, err = client.ListMoveCollectionsBySubscriptionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "listMoveCollectionsBySubscriptionNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "listMoveCollectionsBySubscriptionNextResults", resp, "Failure responding to next results request") } return } @@ -804,18 +883,18 @@ func (client MoveCollectionsClient) Prepare(ctx context.Context, resourceGroupNa {TargetValue: body, Constraints: []validation.Constraint{{Target: "body", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.MoveResources", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { - return result, validation.NewError("regionmove.MoveCollectionsClient", "Prepare", err.Error()) + return result, validation.NewError("resourcemover.MoveCollectionsClient", "Prepare", err.Error()) } req, err := client.PreparePreparer(ctx, resourceGroupName, moveCollectionName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Prepare", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Prepare", nil, "Failure preparing request") return } result, err = client.PrepareSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Prepare", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Prepare", result.Response(), "Failure sending request") return } @@ -889,13 +968,13 @@ func (client MoveCollectionsClient) ResolveDependencies(ctx context.Context, res } req, err := client.ResolveDependenciesPreparer(ctx, resourceGroupName, moveCollectionName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ResolveDependencies", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ResolveDependencies", nil, "Failure preparing request") return } result, err = client.ResolveDependenciesSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "ResolveDependencies", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "ResolveDependencies", result.Response(), "Failure sending request") return } @@ -964,20 +1043,20 @@ func (client MoveCollectionsClient) Update(ctx context.Context, resourceGroupNam } req, err := client.UpdatePreparer(ctx, resourceGroupName, moveCollectionName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Update", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Update", nil, "Failure preparing request") return } resp, err := client.UpdateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Update", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Update", resp, "Failure sending request") return } result, err = client.UpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveCollectionsClient", "Update", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveCollectionsClient", "Update", resp, "Failure responding to request") } return diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/moveresources.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/moveresources.go index b56717b8aab3..54fbf62c6e47 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/moveresources.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/moveresources.go @@ -66,20 +66,22 @@ func (client MoveResourcesClient) Create(ctx context.Context, resourceGroupName Chain: []validation.Constraint{{Target: "body.Properties.SourceID", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.Properties.ResourceSettings", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.Properties.ResourceSettings.TargetResourceName", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "body.Properties.SourceResourceSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.Properties.SourceResourceSettings.TargetResourceName", Name: validation.Null, Rule: true, Chain: nil}}}, }}, }}}}}); err != nil { - return result, validation.NewError("regionmove.MoveResourcesClient", "Create", err.Error()) + return result, validation.NewError("resourcemover.MoveResourcesClient", "Create", err.Error()) } req, err := client.CreatePreparer(ctx, resourceGroupName, moveCollectionName, moveResourceName, body) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Create", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Create", nil, "Failure preparing request") return } result, err = client.CreateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Create", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Create", result.Response(), "Failure sending request") return } @@ -158,13 +160,13 @@ func (client MoveResourcesClient) Delete(ctx context.Context, resourceGroupName } req, err := client.DeletePreparer(ctx, resourceGroupName, moveCollectionName, moveResourceName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Delete", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Delete", nil, "Failure preparing request") return } result, err = client.DeleteSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Delete", result.Response(), "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Delete", result.Response(), "Failure sending request") return } @@ -235,20 +237,20 @@ func (client MoveResourcesClient) Get(ctx context.Context, resourceGroupName str } req, err := client.GetPreparer(ctx, resourceGroupName, moveCollectionName, moveResourceName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "Get", resp, "Failure responding to request") } return @@ -314,20 +316,20 @@ func (client MoveResourcesClient) List(ctx context.Context, resourceGroupName st result.fn = client.listNextResults req, err := client.ListPreparer(ctx, resourceGroupName, moveCollectionName, filter) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "List", nil, "Failure preparing request") return } resp, err := client.ListSender(req) if err != nil { result.mrc.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "List", resp, "Failure sending request") return } result.mrc, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "List", resp, "Failure responding to request") } if result.mrc.hasNextLink() && result.mrc.IsEmpty() { err = result.NextWithContext(ctx) @@ -382,7 +384,7 @@ func (client MoveResourcesClient) ListResponder(resp *http.Response) (result Mov func (client MoveResourcesClient) listNextResults(ctx context.Context, lastResults MoveResourceCollection) (result MoveResourceCollection, err error) { req, err := lastResults.moveResourceCollectionPreparer(ctx) if err != nil { - return result, autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "listNextResults", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "listNextResults", nil, "Failure preparing next results request") } if req == nil { return @@ -390,11 +392,11 @@ func (client MoveResourcesClient) listNextResults(ctx context.Context, lastResul resp, err := client.ListSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "listNextResults", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "listNextResults", resp, "Failure sending next results request") } result, err = client.ListResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.MoveResourcesClient", "listNextResults", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "resourcemover.MoveResourcesClient", "listNextResults", resp, "Failure responding to next results request") } return } diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/operationsdiscovery.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/operationsdiscovery.go index 16f12488773c..3b5b791c142b 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/operationsdiscovery.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/operationsdiscovery.go @@ -57,20 +57,20 @@ func (client OperationsDiscoveryClient) Get(ctx context.Context) (result Operati } req, err := client.GetPreparer(ctx) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.OperationsDiscoveryClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.OperationsDiscoveryClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.OperationsDiscoveryClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.OperationsDiscoveryClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.OperationsDiscoveryClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.OperationsDiscoveryClient", "Get", resp, "Failure responding to request") } return diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/resourcemoverapi/interfaces.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/resourcemoverapi/interfaces.go index e831f00db7c6..71e09390ce04 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/resourcemoverapi/interfaces.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/resourcemoverapi/interfaces.go @@ -24,12 +24,13 @@ import ( // MoveCollectionsClientAPI contains the set of methods on the MoveCollectionsClient type. type MoveCollectionsClientAPI interface { + BulkRemove(ctx context.Context, resourceGroupName string, moveCollectionName string, body *resourcemover.BulkRemoveRequest) (result resourcemover.MoveCollectionsBulkRemoveFuture, err error) Commit(ctx context.Context, resourceGroupName string, moveCollectionName string, body *resourcemover.CommitRequest) (result resourcemover.MoveCollectionsCommitFuture, err error) Create(ctx context.Context, resourceGroupName string, moveCollectionName string, body *resourcemover.MoveCollection) (result resourcemover.MoveCollection, err error) Delete(ctx context.Context, resourceGroupName string, moveCollectionName string) (result resourcemover.MoveCollectionsDeleteFuture, err error) Discard(ctx context.Context, resourceGroupName string, moveCollectionName string, body *resourcemover.DiscardRequest) (result resourcemover.MoveCollectionsDiscardFuture, err error) Get(ctx context.Context, resourceGroupName string, moveCollectionName string) (result resourcemover.MoveCollection, err error) - InitiateMove(ctx context.Context, resourceGroupName string, moveCollectionName string, body *resourcemover.ResourceMoveRequest) (result resourcemover.MoveCollectionsInitiateMoveFuture, err error) + InitiateMove(ctx context.Context, resourceGroupName string, moveCollectionName string, body *resourcemover.ResourceMoveRequestType) (result resourcemover.MoveCollectionsInitiateMoveFuture, err error) ListMoveCollectionsByResourceGroup(ctx context.Context, resourceGroupName string) (result resourcemover.MoveCollectionResultListPage, err error) ListMoveCollectionsByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result resourcemover.MoveCollectionResultListIterator, err error) ListMoveCollectionsBySubscription(ctx context.Context) (result resourcemover.MoveCollectionResultListPage, err error) diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/unresolveddependencies.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/unresolveddependencies.go index 7d00d4185f9d..68f47c6b5184 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/unresolveddependencies.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/unresolveddependencies.go @@ -60,20 +60,20 @@ func (client UnresolvedDependenciesClient) Get(ctx context.Context, resourceGrou } req, err := client.GetPreparer(ctx, resourceGroupName, moveCollectionName) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.UnresolvedDependenciesClient", "Get", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resourcemover.UnresolvedDependenciesClient", "Get", nil, "Failure preparing request") return } resp, err := client.GetSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "regionmove.UnresolvedDependenciesClient", "Get", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resourcemover.UnresolvedDependenciesClient", "Get", resp, "Failure sending request") return } result, err = client.GetResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "regionmove.UnresolvedDependenciesClient", "Get", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resourcemover.UnresolvedDependenciesClient", "Get", resp, "Failure responding to request") } return diff --git a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/version.go b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/version.go index 873c81e1c26c..c1e2dd5ca783 100644 --- a/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/version.go +++ b/services/preview/resourcemover/mgmt/2019-10-01-preview/resourcemover/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() + " regionmove/2019-10-01-preview" + return "Azure-SDK-For-Go/" + Version() + " resourcemover/2019-10-01-preview" } // Version returns the semantic version (see http://semver.org) of the client.