diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 96d21aa5b1cd..668062c13656 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -192,6 +192,7 @@ com.azure.resourcemanager:azure-resourcemanager-loganalytics;1.0.0-beta.1;1.0.0-
com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-healthbot;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-confluent;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-resourcemover;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
diff --git a/pom.xml b/pom.xml
index 8fdda9376416..1f9af398a435 100644
--- a/pom.xml
+++ b/pom.xml
@@ -575,6 +575,7 @@
sdk/recoveryservices
sdk/relay
sdk/resourcemanager
+ sdk/resourcemover
sdk/schemaregistry
sdk/search
sdk/servicebus
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md b/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md
new file mode 100644
index 000000000000..6a6e4eaa4ffe
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-01-18)
+
+- Azure Resource Manager ResourceMover client library for Java. This package contains Microsoft Azure SDK for ResourceMover Management SDK. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2019-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
\ No newline at end of file
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md b/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md
new file mode 100644
index 000000000000..f20c57462b49
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/README.md
@@ -0,0 +1,83 @@
+# Azure Resource Manager ResourceMover client library for Java
+
+Azure Resource Manager ResourceMover client library for Java.
+
+This package contains Microsoft Azure SDK for ResourceMover Management SDK. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2019-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-resourcemover;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-resourcemover
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+ResourceMoverManager manager = ResourceMoverManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml b/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml
new file mode 100644
index 000000000000..18f7b15d06be
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/pom.xml
@@ -0,0 +1,62 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-resourcemover
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for ResourceMover Management
+ This package contains Microsoft Azure SDK for ResourceMover Management SDK. A first party Azure service orchestrating the move of Azure resources from one Azure region to another or between zones within a region. Package tag package-2019-10-01-preview. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core-management
+ 1.1.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java
new file mode 100644
index 000000000000..2ccd64235439
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/ResourceMoverManager.java
@@ -0,0 +1,240 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.fluent.ResourceMoverServiceApi;
+import com.azure.resourcemanager.resourcemover.implementation.MoveCollectionsImpl;
+import com.azure.resourcemanager.resourcemover.implementation.MoveResourcesImpl;
+import com.azure.resourcemanager.resourcemover.implementation.OperationsDiscoveriesImpl;
+import com.azure.resourcemanager.resourcemover.implementation.ResourceMoverServiceApiBuilder;
+import com.azure.resourcemanager.resourcemover.implementation.UnresolvedDependenciesImpl;
+import com.azure.resourcemanager.resourcemover.models.MoveCollections;
+import com.azure.resourcemanager.resourcemover.models.MoveResources;
+import com.azure.resourcemanager.resourcemover.models.OperationsDiscoveries;
+import com.azure.resourcemanager.resourcemover.models.UnresolvedDependencies;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * Entry point to ResourceMoverManager. A first party Azure service orchestrating the move of Azure resources from one
+ * Azure region to another or between zones within a region.
+ */
+public final class ResourceMoverManager {
+ private MoveCollections moveCollections;
+
+ private MoveResources moveResources;
+
+ private UnresolvedDependencies unresolvedDependencies;
+
+ private OperationsDiscoveries operationsDiscoveries;
+
+ private final ResourceMoverServiceApi clientObject;
+
+ private ResourceMoverManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new ResourceMoverServiceApiBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of ResourceMover service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ResourceMover service API instance.
+ */
+ public static ResourceMoverManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create ResourceMoverManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new ResourceMoverManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of ResourceMover service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the ResourceMover service API instance.
+ */
+ public ResourceMoverManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies
+ .add(
+ new UserAgentPolicy(
+ null,
+ "com.azure.resourcemanager.resourcemover",
+ "1.0.0-beta.1",
+ Configuration.getGlobalConfiguration()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies
+ .add(
+ new BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new ResourceMoverManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of MoveCollections. */
+ public MoveCollections moveCollections() {
+ if (this.moveCollections == null) {
+ this.moveCollections = new MoveCollectionsImpl(clientObject.getMoveCollections(), this);
+ }
+ return moveCollections;
+ }
+
+ /** @return Resource collection API of MoveResources. */
+ public MoveResources moveResources() {
+ if (this.moveResources == null) {
+ this.moveResources = new MoveResourcesImpl(clientObject.getMoveResources(), this);
+ }
+ return moveResources;
+ }
+
+ /** @return Resource collection API of UnresolvedDependencies. */
+ public UnresolvedDependencies unresolvedDependencies() {
+ if (this.unresolvedDependencies == null) {
+ this.unresolvedDependencies =
+ new UnresolvedDependenciesImpl(clientObject.getUnresolvedDependencies(), this);
+ }
+ return unresolvedDependencies;
+ }
+
+ /** @return Resource collection API of OperationsDiscoveries. */
+ public OperationsDiscoveries operationsDiscoveries() {
+ if (this.operationsDiscoveries == null) {
+ this.operationsDiscoveries = new OperationsDiscoveriesImpl(clientObject.getOperationsDiscoveries(), this);
+ }
+ return operationsDiscoveries;
+ }
+
+ /**
+ * @return Wrapped service client ResourceMoverServiceApi providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ */
+ public ResourceMoverServiceApi serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java
new file mode 100644
index 000000000000..e5ebf2ca160f
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveCollectionsClient.java
@@ -0,0 +1,709 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest;
+import com.azure.resourcemanager.resourcemover.models.CommitRequest;
+import com.azure.resourcemanager.resourcemover.models.DiscardRequest;
+import com.azure.resourcemanager.resourcemover.models.PrepareRequest;
+import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest;
+import com.azure.resourcemanager.resourcemover.models.UpdateMoveCollectionRequest;
+
+/** An instance of this class provides access to all the operations defined in MoveCollectionsClient. */
+public interface MoveCollectionsClient {
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveCollectionInner create(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Define the move collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ String resourceGroupName, String moveCollectionName, MoveCollectionInner body, Context context);
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveCollectionInner update(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for updating move collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String moveCollectionName, UpdateMoveCollectionRequest body, Context context);
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName, Context context);
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner delete(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner delete(String resourceGroupName, String moveCollectionName, Context context);
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveCollectionInner getByResourceGroup(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String moveCollectionName, Context context);
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginPrepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body);
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginPrepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context);
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner prepare(String resourceGroupName, String moveCollectionName, PrepareRequest body);
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner prepare(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner prepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context);
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginInitiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body);
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginInitiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context);
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner initiateMove(String resourceGroupName, String moveCollectionName, ResourceMoveRequest body);
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner initiateMove(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner initiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context);
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginCommit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body);
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginCommit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context);
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner commit(String resourceGroupName, String moveCollectionName, CommitRequest body);
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner commit(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner commit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context);
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginDiscard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body);
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginDiscard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context);
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner discard(String resourceGroupName, String moveCollectionName, DiscardRequest body);
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner discard(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner discard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context);
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginResolveDependencies(
+ String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginResolveDependencies(
+ String resourceGroupName, String moveCollectionName, Context context);
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner resolveDependencies(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner resolveDependencies(String resourceGroupName, String moveCollectionName, Context context);
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginBulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body);
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginBulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context);
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner bulkRemove(String resourceGroupName, String moveCollectionName, BulkRemoveRequest body);
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner bulkRemove(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner bulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context);
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java
new file mode 100644
index 000000000000..ce8354ba96ff
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/MoveResourcesClient.java
@@ -0,0 +1,227 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+
+/** An instance of this class provides access to all the operations defined in MoveResourcesClient. */
+public interface MoveResourcesClient {
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param filter The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState
+ * eq 'Succeeded'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(
+ String resourceGroupName, String moveCollectionName, String filter, Context context);
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, MoveResourceInner> beginCreate(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body);
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, MoveResourceInner> beginCreate(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context);
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveResourceInner create(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body);
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveResourceInner create(String resourceGroupName, String moveCollectionName, String moveResourceName);
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveResourceInner create(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context);
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName);
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context);
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner delete(String resourceGroupName, String moveCollectionName, String moveResourceName);
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationStatusInner delete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context);
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MoveResourceInner get(String resourceGroupName, String moveCollectionName, String moveResourceName);
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context);
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java
new file mode 100644
index 000000000000..06f4b555d6f1
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/OperationsDiscoveriesClient.java
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationsDiscoveryCollectionInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsDiscoveriesClient. */
+public interface OperationsDiscoveriesClient {
+ /**
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationsDiscoveryCollectionInner get();
+
+ /**
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(Context context);
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/ResourceMoverServiceApi.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/ResourceMoverServiceApi.java
new file mode 100644
index 000000000000..6266683ef69f
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/ResourceMoverServiceApi.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for ResourceMoverServiceApi class. */
+public interface ResourceMoverServiceApi {
+ /**
+ * Gets The Subscription ID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the MoveCollectionsClient object to access its operations.
+ *
+ * @return the MoveCollectionsClient object.
+ */
+ MoveCollectionsClient getMoveCollections();
+
+ /**
+ * Gets the MoveResourcesClient object to access its operations.
+ *
+ * @return the MoveResourcesClient object.
+ */
+ MoveResourcesClient getMoveResources();
+
+ /**
+ * Gets the UnresolvedDependenciesClient object to access its operations.
+ *
+ * @return the UnresolvedDependenciesClient object.
+ */
+ UnresolvedDependenciesClient getUnresolvedDependencies();
+
+ /**
+ * Gets the OperationsDiscoveriesClient object to access its operations.
+ *
+ * @return the OperationsDiscoveriesClient object.
+ */
+ OperationsDiscoveriesClient getOperationsDiscoveries();
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java
new file mode 100644
index 000000000000..2e38bc3d93ed
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/UnresolvedDependenciesClient.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcemover.fluent.models.UnresolvedDependencyCollectionInner;
+
+/** An instance of this class provides access to all the operations defined in UnresolvedDependenciesClient. */
+public interface UnresolvedDependenciesClient {
+ /**
+ * Gets a list of unresolved dependencies.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of unresolved dependencies.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UnresolvedDependencyCollectionInner get(String resourceGroupName, String moveCollectionName);
+
+ /**
+ * Gets a list of unresolved dependencies.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of unresolved dependencies.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String moveCollectionName, Context context);
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java
new file mode 100644
index 000000000000..be2a02a6a018
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveCollectionInner.java
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.models.Identity;
+import com.azure.resourcemanager.resourcemover.models.MoveCollectionProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Define the move collection. */
+@Fluent
+public final class MoveCollectionInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionInner.class);
+
+ /*
+ * The etag of the resource.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /*
+ * Defines the MSI properties of the Move Collection.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /*
+ * Defines the move collection properties.
+ */
+ @JsonProperty(value = "properties")
+ private MoveCollectionProperties properties;
+
+ /**
+ * Get the etag property: The etag of the resource.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the identity property: Defines the MSI properties of the Move Collection.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Defines the MSI properties of the Move Collection.
+ *
+ * @param identity the identity value to set.
+ * @return the MoveCollectionInner object itself.
+ */
+ public MoveCollectionInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the properties property: Defines the move collection properties.
+ *
+ * @return the properties value.
+ */
+ public MoveCollectionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Defines the move collection properties.
+ *
+ * @param properties the properties value to set.
+ * @return the MoveCollectionInner object itself.
+ */
+ public MoveCollectionInner withProperties(MoveCollectionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MoveCollectionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public MoveCollectionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java
new file mode 100644
index 000000000000..e4fb6c882a70
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/MoveResourceInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.models.MoveResourceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Defines the move resource. */
+@Fluent
+public final class MoveResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourceInner.class);
+
+ /*
+ * Defines the move resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private MoveResourceProperties properties;
+
+ /**
+ * Get the properties property: Defines the move resource properties.
+ *
+ * @return the properties value.
+ */
+ public MoveResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Defines the move resource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the MoveResourceInner object itself.
+ */
+ public MoveResourceInner withProperties(MoveResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..0a331aaeb9b5
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationStatusInner.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.models.OperationStatusError;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Operation status REST resource. */
+@Immutable
+public final class OperationStatusInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusInner.class);
+
+ /*
+ * Resource Id.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * Operation name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Status of the operation. ARM expects the terminal status to be one of
+ * Succeeded/ Failed/ Canceled. All other values imply that the operation
+ * is still running.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private String status;
+
+ /*
+ * Start time.
+ */
+ @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String startTime;
+
+ /*
+ * End time.
+ */
+ @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String endTime;
+
+ /*
+ * Error stating all error details for the operation.
+ */
+ @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationStatusError error;
+
+ /*
+ * Custom data.
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ private Object properties;
+
+ /**
+ * Get the id property: Resource Id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: Operation name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the status property: Status of the operation. ARM expects the terminal status to be one of Succeeded/ Failed/
+ * Canceled. All other values imply that the operation is still running.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: Start time.
+ *
+ * @return the startTime value.
+ */
+ public String startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Get the endTime property: End time.
+ *
+ * @return the endTime value.
+ */
+ public String endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Get the error property: Error stating all error details for the operation.
+ *
+ * @return the error value.
+ */
+ public OperationStatusError error() {
+ return this.error;
+ }
+
+ /**
+ * Get the properties property: Custom data.
+ *
+ * @return the properties value.
+ */
+ public Object properties() {
+ return this.properties;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (error() != null) {
+ error().validate();
+ }
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java
new file mode 100644
index 000000000000..18c47e98d168
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/OperationsDiscoveryCollectionInner.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.models.OperationsDiscovery;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Collection of ClientDiscovery details. */
+@Fluent
+public final class OperationsDiscoveryCollectionInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDiscoveryCollectionInner.class);
+
+ /*
+ * Gets or sets the ClientDiscovery details.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * Gets or sets the value of next link.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: Gets or sets the ClientDiscovery details.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Gets or sets the ClientDiscovery details.
+ *
+ * @param value the value value to set.
+ * @return the OperationsDiscoveryCollectionInner object itself.
+ */
+ public OperationsDiscoveryCollectionInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: Gets or sets the value of next link.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: Gets or sets the value of next link.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the OperationsDiscoveryCollectionInner object itself.
+ */
+ public OperationsDiscoveryCollectionInner withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyCollectionInner.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyCollectionInner.java
new file mode 100644
index 000000000000..9d4bf282c22d
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/UnresolvedDependencyCollectionInner.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.models.UnresolvedDependency;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Unresolved dependency collection. */
+@Fluent
+public final class UnresolvedDependencyCollectionInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UnresolvedDependencyCollectionInner.class);
+
+ /*
+ * Gets or sets the list of unresolved dependencies.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * Gets or sets the value of next link.
+ */
+ @JsonProperty(value = "nextLink")
+ private String nextLink;
+
+ /**
+ * Get the value property: Gets or sets the list of unresolved dependencies.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Gets or sets the list of unresolved dependencies.
+ *
+ * @param value the value value to set.
+ * @return the UnresolvedDependencyCollectionInner object itself.
+ */
+ public UnresolvedDependencyCollectionInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: Gets or sets the value of next link.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: Gets or sets the value of next link.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the UnresolvedDependencyCollectionInner object itself.
+ */
+ public UnresolvedDependencyCollectionInner withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/package-info.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/package-info.java
new file mode 100644
index 000000000000..407e88f08e3c
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for ResourceMoverServiceApi. A first party Azure service orchestrating the
+ * move of Azure resources from one Azure region to another or between zones within a region.
+ */
+package com.azure.resourcemanager.resourcemover.fluent.models;
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/package-info.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/package-info.java
new file mode 100644
index 000000000000..e4b14aa9f03d
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for ResourceMoverServiceApi. A first party Azure service orchestrating the
+ * move of Azure resources from one Azure region to another or between zones within a region.
+ */
+package com.azure.resourcemanager.resourcemover.fluent;
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java
new file mode 100644
index 000000000000..4130f538ad40
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionImpl.java
@@ -0,0 +1,277 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcemover.ResourceMoverManager;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner;
+import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest;
+import com.azure.resourcemanager.resourcemover.models.CommitRequest;
+import com.azure.resourcemanager.resourcemover.models.DiscardRequest;
+import com.azure.resourcemanager.resourcemover.models.Identity;
+import com.azure.resourcemanager.resourcemover.models.MoveCollection;
+import com.azure.resourcemanager.resourcemover.models.MoveCollectionProperties;
+import com.azure.resourcemanager.resourcemover.models.OperationStatus;
+import com.azure.resourcemanager.resourcemover.models.PrepareRequest;
+import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest;
+import com.azure.resourcemanager.resourcemover.models.UpdateMoveCollectionRequest;
+import java.util.Collections;
+import java.util.Map;
+
+public final class MoveCollectionImpl implements MoveCollection, MoveCollection.Definition, MoveCollection.Update {
+ private MoveCollectionInner innerObject;
+
+ private final ResourceMoverManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public Identity identity() {
+ return this.innerModel().identity();
+ }
+
+ public MoveCollectionProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public MoveCollectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private ResourceMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String moveCollectionName;
+
+ private UpdateMoveCollectionRequest updateBody;
+
+ public MoveCollectionImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public MoveCollection create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveCollections()
+ .createWithResponse(resourceGroupName, moveCollectionName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public MoveCollection create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveCollections()
+ .createWithResponse(resourceGroupName, moveCollectionName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ MoveCollectionImpl(String name, ResourceMoverManager serviceManager) {
+ this.innerObject = new MoveCollectionInner();
+ this.serviceManager = serviceManager;
+ this.moveCollectionName = name;
+ }
+
+ public MoveCollectionImpl update() {
+ this.updateBody = new UpdateMoveCollectionRequest();
+ return this;
+ }
+
+ public MoveCollection apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveCollections()
+ .updateWithResponse(resourceGroupName, moveCollectionName, updateBody, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public MoveCollection apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveCollections()
+ .updateWithResponse(resourceGroupName, moveCollectionName, updateBody, context)
+ .getValue();
+ return this;
+ }
+
+ MoveCollectionImpl(MoveCollectionInner innerObject, ResourceMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.moveCollectionName = Utils.getValueFromIdByName(innerObject.id(), "moveCollections");
+ }
+
+ public MoveCollection refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveCollections()
+ .getByResourceGroupWithResponse(resourceGroupName, moveCollectionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public MoveCollection refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveCollections()
+ .getByResourceGroupWithResponse(resourceGroupName, moveCollectionName, context)
+ .getValue();
+ return this;
+ }
+
+ public OperationStatus prepare(PrepareRequest body) {
+ return serviceManager.moveCollections().prepare(resourceGroupName, moveCollectionName, body);
+ }
+
+ public OperationStatus prepare() {
+ return serviceManager.moveCollections().prepare(resourceGroupName, moveCollectionName);
+ }
+
+ public OperationStatus prepare(PrepareRequest body, Context context) {
+ return serviceManager.moveCollections().prepare(resourceGroupName, moveCollectionName, body, context);
+ }
+
+ public OperationStatus initiateMove(ResourceMoveRequest body) {
+ return serviceManager.moveCollections().initiateMove(resourceGroupName, moveCollectionName, body);
+ }
+
+ public OperationStatus initiateMove() {
+ return serviceManager.moveCollections().initiateMove(resourceGroupName, moveCollectionName);
+ }
+
+ public OperationStatus initiateMove(ResourceMoveRequest body, Context context) {
+ return serviceManager.moveCollections().initiateMove(resourceGroupName, moveCollectionName, body, context);
+ }
+
+ public OperationStatus commit(CommitRequest body) {
+ return serviceManager.moveCollections().commit(resourceGroupName, moveCollectionName, body);
+ }
+
+ public OperationStatus commit() {
+ return serviceManager.moveCollections().commit(resourceGroupName, moveCollectionName);
+ }
+
+ public OperationStatus commit(CommitRequest body, Context context) {
+ return serviceManager.moveCollections().commit(resourceGroupName, moveCollectionName, body, context);
+ }
+
+ public OperationStatus discard(DiscardRequest body) {
+ return serviceManager.moveCollections().discard(resourceGroupName, moveCollectionName, body);
+ }
+
+ public OperationStatus discard() {
+ return serviceManager.moveCollections().discard(resourceGroupName, moveCollectionName);
+ }
+
+ public OperationStatus discard(DiscardRequest body, Context context) {
+ return serviceManager.moveCollections().discard(resourceGroupName, moveCollectionName, body, context);
+ }
+
+ public OperationStatus resolveDependencies() {
+ return serviceManager.moveCollections().resolveDependencies(resourceGroupName, moveCollectionName);
+ }
+
+ public OperationStatus resolveDependencies(Context context) {
+ return serviceManager.moveCollections().resolveDependencies(resourceGroupName, moveCollectionName, context);
+ }
+
+ public OperationStatus bulkRemove(BulkRemoveRequest body) {
+ return serviceManager.moveCollections().bulkRemove(resourceGroupName, moveCollectionName, body);
+ }
+
+ public OperationStatus bulkRemove() {
+ return serviceManager.moveCollections().bulkRemove(resourceGroupName, moveCollectionName);
+ }
+
+ public OperationStatus bulkRemove(BulkRemoveRequest body, Context context) {
+ return serviceManager.moveCollections().bulkRemove(resourceGroupName, moveCollectionName, body, context);
+ }
+
+ public MoveCollectionImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public MoveCollectionImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public MoveCollectionImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateBody.withTags(tags);
+ return this;
+ }
+ }
+
+ public MoveCollectionImpl withIdentity(Identity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateBody.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public MoveCollectionImpl withProperties(MoveCollectionProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java
new file mode 100644
index 000000000000..291fbfcd7993
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsClientImpl.java
@@ -0,0 +1,3410 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.resourcemover.fluent.MoveCollectionsClient;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest;
+import com.azure.resourcemanager.resourcemover.models.CommitRequest;
+import com.azure.resourcemanager.resourcemover.models.DiscardRequest;
+import com.azure.resourcemanager.resourcemover.models.MoveCollectionResultList;
+import com.azure.resourcemanager.resourcemover.models.PrepareRequest;
+import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest;
+import com.azure.resourcemanager.resourcemover.models.UpdateMoveCollectionRequest;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in MoveCollectionsClient. */
+public final class MoveCollectionsClientImpl implements MoveCollectionsClient {
+ private final ClientLogger logger = new ClientLogger(MoveCollectionsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final MoveCollectionsService service;
+
+ /** The service client containing this operation class. */
+ private final ResourceMoverServiceApiImpl client;
+
+ /**
+ * Initializes an instance of MoveCollectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ MoveCollectionsClientImpl(ResourceMoverServiceApiImpl client) {
+ this.service =
+ RestProxy.create(MoveCollectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ResourceMoverServiceApiMoveCollections to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ResourceMoverService")
+ private interface MoveCollectionsService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MoveCollectionInner body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") UpdateMoveCollectionRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/prepare")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> prepare(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") PrepareRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/initiateMove")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> initiateMove(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") ResourceMoveRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/commit")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> commit(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") CommitRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/discard")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> discard(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DiscardRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/resolveDependencies")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> resolveDependencies(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/bulkRemove")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> bulkRemove(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") BulkRemoveRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Migrate/moveCollections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listMoveCollectionsBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listMoveCollectionsByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Define the move collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, MoveCollectionInner body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Define the move collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, MoveCollectionInner body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Define the move collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String moveCollectionName, MoveCollectionInner body) {
+ return createWithResponseAsync(resourceGroupName, moveCollectionName, body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String moveCollectionName) {
+ final MoveCollectionInner body = null;
+ return createWithResponseAsync(resourceGroupName, moveCollectionName, body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveCollectionInner create(String resourceGroupName, String moveCollectionName) {
+ final MoveCollectionInner body = null;
+ return createAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Creates or updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Define the move collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(
+ String resourceGroupName, String moveCollectionName, MoveCollectionInner body, Context context) {
+ return createWithResponseAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for updating move collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, UpdateMoveCollectionRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for updating move collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, UpdateMoveCollectionRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for updating move collection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String moveCollectionName, UpdateMoveCollectionRequest body) {
+ return updateWithResponseAsync(resourceGroupName, moveCollectionName, body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String moveCollectionName) {
+ final UpdateMoveCollectionRequest body = null;
+ return updateWithResponseAsync(resourceGroupName, moveCollectionName, body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveCollectionInner update(String resourceGroupName, String moveCollectionName) {
+ final UpdateMoveCollectionRequest body = null;
+ return updateAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Updates a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for updating move collection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return define the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String moveCollectionName, UpdateMoveCollectionRequest body, Context context) {
+ return updateWithResponseAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String moveCollectionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginDeleteAsync(
+ String resourceGroupName, String moveCollectionName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, moveCollectionName);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginDeleteAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, moveCollectionName, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String moveCollectionName) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner delete(String resourceGroupName, String moveCollectionName) {
+ return deleteAsync(resourceGroupName, moveCollectionName).block();
+ }
+
+ /**
+ * Deletes a move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner delete(String resourceGroupName, String moveCollectionName, Context context) {
+ return deleteAsync(resourceGroupName, moveCollectionName, context).block();
+ }
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String moveCollectionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String moveCollectionName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, moveCollectionName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveCollectionInner getByResourceGroup(String resourceGroupName, String moveCollectionName) {
+ return getByResourceGroupAsync(resourceGroupName, moveCollectionName).block();
+ }
+
+ /**
+ * Gets the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the move collection.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, moveCollectionName, context).block();
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> prepareWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .prepare(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> prepareWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .prepare(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginPrepareAsync(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body) {
+ Mono>> mono = prepareWithResponseAsync(resourceGroupName, moveCollectionName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginPrepareAsync(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ prepareWithResponseAsync(resourceGroupName, moveCollectionName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginPrepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body) {
+ return beginPrepareAsync(resourceGroupName, moveCollectionName, body).getSyncPoller();
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginPrepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) {
+ return beginPrepareAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono prepareAsync(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body) {
+ return beginPrepareAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono prepareAsync(String resourceGroupName, String moveCollectionName) {
+ final PrepareRequest body = null;
+ return beginPrepareAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono prepareAsync(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) {
+ return beginPrepareAsync(resourceGroupName, moveCollectionName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner prepare(String resourceGroupName, String moveCollectionName, PrepareRequest body) {
+ return prepareAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner prepare(String resourceGroupName, String moveCollectionName) {
+ final PrepareRequest body = null;
+ return prepareAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Initiates prepare for the set of resources included in the request body. The prepare operation is on the
+ * moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the
+ * moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client
+ * can call operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for initiate prepare operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner prepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) {
+ return prepareAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> initiateMoveWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .initiateMove(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> initiateMoveWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .initiateMove(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginInitiateMoveAsync(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) {
+ Mono>> mono =
+ initiateMoveWithResponseAsync(resourceGroupName, moveCollectionName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginInitiateMoveAsync(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ initiateMoveWithResponseAsync(resourceGroupName, moveCollectionName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginInitiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) {
+ return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body).getSyncPoller();
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginInitiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) {
+ return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono initiateMoveAsync(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) {
+ return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono initiateMoveAsync(String resourceGroupName, String moveCollectionName) {
+ final ResourceMoveRequest body = null;
+ return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono initiateMoveAsync(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) {
+ return beginInitiateMoveAsync(resourceGroupName, moveCollectionName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner initiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) {
+ return initiateMoveAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner initiateMove(String resourceGroupName, String moveCollectionName) {
+ final ResourceMoveRequest body = null;
+ return initiateMoveAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Moves the set of resources included in the request body. The move operation is triggered after the moveResources
+ * are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a
+ * transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for resource move operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner initiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) {
+ return initiateMoveAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> commitWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, CommitRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .commit(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> commitWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .commit(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginCommitAsync(
+ String resourceGroupName, String moveCollectionName, CommitRequest body) {
+ Mono>> mono = commitWithResponseAsync(resourceGroupName, moveCollectionName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginCommitAsync(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ commitWithResponseAsync(resourceGroupName, moveCollectionName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginCommit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body) {
+ return beginCommitAsync(resourceGroupName, moveCollectionName, body).getSyncPoller();
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginCommit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) {
+ return beginCommitAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller();
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono commitAsync(
+ String resourceGroupName, String moveCollectionName, CommitRequest body) {
+ return beginCommitAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono commitAsync(String resourceGroupName, String moveCollectionName) {
+ final CommitRequest body = null;
+ return beginCommitAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono commitAsync(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) {
+ return beginCommitAsync(resourceGroupName, moveCollectionName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner commit(String resourceGroupName, String moveCollectionName, CommitRequest body) {
+ return commitAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner commit(String resourceGroupName, String moveCollectionName) {
+ final CommitRequest body = null;
+ return commitAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * 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 with
+ * validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for commit operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner commit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) {
+ return commitAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> discardWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .discard(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> discardWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .discard(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginDiscardAsync(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body) {
+ Mono>> mono = discardWithResponseAsync(resourceGroupName, moveCollectionName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginDiscardAsync(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ discardWithResponseAsync(resourceGroupName, moveCollectionName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginDiscard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body) {
+ return beginDiscardAsync(resourceGroupName, moveCollectionName, body).getSyncPoller();
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginDiscard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) {
+ return beginDiscardAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono discardAsync(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body) {
+ return beginDiscardAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono discardAsync(String resourceGroupName, String moveCollectionName) {
+ final DiscardRequest body = null;
+ return beginDiscardAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono discardAsync(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) {
+ return beginDiscardAsync(resourceGroupName, moveCollectionName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner discard(String resourceGroupName, String moveCollectionName, DiscardRequest body) {
+ return discardAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner discard(String resourceGroupName, String moveCollectionName) {
+ final DiscardRequest body = null;
+ return discardAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * Discards the set of resources included in the request body. The discard operation is triggered on the
+ * moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource
+ * moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call
+ * operation with validateOnly property set to true.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param body Defines the request body for discard operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner discard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) {
+ return discardAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> resolveDependenciesWithResponseAsync(
+ String resourceGroupName, String moveCollectionName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .resolveDependencies(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> resolveDependenciesWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .resolveDependencies(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginResolveDependenciesAsync(
+ String resourceGroupName, String moveCollectionName) {
+ Mono>> mono =
+ resolveDependenciesWithResponseAsync(resourceGroupName, moveCollectionName);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginResolveDependenciesAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ resolveDependenciesWithResponseAsync(resourceGroupName, moveCollectionName, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginResolveDependencies(
+ String resourceGroupName, String moveCollectionName) {
+ return beginResolveDependenciesAsync(resourceGroupName, moveCollectionName).getSyncPoller();
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginResolveDependencies(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ return beginResolveDependenciesAsync(resourceGroupName, moveCollectionName, context).getSyncPoller();
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono resolveDependenciesAsync(String resourceGroupName, String moveCollectionName) {
+ return beginResolveDependenciesAsync(resourceGroupName, moveCollectionName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono resolveDependenciesAsync(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ return beginResolveDependenciesAsync(resourceGroupName, moveCollectionName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner resolveDependencies(String resourceGroupName, String moveCollectionName) {
+ return resolveDependenciesAsync(resourceGroupName, moveCollectionName).block();
+ }
+
+ /**
+ * Computes, resolves and validate the dependencies of the moveResources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner resolveDependencies(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ return resolveDependenciesAsync(resourceGroupName, moveCollectionName, context).block();
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> bulkRemoveWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .bulkRemove(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> bulkRemoveWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .bulkRemove(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginBulkRemoveAsync(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) {
+ Mono>> mono =
+ bulkRemoveWithResponseAsync(resourceGroupName, moveCollectionName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginBulkRemoveAsync(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ bulkRemoveWithResponseAsync(resourceGroupName, moveCollectionName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginBulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) {
+ return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body).getSyncPoller();
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginBulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) {
+ return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body, context).getSyncPoller();
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono bulkRemoveAsync(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) {
+ return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono bulkRemoveAsync(String resourceGroupName, String moveCollectionName) {
+ final BulkRemoveRequest body = null;
+ return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono bulkRemoveAsync(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) {
+ return beginBulkRemoveAsync(resourceGroupName, moveCollectionName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner bulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) {
+ return bulkRemoveAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner bulkRemove(String resourceGroupName, String moveCollectionName) {
+ final BulkRemoveRequest body = null;
+ return bulkRemoveAsync(resourceGroupName, moveCollectionName, body).block();
+ }
+
+ /**
+ * 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.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param moveCollectionName The moveCollectionName parameter.
+ * @param body Defines the request body for bulk remove of move resources operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner bulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) {
+ return bulkRemoveAsync(resourceGroupName, moveCollectionName, body, context).block();
+ }
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listMoveCollectionsBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context),
+ nextLink -> listMoveCollectionsBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Get all the Move Collections in the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listMoveCollectionsByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listMoveCollectionsByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Get all the Move Collections in the resource group.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all the Move Collections in the resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move collections.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listMoveCollectionsBySubscriptionNextSinglePageAsync(
+ String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service.listMoveCollectionsBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move collections.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listMoveCollectionsBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listMoveCollectionsBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move collections.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listMoveCollectionsByResourceGroupNextSinglePageAsync(
+ String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listMoveCollectionsByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move collections.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listMoveCollectionsByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listMoveCollectionsByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java
new file mode 100644
index 000000000000..801ab1e1995e
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveCollectionsImpl.java
@@ -0,0 +1,352 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.ResourceMoverManager;
+import com.azure.resourcemanager.resourcemover.fluent.MoveCollectionsClient;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveCollectionInner;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.resourcemover.models.BulkRemoveRequest;
+import com.azure.resourcemanager.resourcemover.models.CommitRequest;
+import com.azure.resourcemanager.resourcemover.models.DiscardRequest;
+import com.azure.resourcemanager.resourcemover.models.MoveCollection;
+import com.azure.resourcemanager.resourcemover.models.MoveCollections;
+import com.azure.resourcemanager.resourcemover.models.OperationStatus;
+import com.azure.resourcemanager.resourcemover.models.PrepareRequest;
+import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class MoveCollectionsImpl implements MoveCollections {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveCollectionsImpl.class);
+
+ private final MoveCollectionsClient innerClient;
+
+ private final ResourceMoverManager serviceManager;
+
+ public MoveCollectionsImpl(MoveCollectionsClient innerClient, ResourceMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationStatus deleteByResourceGroup(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().delete(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus delete(String resourceGroupName, String moveCollectionName, Context context) {
+ OperationStatusInner inner = this.serviceClient().delete(resourceGroupName, moveCollectionName, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public MoveCollection getByResourceGroup(String resourceGroupName, String moveCollectionName) {
+ MoveCollectionInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new MoveCollectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String moveCollectionName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, moveCollectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new MoveCollectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus prepare(String resourceGroupName, String moveCollectionName, PrepareRequest body) {
+ OperationStatusInner inner = this.serviceClient().prepare(resourceGroupName, moveCollectionName, body);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus prepare(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().prepare(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus prepare(
+ String resourceGroupName, String moveCollectionName, PrepareRequest body, Context context) {
+ OperationStatusInner inner = this.serviceClient().prepare(resourceGroupName, moveCollectionName, body, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus initiateMove(String resourceGroupName, String moveCollectionName, ResourceMoveRequest body) {
+ OperationStatusInner inner = this.serviceClient().initiateMove(resourceGroupName, moveCollectionName, body);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus initiateMove(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().initiateMove(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus initiateMove(
+ String resourceGroupName, String moveCollectionName, ResourceMoveRequest body, Context context) {
+ OperationStatusInner inner =
+ this.serviceClient().initiateMove(resourceGroupName, moveCollectionName, body, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus commit(String resourceGroupName, String moveCollectionName, CommitRequest body) {
+ OperationStatusInner inner = this.serviceClient().commit(resourceGroupName, moveCollectionName, body);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus commit(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().commit(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus commit(
+ String resourceGroupName, String moveCollectionName, CommitRequest body, Context context) {
+ OperationStatusInner inner = this.serviceClient().commit(resourceGroupName, moveCollectionName, body, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus discard(String resourceGroupName, String moveCollectionName, DiscardRequest body) {
+ OperationStatusInner inner = this.serviceClient().discard(resourceGroupName, moveCollectionName, body);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus discard(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().discard(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus discard(
+ String resourceGroupName, String moveCollectionName, DiscardRequest body, Context context) {
+ OperationStatusInner inner = this.serviceClient().discard(resourceGroupName, moveCollectionName, body, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus resolveDependencies(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().resolveDependencies(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus resolveDependencies(String resourceGroupName, String moveCollectionName, Context context) {
+ OperationStatusInner inner =
+ this.serviceClient().resolveDependencies(resourceGroupName, moveCollectionName, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus bulkRemove(String resourceGroupName, String moveCollectionName, BulkRemoveRequest body) {
+ OperationStatusInner inner = this.serviceClient().bulkRemove(resourceGroupName, moveCollectionName, body);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus bulkRemove(String resourceGroupName, String moveCollectionName) {
+ OperationStatusInner inner = this.serviceClient().bulkRemove(resourceGroupName, moveCollectionName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus bulkRemove(
+ String resourceGroupName, String moveCollectionName, BulkRemoveRequest body, Context context) {
+ OperationStatusInner inner =
+ this.serviceClient().bulkRemove(resourceGroupName, moveCollectionName, body, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return inner.mapPage(inner1 -> new MoveCollectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return inner.mapPage(inner1 -> new MoveCollectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return inner.mapPage(inner1 -> new MoveCollectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return inner.mapPage(inner1 -> new MoveCollectionImpl(inner1, this.manager()));
+ }
+
+ public MoveCollection getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, moveCollectionName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, moveCollectionName, context);
+ }
+
+ public OperationStatus deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ return this.delete(resourceGroupName, moveCollectionName, Context.NONE);
+ }
+
+ public OperationStatus deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ return this.delete(resourceGroupName, moveCollectionName, context);
+ }
+
+ private MoveCollectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private ResourceMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ public MoveCollectionImpl define(String name) {
+ return new MoveCollectionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java
new file mode 100644
index 000000000000..90cb369d8b4e
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourceImpl.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.resourcemover.ResourceMoverManager;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner;
+import com.azure.resourcemanager.resourcemover.models.MoveResource;
+import com.azure.resourcemanager.resourcemover.models.MoveResourceProperties;
+
+public final class MoveResourceImpl implements MoveResource, MoveResource.Definition {
+ private MoveResourceInner innerObject;
+
+ private final ResourceMoverManager serviceManager;
+
+ MoveResourceImpl(MoveResourceInner innerObject, ResourceMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public MoveResourceProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public MoveResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private ResourceMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String moveCollectionName;
+
+ private String moveResourceName;
+
+ public MoveResourceImpl withExistingMoveCollection(String resourceGroupName, String moveCollectionName) {
+ this.resourceGroupName = resourceGroupName;
+ this.moveCollectionName = moveCollectionName;
+ return this;
+ }
+
+ public MoveResource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveResources()
+ .create(resourceGroupName, moveCollectionName, moveResourceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public MoveResource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveResources()
+ .create(resourceGroupName, moveCollectionName, moveResourceName, this.innerModel(), context);
+ return this;
+ }
+
+ MoveResourceImpl(String name, ResourceMoverManager serviceManager) {
+ this.innerObject = new MoveResourceInner();
+ this.serviceManager = serviceManager;
+ this.moveResourceName = name;
+ }
+
+ public MoveResource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveResources()
+ .getWithResponse(resourceGroupName, moveCollectionName, moveResourceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public MoveResource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getMoveResources()
+ .getWithResponse(resourceGroupName, moveCollectionName, moveResourceName, context)
+ .getValue();
+ return this;
+ }
+
+ public MoveResourceImpl withProperties(MoveResourceProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java
new file mode 100644
index 000000000000..dcbc56cdd67a
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesClientImpl.java
@@ -0,0 +1,1201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.resourcemover.fluent.MoveResourcesClient;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.resourcemover.models.MoveResourceCollection;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in MoveResourcesClient. */
+public final class MoveResourcesClientImpl implements MoveResourcesClient {
+ private final ClientLogger logger = new ClientLogger(MoveResourcesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final MoveResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final ResourceMoverServiceApiImpl client;
+
+ /**
+ * Initializes an instance of MoveResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ MoveResourcesClientImpl(ResourceMoverServiceApiImpl client) {
+ this.service =
+ RestProxy.create(MoveResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ResourceMoverServiceApiMoveResources to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ResourceMoverService")
+ private interface MoveResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/moveResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @QueryParam("api-version") String apiVersion,
+ @QueryParam("$filter") String filter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @PathParam("moveResourceName") String moveResourceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MoveResourceInner body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @PathParam("moveResourceName") String moveResourceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate"
+ + "/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("moveCollectionName") String moveCollectionName,
+ @PathParam("moveResourceName") String moveResourceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param filter The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState
+ * eq 'Succeeded'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String moveCollectionName, String filter) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ filter,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param filter The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState
+ * eq 'Succeeded'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String moveCollectionName, String filter, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ this.client.getApiVersion(),
+ filter,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param filter The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState
+ * eq 'Succeeded'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String moveCollectionName, String filter) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, moveCollectionName, filter),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String moveCollectionName) {
+ final String filter = null;
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, moveCollectionName, filter),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param filter The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState
+ * eq 'Succeeded'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String moveCollectionName, String filter, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, moveCollectionName, filter, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String moveCollectionName) {
+ final String filter = null;
+ return new PagedIterable<>(listAsync(resourceGroupName, moveCollectionName, filter));
+ }
+
+ /**
+ * Lists the Move Resources in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param filter The filter to apply on the operation. For example, you can use $filter=Properties/ProvisioningState
+ * eq 'Succeeded'.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String moveCollectionName, String filter, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, moveCollectionName, filter, context));
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (moveResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveResourceName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ moveResourceName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (moveResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveResourceName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ moveResourceName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, MoveResourceInner> beginCreateAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) {
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, moveCollectionName, moveResourceName, body);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), MoveResourceInner.class, MoveResourceInner.class, Context.NONE);
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, MoveResourceInner> beginCreateAsync(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createWithResponseAsync(resourceGroupName, moveCollectionName, moveResourceName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), MoveResourceInner.class, MoveResourceInner.class, context);
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, MoveResourceInner> beginCreate(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) {
+ return beginCreateAsync(resourceGroupName, moveCollectionName, moveResourceName, body).getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, MoveResourceInner> beginCreate(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, moveCollectionName, moveResourceName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) {
+ return beginCreateAsync(resourceGroupName, moveCollectionName, moveResourceName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ final MoveResourceInner body = null;
+ return beginCreateAsync(resourceGroupName, moveCollectionName, moveResourceName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context) {
+ return beginCreateAsync(resourceGroupName, moveCollectionName, moveResourceName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveResourceInner create(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, MoveResourceInner body) {
+ return createAsync(resourceGroupName, moveCollectionName, moveResourceName, body).block();
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveResourceInner create(String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ final MoveResourceInner body = null;
+ return createAsync(resourceGroupName, moveCollectionName, moveResourceName, body).block();
+ }
+
+ /**
+ * Creates or updates a Move Resource in the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param body Defines the move resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the move resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveResourceInner create(
+ String resourceGroupName,
+ String moveCollectionName,
+ String moveResourceName,
+ MoveResourceInner body,
+ Context context) {
+ return createAsync(resourceGroupName, moveCollectionName, moveResourceName, body, context).block();
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (moveResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveResourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ moveResourceName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (moveResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveResourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ moveResourceName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginDeleteAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, moveCollectionName, moveResourceName);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationStatusInner.class,
+ OperationStatusInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, OperationStatusInner> beginDeleteAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, moveCollectionName, moveResourceName, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), OperationStatusInner.class, OperationStatusInner.class, context);
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName, moveResourceName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, OperationStatusInner> beginDelete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName, moveResourceName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName, moveResourceName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ return beginDeleteAsync(resourceGroupName, moveCollectionName, moveResourceName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner delete(String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ return deleteAsync(resourceGroupName, moveCollectionName, moveResourceName).block();
+ }
+
+ /**
+ * Deletes a Move Resource from the move collection.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation status REST resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationStatusInner delete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ return deleteAsync(resourceGroupName, moveCollectionName, moveResourceName, context).block();
+ }
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (moveResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveResourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ moveResourceName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (moveCollectionName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveCollectionName is required and cannot be null."));
+ }
+ if (moveResourceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter moveResourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ moveCollectionName,
+ moveResourceName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ return getWithResponseAsync(resourceGroupName, moveCollectionName, moveResourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public MoveResourceInner get(String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ return getAsync(resourceGroupName, moveCollectionName, moveResourceName).block();
+ }
+
+ /**
+ * Gets the Move Resource.
+ *
+ * @param resourceGroupName The Resource Group Name.
+ * @param moveCollectionName The Move Collection Name.
+ * @param moveResourceName The Move Resource Name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Move Resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ return getWithResponseAsync(resourceGroupName, moveCollectionName, moveResourceName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return defines the collection of move resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java
new file mode 100644
index 000000000000..34e37d9572af
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/MoveResourcesImpl.java
@@ -0,0 +1,209 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.ResourceMoverManager;
+import com.azure.resourcemanager.resourcemover.fluent.MoveResourcesClient;
+import com.azure.resourcemanager.resourcemover.fluent.models.MoveResourceInner;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.resourcemover.models.MoveResource;
+import com.azure.resourcemanager.resourcemover.models.MoveResources;
+import com.azure.resourcemanager.resourcemover.models.OperationStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class MoveResourcesImpl implements MoveResources {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(MoveResourcesImpl.class);
+
+ private final MoveResourcesClient innerClient;
+
+ private final ResourceMoverManager serviceManager;
+
+ public MoveResourcesImpl(MoveResourcesClient innerClient, ResourceMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String moveCollectionName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, moveCollectionName);
+ return inner.mapPage(inner1 -> new MoveResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String moveCollectionName, String filter, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, moveCollectionName, filter, context);
+ return inner.mapPage(inner1 -> new MoveResourceImpl(inner1, this.manager()));
+ }
+
+ public OperationStatus delete(String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ OperationStatusInner inner =
+ this.serviceClient().delete(resourceGroupName, moveCollectionName, moveResourceName);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationStatus delete(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ OperationStatusInner inner =
+ this.serviceClient().delete(resourceGroupName, moveCollectionName, moveResourceName, context);
+ if (inner != null) {
+ return new OperationStatusImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public MoveResource get(String resourceGroupName, String moveCollectionName, String moveResourceName) {
+ MoveResourceInner inner = this.serviceClient().get(resourceGroupName, moveCollectionName, moveResourceName);
+ if (inner != null) {
+ return new MoveResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String moveCollectionName, String moveResourceName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, moveCollectionName, moveResourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new MoveResourceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public MoveResource getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ String moveResourceName = Utils.getValueFromIdByName(id, "moveResources");
+ if (moveResourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, moveCollectionName, moveResourceName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ String moveResourceName = Utils.getValueFromIdByName(id, "moveResources");
+ if (moveResourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, moveCollectionName, moveResourceName, context);
+ }
+
+ public OperationStatus deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ String moveResourceName = Utils.getValueFromIdByName(id, "moveResources");
+ if (moveResourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id)));
+ }
+ return this.delete(resourceGroupName, moveCollectionName, moveResourceName, Context.NONE);
+ }
+
+ public OperationStatus deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String moveCollectionName = Utils.getValueFromIdByName(id, "moveCollections");
+ if (moveCollectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'moveCollections'.", id)));
+ }
+ String moveResourceName = Utils.getValueFromIdByName(id, "moveResources");
+ if (moveResourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'moveResources'.", id)));
+ }
+ return this.delete(resourceGroupName, moveCollectionName, moveResourceName, context);
+ }
+
+ private MoveResourcesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private ResourceMoverManager manager() {
+ return this.serviceManager;
+ }
+
+ public MoveResourceImpl define(String name) {
+ return new MoveResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationStatusImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationStatusImpl.java
new file mode 100644
index 000000000000..2101df2e3b2f
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationStatusImpl.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.resourcemanager.resourcemover.ResourceMoverManager;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationStatusInner;
+import com.azure.resourcemanager.resourcemover.models.OperationStatus;
+import com.azure.resourcemanager.resourcemover.models.OperationStatusError;
+
+public final class OperationStatusImpl implements OperationStatus {
+ private OperationStatusInner innerObject;
+
+ private final ResourceMoverManager serviceManager;
+
+ OperationStatusImpl(OperationStatusInner innerObject, ResourceMoverManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public String startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public String endTime() {
+ return this.innerModel().endTime();
+ }
+
+ public OperationStatusError error() {
+ return this.innerModel().error();
+ }
+
+ public Object properties() {
+ return this.innerModel().properties();
+ }
+
+ public OperationStatusInner innerModel() {
+ return this.innerObject;
+ }
+
+ private ResourceMoverManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java
new file mode 100644
index 000000000000..ef33e1d27f38
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesClientImpl.java
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.fluent.OperationsDiscoveriesClient;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationsDiscoveryCollectionInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationsDiscoveriesClient. */
+public final class OperationsDiscoveriesClientImpl implements OperationsDiscoveriesClient {
+ private final ClientLogger logger = new ClientLogger(OperationsDiscoveriesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationsDiscoveriesService service;
+
+ /** The service client containing this operation class. */
+ private final ResourceMoverServiceApiImpl client;
+
+ /**
+ * Initializes an instance of OperationsDiscoveriesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsDiscoveriesClientImpl(ResourceMoverServiceApiImpl client) {
+ this.service =
+ RestProxy
+ .create(OperationsDiscoveriesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ResourceMoverServiceApiOperationsDiscoveries to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ResourceMoverService")
+ private interface OperationsDiscoveriesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/providers/Microsoft.Migrate/operations")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
+ }
+
+ /**
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync() {
+ return getWithResponseAsync()
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationsDiscoveryCollectionInner get() {
+ return getAsync().block();
+ }
+
+ /**
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return collection of ClientDiscovery details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(Context context) {
+ return getWithResponseAsync(context).block();
+ }
+}
diff --git a/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java
new file mode 100644
index 000000000000..7ded8459804e
--- /dev/null
+++ b/sdk/resourcemover/azure-resourcemanager-resourcemover/src/main/java/com/azure/resourcemanager/resourcemover/implementation/OperationsDiscoveriesImpl.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.resourcemover.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.resourcemover.ResourceMoverManager;
+import com.azure.resourcemanager.resourcemover.fluent.OperationsDiscoveriesClient;
+import com.azure.resourcemanager.resourcemover.fluent.models.OperationsDiscoveryCollectionInner;
+import com.azure.resourcemanager.resourcemover.models.OperationsDiscoveries;
+import com.azure.resourcemanager.resourcemover.models.OperationsDiscoveryCollection;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationsDiscoveriesImpl implements OperationsDiscoveries {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsDiscoveriesImpl.class);
+
+ private final OperationsDiscoveriesClient innerClient;
+
+ private final ResourceMoverManager serviceManager;
+
+ public OperationsDiscoveriesImpl(OperationsDiscoveriesClient innerClient, ResourceMoverManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationsDiscoveryCollection get() {
+ OperationsDiscoveryCollectionInner inner = this.serviceClient().get();
+ if (inner != null) {
+ return new OperationsDiscoveryCollectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response