scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -136,6 +179,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -147,6 +201,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -154,9 +221,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -192,20 +261,38 @@ public DataMigrationManager authenticate(TokenCredential credential, AzureProfil
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -217,6 +304,49 @@ public DataMigrationManager authenticate(TokenCredential credential, AzureProfil
}
}
+ /** @return Resource collection API of DatabaseMigrationsSqlDbs. */
+ public DatabaseMigrationsSqlDbs databaseMigrationsSqlDbs() {
+ if (this.databaseMigrationsSqlDbs == null) {
+ this.databaseMigrationsSqlDbs =
+ new DatabaseMigrationsSqlDbsImpl(clientObject.getDatabaseMigrationsSqlDbs(), this);
+ }
+ return databaseMigrationsSqlDbs;
+ }
+
+ /** @return Resource collection API of DatabaseMigrationsSqlMis. */
+ public DatabaseMigrationsSqlMis databaseMigrationsSqlMis() {
+ if (this.databaseMigrationsSqlMis == null) {
+ this.databaseMigrationsSqlMis =
+ new DatabaseMigrationsSqlMisImpl(clientObject.getDatabaseMigrationsSqlMis(), this);
+ }
+ return databaseMigrationsSqlMis;
+ }
+
+ /** @return Resource collection API of DatabaseMigrationsSqlVms. */
+ public DatabaseMigrationsSqlVms databaseMigrationsSqlVms() {
+ if (this.databaseMigrationsSqlVms == null) {
+ this.databaseMigrationsSqlVms =
+ new DatabaseMigrationsSqlVmsImpl(clientObject.getDatabaseMigrationsSqlVms(), this);
+ }
+ return databaseMigrationsSqlVms;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of SqlMigrationServices. */
+ public SqlMigrationServices sqlMigrationServices() {
+ if (this.sqlMigrationServices == null) {
+ this.sqlMigrationServices = new SqlMigrationServicesImpl(clientObject.getSqlMigrationServices(), this);
+ }
+ return sqlMigrationServices;
+ }
+
/** @return Resource collection API of ResourceSkus. */
public ResourceSkus resourceSkus() {
if (this.resourceSkus == null) {
@@ -241,6 +371,14 @@ public Tasks tasks() {
return tasks;
}
+ /** @return Resource collection API of ServiceTasks. */
+ public ServiceTasks serviceTasks() {
+ if (this.serviceTasks == null) {
+ this.serviceTasks = new ServiceTasksImpl(clientObject.getServiceTasks(), this);
+ }
+ return serviceTasks;
+ }
+
/** @return Resource collection API of Projects. */
public Projects projects() {
if (this.projects == null) {
@@ -257,12 +395,12 @@ public Usages usages() {
return usages;
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ /** @return Resource collection API of Files. */
+ public Files files() {
+ if (this.files == null) {
+ this.files = new FilesImpl(clientObject.getFiles(), this);
}
- return operations;
+ return files;
}
/**
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java
index daa68b439ad0e..5e57f48e2a007 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DataMigrationManagementClient.java
@@ -10,7 +10,7 @@
/** The interface for DataMigrationManagementClient class. */
public interface DataMigrationManagementClient {
/**
- * Gets Identifier of the subscription.
+ * Gets Subscription ID that identifies an Azure subscription.
*
* @return the subscriptionId value.
*/
@@ -44,6 +44,41 @@ public interface DataMigrationManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the DatabaseMigrationsSqlDbsClient object to access its operations.
+ *
+ * @return the DatabaseMigrationsSqlDbsClient object.
+ */
+ DatabaseMigrationsSqlDbsClient getDatabaseMigrationsSqlDbs();
+
+ /**
+ * Gets the DatabaseMigrationsSqlMisClient object to access its operations.
+ *
+ * @return the DatabaseMigrationsSqlMisClient object.
+ */
+ DatabaseMigrationsSqlMisClient getDatabaseMigrationsSqlMis();
+
+ /**
+ * Gets the DatabaseMigrationsSqlVmsClient object to access its operations.
+ *
+ * @return the DatabaseMigrationsSqlVmsClient object.
+ */
+ DatabaseMigrationsSqlVmsClient getDatabaseMigrationsSqlVms();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the SqlMigrationServicesClient object to access its operations.
+ *
+ * @return the SqlMigrationServicesClient object.
+ */
+ SqlMigrationServicesClient getSqlMigrationServices();
+
/**
* Gets the ResourceSkusClient object to access its operations.
*
@@ -65,6 +100,13 @@ public interface DataMigrationManagementClient {
*/
TasksClient getTasks();
+ /**
+ * Gets the ServiceTasksClient object to access its operations.
+ *
+ * @return the ServiceTasksClient object.
+ */
+ ServiceTasksClient getServiceTasks();
+
/**
* Gets the ProjectsClient object to access its operations.
*
@@ -80,9 +122,9 @@ public interface DataMigrationManagementClient {
UsagesClient getUsages();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the FilesClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the FilesClient object.
*/
- OperationsClient getOperations();
+ FilesClient getFiles();
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlDbsClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlDbsClient.java
new file mode 100644
index 0000000000000..61e1ca1f35bed
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlDbsClient.java
@@ -0,0 +1,304 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.datamigration.fluent.models.DatabaseMigrationSqlDbInner;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in DatabaseMigrationsSqlDbsClient. */
+public interface DatabaseMigrationsSqlDbsClient {
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlDbInner get(String resourceGroupName, String sqlDbInstanceName, String targetDbName);
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context);
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseMigrationSqlDbInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters);
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseMigrationSqlDbInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context);
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlDbInner createOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters);
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlDbInner createOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context);
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force);
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context);
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force);
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sqlDbInstanceName, String targetDbName);
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context);
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCancel(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters);
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters);
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlMisClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlMisClient.java
new file mode 100644
index 0000000000000..a7b8ae2af1bd1
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlMisClient.java
@@ -0,0 +1,295 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.datamigration.fluent.models.DatabaseMigrationSqlMiInner;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in DatabaseMigrationsSqlMisClient. */
+public interface DatabaseMigrationsSqlMisClient {
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlMiInner get(String resourceGroupName, String managedInstanceName, String targetDbName);
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Managed Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context);
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseMigrationSqlMiInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters);
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseMigrationSqlMiInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context);
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlMiInner createOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters);
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlMiInner createOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context);
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCancel(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters);
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters);
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCutover(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCutover(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cutover(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cutover(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlVmsClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlVmsClient.java
new file mode 100644
index 0000000000000..b98207a6b4232
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/DatabaseMigrationsSqlVmsClient.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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.datamigration.fluent.models.DatabaseMigrationSqlVmInner;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+/** An instance of this class provides access to all the operations defined in DatabaseMigrationsSqlVmsClient. */
+public interface DatabaseMigrationsSqlVmsClient {
+ /**
+ * Retrieve the specified database migration for a given SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Virtual Machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlVmInner get(String resourceGroupName, String sqlVirtualMachineName, String targetDbName);
+
+ /**
+ * Retrieve the specified database migration for a given SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Virtual Machine along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context);
+
+ /**
+ * Create a new database migration to a given SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Virtual Machine.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseMigrationSqlVmInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters);
+
+ /**
+ * Create a new database migration to a given SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Virtual Machine.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, DatabaseMigrationSqlVmInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters,
+ Context context);
+
+ /**
+ * Create a new database migration to a given SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Virtual Machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlVmInner createOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters);
+
+ /**
+ * Create a new database migration to a given SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Virtual Machine.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DatabaseMigrationSqlVmInner createOrUpdate(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ DatabaseMigrationSqlVmInner parameters,
+ Context context);
+
+ /**
+ * Stop in-progress database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters);
+
+ /**
+ * Stop in-progress database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Stop in-progress database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters);
+
+ /**
+ * Stop in-progress database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cancel(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginCutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters);
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL VM.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName The sqlVirtualMachineName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Migration Operation Input.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void cutover(
+ String resourceGroupName,
+ String sqlVirtualMachineName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/FilesClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/FilesClient.java
new file mode 100644
index 0000000000000..71e1505ea6967
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/FilesClient.java
@@ -0,0 +1,256 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.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.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.FileStorageInfoInner;
+import com.azure.resourcemanager.datamigration.fluent.models.ProjectFileInner;
+
+/** An instance of this class provides access to all the operations defined in FilesClient. */
+public interface FilesClient {
+ /**
+ * The project resource is a nested resource representing a stored migration project. This method returns a list of
+ * files owned by a project resource.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @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 oData page of files as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String groupName, String serviceName, String projectName);
+
+ /**
+ * The project resource is a nested resource representing a stored migration project. This method returns a list of
+ * files owned by a project resource.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @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 oData page of files as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String groupName, String serviceName, String projectName, Context context);
+
+ /**
+ * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This
+ * method retrieves information about a file.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 file resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectFileInner get(String groupName, String serviceName, String projectName, String fileName);
+
+ /**
+ * The files resource is a nested, proxy-only resource representing a file stored under the project resource. This
+ * method retrieves information about a file.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 file resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String groupName, String serviceName, String projectName, String fileName, Context context);
+
+ /**
+ * The PUT method creates a new file or updates an existing one.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @param parameters Information about the file.
+ * @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 file resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectFileInner createOrUpdate(
+ String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters);
+
+ /**
+ * The PUT method creates a new file or updates an existing one.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @param parameters Information about the file.
+ * @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 file resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String groupName,
+ String serviceName,
+ String projectName,
+ String fileName,
+ ProjectFileInner parameters,
+ Context context);
+
+ /**
+ * This method deletes a file.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String groupName, String serviceName, String projectName, String fileName);
+
+ /**
+ * This method deletes a file.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String groupName, String serviceName, String projectName, String fileName, Context context);
+
+ /**
+ * This method updates an existing file.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @param parameters Information about the file.
+ * @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 file resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectFileInner update(
+ String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters);
+
+ /**
+ * This method updates an existing file.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @param parameters Information about the file.
+ * @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 file resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String groupName,
+ String serviceName,
+ String projectName,
+ String fileName,
+ ProjectFileInner parameters,
+ Context context);
+
+ /**
+ * This method is used for requesting storage information using which contents of the file can be downloaded.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 file storage information.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FileStorageInfoInner read(String groupName, String serviceName, String projectName, String fileName);
+
+ /**
+ * This method is used for requesting storage information using which contents of the file can be downloaded.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 file storage information along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response readWithResponse(
+ String groupName, String serviceName, String projectName, String fileName, Context context);
+
+ /**
+ * This method is used for requesting information for reading and writing the file content.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 file storage information.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ FileStorageInfoInner readWrite(String groupName, String serviceName, String projectName, String fileName);
+
+ /**
+ * This method is used for requesting information for reading and writing the file content.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param fileName Name of the File.
+ * @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 file storage information along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response readWriteWithResponse(
+ String groupName, String serviceName, String projectName, String fileName, Context context);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java
index e1b3352421e99..27d308babd64d 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/OperationsClient.java
@@ -8,29 +8,29 @@
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner;
+import com.azure.resourcemanager.datamigration.fluent.models.OperationsDefinitionInner;
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
/**
- * Lists all available actions exposed by the Database Migration Service resource provider.
+ * Lists all of the available SQL Migration REST API operations.
*
* @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 oData page of action (operation) objects.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ PagedIterable list();
/**
- * Lists all available actions exposed by the Database Migration Service resource provider.
+ * Lists all of the available SQL Migration REST API operations.
*
* @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 oData page of action (operation) objects.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ PagedIterable list(Context context);
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java
index 659400016b56d..bf7ca5a23d867 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ProjectsClient.java
@@ -22,10 +22,10 @@ public interface ProjectsClient {
* @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 oData page of project resources.
+ * @return oData page of project resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String groupName, String serviceName);
+ PagedIterable list(String groupName, String serviceName);
/**
* The project resource is a nested resource representing a stored migration project. This method returns a list of
@@ -37,10 +37,10 @@ public interface ProjectsClient {
* @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 oData page of project resources.
+ * @return oData page of project resources as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String groupName, String serviceName, Context context);
+ PagedIterable list(String groupName, String serviceName, Context context);
/**
* The project resource is a nested resource representing a stored migration project. The PUT method creates a new
@@ -70,7 +70,7 @@ public interface ProjectsClient {
* @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 project resource.
+ * @return a project resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -102,7 +102,7 @@ Response createOrUpdateWithResponse(
* @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 project resource.
+ * @return a project resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String groupName, String serviceName, String projectName, Context context);
@@ -133,7 +133,7 @@ Response createOrUpdateWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -167,7 +167,7 @@ Response deleteWithResponse(
* @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 project resource.
+ * @return a project resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java
index 9f3b034006b6b..7b376fd91612f 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ResourceSkusClient.java
@@ -17,7 +17,7 @@ public interface ResourceSkusClient {
*
* @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 DMS List SKUs operation response.
+ * @return the DMS List SKUs operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface ResourceSkusClient {
* @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 DMS List SKUs operation response.
+ * @return the DMS List SKUs operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServiceTasksClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServiceTasksClient.java
new file mode 100644
index 0000000000000..356aa3e15172d
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServiceTasksClient.java
@@ -0,0 +1,216 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.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.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner;
+
+/** An instance of this class provides access to all the operations defined in ServiceTasksClient. */
+public interface ServiceTasksClient {
+ /**
+ * The services resource is the top-level resource that represents the Database Migration Service. This method
+ * returns a list of service level tasks owned by a service resource. Some tasks may have a status of Unknown, which
+ * indicates that an error occurred while querying the status of that task.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @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 oData page of tasks as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String groupName, String serviceName);
+
+ /**
+ * The services resource is the top-level resource that represents the Database Migration Service. This method
+ * returns a list of service level tasks owned by a service resource. Some tasks may have a status of Unknown, which
+ * indicates that an error occurred while querying the status of that task.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskType Filter tasks by task type.
+ * @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 oData page of tasks as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String groupName, String serviceName, String taskType, Context context);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * PUT method creates a new service task or updates an existing one, although since service tasks have no mutable
+ * custom properties, there is little reason to update an existing one.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @param parameters Information about the task.
+ * @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 task resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectTaskInner createOrUpdate(String groupName, String serviceName, String taskName, ProjectTaskInner parameters);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * PUT method creates a new service task or updates an existing one, although since service tasks have no mutable
+ * custom properties, there is little reason to update an existing one.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @param parameters Information about the task.
+ * @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 task resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String groupName, String serviceName, String taskName, ProjectTaskInner parameters, Context context);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * GET method retrieves information about a service task.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @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 task resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectTaskInner get(String groupName, String serviceName, String taskName);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * GET method retrieves information about a service task.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @param expand Expand the response.
+ * @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 task resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String groupName, String serviceName, String taskName, String expand, Context context);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * DELETE method deletes a service task, canceling it first if it's running.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String groupName, String serviceName, String taskName);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * DELETE method deletes a service task, canceling it first if it's running.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @param deleteRunningTasks Delete the resource even if it contains running tasks.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String groupName, String serviceName, String taskName, Boolean deleteRunningTasks, Context context);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * PATCH method updates an existing service task, but since service tasks have no mutable custom properties, there
+ * is little reason to do so.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @param parameters Information about the task.
+ * @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 task resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectTaskInner update(String groupName, String serviceName, String taskName, ProjectTaskInner parameters);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. The
+ * PATCH method updates an existing service task, but since service tasks have no mutable custom properties, there
+ * is little reason to do so.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @param parameters Information about the task.
+ * @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 task resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String groupName, String serviceName, String taskName, ProjectTaskInner parameters, Context context);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This
+ * method cancels a service task if it's currently queued or running.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @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 task resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ProjectTaskInner cancel(String groupName, String serviceName, String taskName);
+
+ /**
+ * The service tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This
+ * method cancels a service task if it's currently queued or running.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param taskName Name of the Task.
+ * @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 task resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response cancelWithResponse(
+ String groupName, String serviceName, String taskName, Context context);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java
index 9776860991a80..d0cf0520f0091 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/ServicesClient.java
@@ -34,9 +34,9 @@ public interface ServicesClient {
* @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 Database Migration Service resource.
+ * @return the {@link SyncPoller} for polling of a Database Migration Service resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters);
@@ -56,9 +56,9 @@ SyncPoller, DataMigrationServiceInner> beg
* @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 Database Migration Service resource.
+ * @return the {@link SyncPoller} for polling of a Database Migration Service resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginCreateOrUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters, Context context);
@@ -129,7 +129,7 @@ DataMigrationServiceInner createOrUpdate(
* @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 Database Migration Service resource.
+ * @return a Database Migration Service resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -145,9 +145,9 @@ Response getByResourceGroupWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String groupName, String serviceName, Boolean deleteRunningTasks);
/**
@@ -161,9 +161,9 @@ Response getByResourceGroupWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String groupName, String serviceName, Boolean deleteRunningTasks, Context context);
@@ -220,9 +220,9 @@ SyncPoller, Void> beginDelete(
* @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 Database Migration Service resource.
+ * @return the {@link SyncPoller} for polling of a Database Migration Service resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters);
@@ -238,9 +238,9 @@ SyncPoller, DataMigrationServiceInner> beg
* @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 Database Migration Service resource.
+ * @return the {@link SyncPoller} for polling of a Database Migration Service resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DataMigrationServiceInner> beginUpdate(
String groupName, String serviceName, DataMigrationServiceInner parameters, Context context);
@@ -302,7 +302,7 @@ DataMigrationServiceInner update(
* @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 service health status.
+ * @return service health status along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkStatusWithResponse(
@@ -317,9 +317,9 @@ Response checkStatusWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStart(String groupName, String serviceName);
/**
@@ -332,9 +332,9 @@ Response checkStatusWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStart(String groupName, String serviceName, Context context);
/**
@@ -374,9 +374,9 @@ Response checkStatusWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStop(String groupName, String serviceName);
/**
@@ -390,9 +390,9 @@ Response checkStatusWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginStop(String groupName, String serviceName, Context context);
/**
@@ -433,7 +433,7 @@ Response checkStatusWithResponse(
* @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 oData page of available SKUs.
+ * @return oData page of available SKUs as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listSkus(String groupName, String serviceName);
@@ -448,7 +448,7 @@ Response checkStatusWithResponse(
* @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 oData page of available SKUs.
+ * @return oData page of available SKUs as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listSkus(String groupName, String serviceName, Context context);
@@ -465,7 +465,7 @@ Response checkStatusWithResponse(
* @return indicates whether a proposed resource name is available.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- NameAvailabilityResponseInner nestedCheckNameAvailability(
+ NameAvailabilityResponseInner checkChildrenNameAvailability(
String groupName, String serviceName, NameAvailabilityRequest parameters);
/**
@@ -478,10 +478,10 @@ NameAvailabilityResponseInner nestedCheckNameAvailability(
* @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 indicates whether a proposed resource name is available.
+ * @return indicates whether a proposed resource name is available along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response nestedCheckNameAvailabilityWithResponse(
+ Response checkChildrenNameAvailabilityWithResponse(
String groupName, String serviceName, NameAvailabilityRequest parameters, Context context);
/**
@@ -492,7 +492,7 @@ Response nestedCheckNameAvailabilityWithResponse(
* @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 oData page of service objects.
+ * @return oData page of service objects as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String groupName);
@@ -506,7 +506,7 @@ Response nestedCheckNameAvailabilityWithResponse(
* @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 oData page of service objects.
+ * @return oData page of service objects as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String groupName, Context context);
@@ -517,7 +517,7 @@ Response nestedCheckNameAvailabilityWithResponse(
*
* @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 oData page of service objects.
+ * @return oData page of service objects as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -530,7 +530,7 @@ Response nestedCheckNameAvailabilityWithResponse(
* @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 oData page of service objects.
+ * @return oData page of service objects as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -557,7 +557,7 @@ Response nestedCheckNameAvailabilityWithResponse(
* @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 indicates whether a proposed resource name is available.
+ * @return indicates whether a proposed resource name is available along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response checkNameAvailabilityWithResponse(
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/SqlMigrationServicesClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/SqlMigrationServicesClient.java
new file mode 100644
index 0000000000000..51f24b5ec5790
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/SqlMigrationServicesClient.java
@@ -0,0 +1,454 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.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.datamigration.fluent.models.AuthenticationKeysInner;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationInner;
+import com.azure.resourcemanager.datamigration.fluent.models.DeleteNodeInner;
+import com.azure.resourcemanager.datamigration.fluent.models.IntegrationRuntimeMonitoringDataInner;
+import com.azure.resourcemanager.datamigration.fluent.models.RegenAuthKeysInner;
+import com.azure.resourcemanager.datamigration.fluent.models.SqlMigrationServiceInner;
+import com.azure.resourcemanager.datamigration.models.SqlMigrationServiceUpdate;
+
+/** An instance of this class provides access to all the operations defined in SqlMigrationServicesClient. */
+public interface SqlMigrationServicesClient {
+ /**
+ * Retrieve the Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlMigrationServiceInner getByResourceGroup(String resourceGroupName, String sqlMigrationServiceName);
+
+ /**
+ * Retrieve the Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 SQL Migration Service along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlMigrationServiceName, Context context);
+
+ /**
+ * Create or Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlMigrationServiceInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlMigrationServiceName, SqlMigrationServiceInner parameters);
+
+ /**
+ * Create or Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlMigrationServiceInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlMigrationServiceName, SqlMigrationServiceInner parameters, Context context);
+
+ /**
+ * Create or Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlMigrationServiceInner createOrUpdate(
+ String resourceGroupName, String sqlMigrationServiceName, SqlMigrationServiceInner parameters);
+
+ /**
+ * Create or Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlMigrationServiceInner createOrUpdate(
+ String resourceGroupName, String sqlMigrationServiceName, SqlMigrationServiceInner parameters, Context context);
+
+ /**
+ * Delete Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String sqlMigrationServiceName);
+
+ /**
+ * Delete Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlMigrationServiceName, Context context);
+
+ /**
+ * Delete Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sqlMigrationServiceName);
+
+ /**
+ * Delete Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sqlMigrationServiceName, Context context);
+
+ /**
+ * Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlMigrationServiceInner> beginUpdate(
+ String resourceGroupName, String sqlMigrationServiceName, SqlMigrationServiceUpdate parameters);
+
+ /**
+ * Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlMigrationServiceInner> beginUpdate(
+ String resourceGroupName,
+ String sqlMigrationServiceName,
+ SqlMigrationServiceUpdate parameters,
+ Context context);
+
+ /**
+ * Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlMigrationServiceInner update(
+ String resourceGroupName, String sqlMigrationServiceName, SqlMigrationServiceUpdate parameters);
+
+ /**
+ * Update Database Migration Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 a SQL Migration Service.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlMigrationServiceInner update(
+ String resourceGroupName,
+ String sqlMigrationServiceName,
+ SqlMigrationServiceUpdate parameters,
+ Context context);
+
+ /**
+ * Retrieve all SQL migration services in the resource group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @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 SQL Migration Service as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Retrieve all SQL migration services in the resource group.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @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 SQL Migration Service as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Retrieve the List of Authentication Keys for Self Hosted Integration Runtime.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 an authentication key.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AuthenticationKeysInner listAuthKeys(String resourceGroupName, String sqlMigrationServiceName);
+
+ /**
+ * Retrieve the List of Authentication Keys for Self Hosted Integration Runtime.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 an authentication key along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listAuthKeysWithResponse(
+ String resourceGroupName, String sqlMigrationServiceName, Context context);
+
+ /**
+ * Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 an authentication key to regenerate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RegenAuthKeysInner regenerateAuthKeys(
+ String resourceGroupName, String sqlMigrationServiceName, RegenAuthKeysInner parameters);
+
+ /**
+ * Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 an authentication key to regenerate along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response regenerateAuthKeysWithResponse(
+ String resourceGroupName, String sqlMigrationServiceName, RegenAuthKeysInner parameters, Context context);
+
+ /**
+ * Delete the integration runtime node.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 details of node to be deleted.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DeleteNodeInner deleteNode(String resourceGroupName, String sqlMigrationServiceName, DeleteNodeInner parameters);
+
+ /**
+ * Delete the integration runtime node.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @param parameters Details of SqlMigrationService 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 details of node to be deleted along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteNodeWithResponse(
+ String resourceGroupName, String sqlMigrationServiceName, DeleteNodeInner parameters, Context context);
+
+ /**
+ * Retrieve the List of database migrations attached to the service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 Database Migrations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMigrations(String resourceGroupName, String sqlMigrationServiceName);
+
+ /**
+ * Retrieve the List of database migrations attached to the service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 Database Migrations as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listMigrations(
+ String resourceGroupName, String sqlMigrationServiceName, Context context);
+
+ /**
+ * Retrieve the registered Integration Runtime nodes and their monitoring data for a given Database Migration
+ * Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 integration Runtime Monitoring Data.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IntegrationRuntimeMonitoringDataInner listMonitoringData(String resourceGroupName, String sqlMigrationServiceName);
+
+ /**
+ * Retrieve the registered Integration Runtime nodes and their monitoring data for a given Database Migration
+ * Service.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlMigrationServiceName Name of the SQL Migration Service.
+ * @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 integration Runtime Monitoring Data along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listMonitoringDataWithResponse(
+ String resourceGroupName, String sqlMigrationServiceName, Context context);
+
+ /**
+ * Retrieve all SQL migration services in the subscriptions.
+ *
+ * @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 SQL Migration Service as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Retrieve all SQL migration services in the subscriptions.
+ *
+ * @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 SQL Migration Service as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java
index 339a1febafb4d..8ba64b22b8f01 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/TasksClient.java
@@ -9,6 +9,7 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.CommandPropertiesInner;
import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner;
/** An instance of this class provides access to all the operations defined in TasksClient. */
@@ -24,7 +25,7 @@ public interface TasksClient {
* @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 oData page of tasks.
+ * @return oData page of tasks as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String groupName, String serviceName, String projectName);
@@ -42,7 +43,7 @@ public interface TasksClient {
* @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 oData page of tasks.
+ * @return oData page of tasks as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(
@@ -81,7 +82,7 @@ ProjectTaskInner createOrUpdate(
* @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 task resource.
+ * @return a task resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -121,7 +122,7 @@ Response createOrUpdateWithResponse(
* @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 task resource.
+ * @return a task resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -155,7 +156,7 @@ Response getWithResponse(
* @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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -199,7 +200,7 @@ ProjectTaskInner update(
* @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 task resource.
+ * @return a task resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -238,9 +239,51 @@ Response updateWithResponse(
* @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 task resource.
+ * @return a task resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response cancelWithResponse(
String groupName, String serviceName, String projectName, String taskName, Context context);
+
+ /**
+ * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method
+ * executes a command on a running task.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param taskName Name of the Task.
+ * @param parameters Command to execute.
+ * @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 base class for all types of DMS command properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CommandPropertiesInner command(
+ String groupName, String serviceName, String projectName, String taskName, CommandPropertiesInner parameters);
+
+ /**
+ * The tasks resource is a nested, proxy-only resource representing work performed by a DMS instance. This method
+ * executes a command on a running task.
+ *
+ * @param groupName Name of the resource group.
+ * @param serviceName Name of the service.
+ * @param projectName Name of the project.
+ * @param taskName Name of the Task.
+ * @param parameters Command to execute.
+ * @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 base class for all types of DMS command properties along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response commandWithResponse(
+ String groupName,
+ String serviceName,
+ String projectName,
+ String taskName,
+ CommandPropertiesInner parameters,
+ Context context);
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java
index 4e8adef0cd7e6..f409cc8119e8c 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/UsagesClient.java
@@ -19,7 +19,7 @@ public interface UsagesClient {
* @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 oData page of quota objects.
+ * @return oData page of quota objects as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String location);
@@ -32,7 +32,7 @@ public interface UsagesClient {
* @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 oData page of quota objects.
+ * @return oData page of quota objects as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String location, Context context);
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AuthenticationKeysInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AuthenticationKeysInner.java
new file mode 100644
index 0000000000000..aecefbf5e424a
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AuthenticationKeysInner.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An authentication key. */
+@Fluent
+public final class AuthenticationKeysInner {
+ /*
+ * The first authentication key.
+ */
+ @JsonProperty(value = "authKey1")
+ private String authKey1;
+
+ /*
+ * The second authentication key.
+ */
+ @JsonProperty(value = "authKey2")
+ private String authKey2;
+
+ /**
+ * Get the authKey1 property: The first authentication key.
+ *
+ * @return the authKey1 value.
+ */
+ public String authKey1() {
+ return this.authKey1;
+ }
+
+ /**
+ * Set the authKey1 property: The first authentication key.
+ *
+ * @param authKey1 the authKey1 value to set.
+ * @return the AuthenticationKeysInner object itself.
+ */
+ public AuthenticationKeysInner withAuthKey1(String authKey1) {
+ this.authKey1 = authKey1;
+ return this;
+ }
+
+ /**
+ * Get the authKey2 property: The second authentication key.
+ *
+ * @return the authKey2 value.
+ */
+ public String authKey2() {
+ return this.authKey2;
+ }
+
+ /**
+ * Set the authKey2 property: The second authentication key.
+ *
+ * @param authKey2 the authKey2 value to set.
+ * @return the AuthenticationKeysInner object itself.
+ */
+ public AuthenticationKeysInner withAuthKey2(String authKey2) {
+ this.authKey2 = authKey2;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java
index d7fcbe65654d7..fcfdadc964b21 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/AvailableServiceSkuInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.datamigration.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuAutoGenerated;
import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuCapacity;
-import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuSku;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Describes the available service SKU. */
@Fluent
public final class AvailableServiceSkuInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableServiceSkuInner.class);
-
/*
* The resource type, including the provider namespace
*/
@@ -26,7 +22,7 @@ public final class AvailableServiceSkuInner {
* SKU name, tier, etc.
*/
@JsonProperty(value = "sku")
- private AvailableServiceSkuAutoGenerated sku;
+ private AvailableServiceSkuSku sku;
/*
* A description of the scaling capacities of the SKU
@@ -59,7 +55,7 @@ public AvailableServiceSkuInner withResourceType(String resourceType) {
*
* @return the sku value.
*/
- public AvailableServiceSkuAutoGenerated sku() {
+ public AvailableServiceSkuSku sku() {
return this.sku;
}
@@ -69,7 +65,7 @@ public AvailableServiceSkuAutoGenerated sku() {
* @param sku the sku value to set.
* @return the AvailableServiceSkuInner object itself.
*/
- public AvailableServiceSkuInner withSku(AvailableServiceSkuAutoGenerated sku) {
+ public AvailableServiceSkuInner withSku(AvailableServiceSkuSku sku) {
this.sku = sku;
return this;
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/CommandPropertiesInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/CommandPropertiesInner.java
new file mode 100644
index 0000000000000..1ddf423562849
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/CommandPropertiesInner.java
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.datamigration.models.CommandState;
+import com.azure.resourcemanager.datamigration.models.MigrateMISyncCompleteCommandProperties;
+import com.azure.resourcemanager.datamigration.models.MigrateSyncCompleteCommandProperties;
+import com.azure.resourcemanager.datamigration.models.MongoDbCancelCommand;
+import com.azure.resourcemanager.datamigration.models.MongoDbFinishCommand;
+import com.azure.resourcemanager.datamigration.models.MongoDbRestartCommand;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.util.List;
+
+/**
+ * Base class for all types of DMS command properties. If command is not supported by current client, this object is
+ * returned.
+ */
+@JsonTypeInfo(
+ use = JsonTypeInfo.Id.NAME,
+ include = JsonTypeInfo.As.PROPERTY,
+ property = "commandType",
+ defaultImpl = CommandPropertiesInner.class)
+@JsonTypeName("CommandProperties")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Migrate.Sync.Complete.Database", value = MigrateSyncCompleteCommandProperties.class),
+ @JsonSubTypes.Type(
+ name = "Migrate.SqlServer.AzureDbSqlMi.Complete",
+ value = MigrateMISyncCompleteCommandProperties.class),
+ @JsonSubTypes.Type(name = "cancel", value = MongoDbCancelCommand.class),
+ @JsonSubTypes.Type(name = "finish", value = MongoDbFinishCommand.class),
+ @JsonSubTypes.Type(name = "restart", value = MongoDbRestartCommand.class)
+})
+@Immutable
+public class CommandPropertiesInner {
+ /*
+ * Array of errors. This is ignored if submitted.
+ */
+ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY)
+ private List errors;
+
+ /*
+ * The state of the command. This is ignored if submitted.
+ */
+ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
+ private CommandState state;
+
+ /**
+ * Get the errors property: Array of errors. This is ignored if submitted.
+ *
+ * @return the errors value.
+ */
+ public List errors() {
+ return this.errors;
+ }
+
+ /**
+ * Get the state property: The state of the command. This is ignored if submitted.
+ *
+ * @return the state value.
+ */
+ public CommandState state() {
+ return this.state;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java
index 410563e414e8f..1127109b5d42b 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceInner.java
@@ -5,21 +5,16 @@
package com.azure.resourcemanager.datamigration.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.datamigration.models.ServiceProvisioningState;
import com.azure.resourcemanager.datamigration.models.ServiceSku;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** A Database Migration Service resource. */
-@JsonFlatten
@Fluent
-public class DataMigrationServiceInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceInner.class);
-
+public final class DataMigrationServiceInner extends Resource {
/*
* HTTP strong entity tag value. Ignored if submitted
*/
@@ -33,30 +28,22 @@ public class DataMigrationServiceInner extends Resource {
private String kind;
/*
- * Service SKU
- */
- @JsonProperty(value = "sku")
- private ServiceSku sku;
-
- /*
- * The resource's provisioning state
+ * Custom service properties
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ServiceProvisioningState provisioningState;
+ @JsonProperty(value = "properties")
+ private DataMigrationServiceProperties innerProperties;
/*
- * The public key of the service, used to encrypt secrets sent to the
- * service
+ * Service SKU
*/
- @JsonProperty(value = "properties.publicKey")
- private String publicKey;
+ @JsonProperty(value = "sku")
+ private ServiceSku sku;
/*
- * The ID of the Microsoft.Network/virtualNetworks/subnets resource to
- * which the service should be joined
+ * The systemData property.
*/
- @JsonProperty(value = "properties.virtualSubnetId")
- private String virtualSubnetId;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
* Get the etag property: HTTP strong entity tag value. Ignored if submitted.
@@ -98,6 +85,15 @@ public DataMigrationServiceInner withKind(String kind) {
return this;
}
+ /**
+ * Get the innerProperties property: Custom service properties.
+ *
+ * @return the innerProperties value.
+ */
+ private DataMigrationServiceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* Get the sku property: Service SKU.
*
@@ -118,13 +114,36 @@ public DataMigrationServiceInner withSku(ServiceSku sku) {
return this;
}
+ /**
+ * Get the systemData property: The systemData property.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DataMigrationServiceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public DataMigrationServiceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the provisioningState property: The resource's provisioning state.
*
* @return the provisioningState value.
*/
public ServiceProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -133,7 +152,7 @@ public ServiceProvisioningState provisioningState() {
* @return the publicKey value.
*/
public String publicKey() {
- return this.publicKey;
+ return this.innerProperties() == null ? null : this.innerProperties().publicKey();
}
/**
@@ -143,7 +162,10 @@ public String publicKey() {
* @return the DataMigrationServiceInner object itself.
*/
public DataMigrationServiceInner withPublicKey(String publicKey) {
- this.publicKey = publicKey;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataMigrationServiceProperties();
+ }
+ this.innerProperties().withPublicKey(publicKey);
return this;
}
@@ -154,7 +176,7 @@ public DataMigrationServiceInner withPublicKey(String publicKey) {
* @return the virtualSubnetId value.
*/
public String virtualSubnetId() {
- return this.virtualSubnetId;
+ return this.innerProperties() == null ? null : this.innerProperties().virtualSubnetId();
}
/**
@@ -165,21 +187,81 @@ public String virtualSubnetId() {
* @return the DataMigrationServiceInner object itself.
*/
public DataMigrationServiceInner withVirtualSubnetId(String virtualSubnetId) {
- this.virtualSubnetId = virtualSubnetId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataMigrationServiceProperties();
+ }
+ this.innerProperties().withVirtualSubnetId(virtualSubnetId);
return this;
}
- /** {@inheritDoc} */
- @Override
- public DataMigrationServiceInner withLocation(String location) {
- super.withLocation(location);
+ /**
+ * Get the virtualNicId property: The ID of the Microsoft.Network/networkInterfaces resource which the service have.
+ *
+ * @return the virtualNicId value.
+ */
+ public String virtualNicId() {
+ return this.innerProperties() == null ? null : this.innerProperties().virtualNicId();
+ }
+
+ /**
+ * Set the virtualNicId property: The ID of the Microsoft.Network/networkInterfaces resource which the service have.
+ *
+ * @param virtualNicId the virtualNicId value to set.
+ * @return the DataMigrationServiceInner object itself.
+ */
+ public DataMigrationServiceInner withVirtualNicId(String virtualNicId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataMigrationServiceProperties();
+ }
+ this.innerProperties().withVirtualNicId(virtualNicId);
return this;
}
- /** {@inheritDoc} */
- @Override
- public DataMigrationServiceInner withTags(Map tags) {
- super.withTags(tags);
+ /**
+ * Get the autoStopDelay property: The time delay before the service is auto-stopped when idle.
+ *
+ * @return the autoStopDelay value.
+ */
+ public String autoStopDelay() {
+ return this.innerProperties() == null ? null : this.innerProperties().autoStopDelay();
+ }
+
+ /**
+ * Set the autoStopDelay property: The time delay before the service is auto-stopped when idle.
+ *
+ * @param autoStopDelay the autoStopDelay value to set.
+ * @return the DataMigrationServiceInner object itself.
+ */
+ public DataMigrationServiceInner withAutoStopDelay(String autoStopDelay) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataMigrationServiceProperties();
+ }
+ this.innerProperties().withAutoStopDelay(autoStopDelay);
+ return this;
+ }
+
+ /**
+ * Get the deleteResourcesOnStop property: Whether service resources should be deleted when stopped. (Turned on by
+ * default).
+ *
+ * @return the deleteResourcesOnStop value.
+ */
+ public Boolean deleteResourcesOnStop() {
+ return this.innerProperties() == null ? null : this.innerProperties().deleteResourcesOnStop();
+ }
+
+ /**
+ * Set the deleteResourcesOnStop property: Whether service resources should be deleted when stopped. (Turned on by
+ * default).
+ *
+ * @param deleteResourcesOnStop the deleteResourcesOnStop value to set.
+ * @return the DataMigrationServiceInner object itself.
+ */
+ public DataMigrationServiceInner withDeleteResourcesOnStop(Boolean deleteResourcesOnStop) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataMigrationServiceProperties();
+ }
+ this.innerProperties().withDeleteResourcesOnStop(deleteResourcesOnStop);
return this;
}
@@ -189,6 +271,9 @@ public DataMigrationServiceInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
if (sku() != null) {
sku().validate();
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceProperties.java
new file mode 100644
index 0000000000000..9a11b1d691587
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceProperties.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.datamigration.models.ServiceProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the Database Migration Service instance. */
+@Fluent
+public final class DataMigrationServiceProperties {
+ /*
+ * The resource's provisioning state
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ServiceProvisioningState provisioningState;
+
+ /*
+ * The public key of the service, used to encrypt secrets sent to the
+ * service
+ */
+ @JsonProperty(value = "publicKey")
+ private String publicKey;
+
+ /*
+ * The ID of the Microsoft.Network/virtualNetworks/subnets resource to
+ * which the service should be joined
+ */
+ @JsonProperty(value = "virtualSubnetId")
+ private String virtualSubnetId;
+
+ /*
+ * The ID of the Microsoft.Network/networkInterfaces resource which the
+ * service have
+ */
+ @JsonProperty(value = "virtualNicId")
+ private String virtualNicId;
+
+ /*
+ * The time delay before the service is auto-stopped when idle.
+ */
+ @JsonProperty(value = "autoStopDelay")
+ private String autoStopDelay;
+
+ /*
+ * Whether service resources should be deleted when stopped. (Turned on by
+ * default)
+ */
+ @JsonProperty(value = "deleteResourcesOnStop")
+ private Boolean deleteResourcesOnStop;
+
+ /**
+ * Get the provisioningState property: The resource's provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ServiceProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the publicKey property: The public key of the service, used to encrypt secrets sent to the service.
+ *
+ * @return the publicKey value.
+ */
+ public String publicKey() {
+ return this.publicKey;
+ }
+
+ /**
+ * Set the publicKey property: The public key of the service, used to encrypt secrets sent to the service.
+ *
+ * @param publicKey the publicKey value to set.
+ * @return the DataMigrationServiceProperties object itself.
+ */
+ public DataMigrationServiceProperties withPublicKey(String publicKey) {
+ this.publicKey = publicKey;
+ return this;
+ }
+
+ /**
+ * Get the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the
+ * service should be joined.
+ *
+ * @return the virtualSubnetId value.
+ */
+ public String virtualSubnetId() {
+ return this.virtualSubnetId;
+ }
+
+ /**
+ * Set the virtualSubnetId property: The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the
+ * service should be joined.
+ *
+ * @param virtualSubnetId the virtualSubnetId value to set.
+ * @return the DataMigrationServiceProperties object itself.
+ */
+ public DataMigrationServiceProperties withVirtualSubnetId(String virtualSubnetId) {
+ this.virtualSubnetId = virtualSubnetId;
+ return this;
+ }
+
+ /**
+ * Get the virtualNicId property: The ID of the Microsoft.Network/networkInterfaces resource which the service have.
+ *
+ * @return the virtualNicId value.
+ */
+ public String virtualNicId() {
+ return this.virtualNicId;
+ }
+
+ /**
+ * Set the virtualNicId property: The ID of the Microsoft.Network/networkInterfaces resource which the service have.
+ *
+ * @param virtualNicId the virtualNicId value to set.
+ * @return the DataMigrationServiceProperties object itself.
+ */
+ public DataMigrationServiceProperties withVirtualNicId(String virtualNicId) {
+ this.virtualNicId = virtualNicId;
+ return this;
+ }
+
+ /**
+ * Get the autoStopDelay property: The time delay before the service is auto-stopped when idle.
+ *
+ * @return the autoStopDelay value.
+ */
+ public String autoStopDelay() {
+ return this.autoStopDelay;
+ }
+
+ /**
+ * Set the autoStopDelay property: The time delay before the service is auto-stopped when idle.
+ *
+ * @param autoStopDelay the autoStopDelay value to set.
+ * @return the DataMigrationServiceProperties object itself.
+ */
+ public DataMigrationServiceProperties withAutoStopDelay(String autoStopDelay) {
+ this.autoStopDelay = autoStopDelay;
+ return this;
+ }
+
+ /**
+ * Get the deleteResourcesOnStop property: Whether service resources should be deleted when stopped. (Turned on by
+ * default).
+ *
+ * @return the deleteResourcesOnStop value.
+ */
+ public Boolean deleteResourcesOnStop() {
+ return this.deleteResourcesOnStop;
+ }
+
+ /**
+ * Set the deleteResourcesOnStop property: Whether service resources should be deleted when stopped. (Turned on by
+ * default).
+ *
+ * @param deleteResourcesOnStop the deleteResourcesOnStop value to set.
+ * @return the DataMigrationServiceProperties object itself.
+ */
+ public DataMigrationServiceProperties withDeleteResourcesOnStop(Boolean deleteResourcesOnStop) {
+ this.deleteResourcesOnStop = deleteResourcesOnStop;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java
index b53702e4088b7..2fe999be182f4 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DataMigrationServiceStatusResponseInner.java
@@ -5,22 +5,24 @@
package com.azure.resourcemanager.datamigration.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Service health status. */
@Fluent
public final class DataMigrationServiceStatusResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMigrationServiceStatusResponseInner.class);
-
/*
* The DMS instance agent version
*/
@JsonProperty(value = "agentVersion")
private String agentVersion;
+ /*
+ * Agent Configuration
+ */
+ @JsonProperty(value = "agentConfiguration")
+ private Object agentConfiguration;
+
/*
* The machine-readable status, such as 'Initializing', 'Offline',
* 'Online', 'Deploying', 'Deleting', 'Stopped', 'Stopping', 'Starting',
@@ -61,6 +63,26 @@ public DataMigrationServiceStatusResponseInner withAgentVersion(String agentVers
return this;
}
+ /**
+ * Get the agentConfiguration property: Agent Configuration.
+ *
+ * @return the agentConfiguration value.
+ */
+ public Object agentConfiguration() {
+ return this.agentConfiguration;
+ }
+
+ /**
+ * Set the agentConfiguration property: Agent Configuration.
+ *
+ * @param agentConfiguration the agentConfiguration value to set.
+ * @return the DataMigrationServiceStatusResponseInner object itself.
+ */
+ public DataMigrationServiceStatusResponseInner withAgentConfiguration(Object agentConfiguration) {
+ this.agentConfiguration = agentConfiguration;
+ return this;
+ }
+
/**
* Get the status property: The machine-readable status, such as 'Initializing', 'Offline', 'Online', 'Deploying',
* 'Deleting', 'Stopped', 'Stopping', 'Starting', 'FailedToStart', 'FailedToStop' or 'Failed'.
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationInner.java
new file mode 100644
index 0000000000000..c8a3ac62fd0eb
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationInner.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource. */
+@Fluent
+public final class DatabaseMigrationInner extends ProxyResource {
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Database Migration Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private DatabaseMigrationProperties properties;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Database Migration Resource properties.
+ *
+ * @return the properties value.
+ */
+ public DatabaseMigrationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Database Migration Resource properties.
+ *
+ * @param properties the properties value to set.
+ * @return the DatabaseMigrationInner object itself.
+ */
+ public DatabaseMigrationInner withProperties(DatabaseMigrationProperties 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/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlDbInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlDbInner.java
new file mode 100644
index 0000000000000..5e132ade44b69
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlDbInner.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlDb;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource for SQL Database. */
+@Fluent
+public final class DatabaseMigrationSqlDbInner extends ProxyResource {
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Database Migration Resource properties for SQL database.
+ */
+ @JsonProperty(value = "properties")
+ private DatabaseMigrationPropertiesSqlDb properties;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Database Migration Resource properties for SQL database.
+ *
+ * @return the properties value.
+ */
+ public DatabaseMigrationPropertiesSqlDb properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Database Migration Resource properties for SQL database.
+ *
+ * @param properties the properties value to set.
+ * @return the DatabaseMigrationSqlDbInner object itself.
+ */
+ public DatabaseMigrationSqlDbInner withProperties(DatabaseMigrationPropertiesSqlDb 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/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlMiInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlMiInner.java
new file mode 100644
index 0000000000000..aa323fd767431
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlMiInner.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlMi;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource for SQL Managed Instance. */
+@Fluent
+public final class DatabaseMigrationSqlMiInner extends ProxyResource {
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Database Migration Resource properties for SQL Managed Instance.
+ */
+ @JsonProperty(value = "properties")
+ private DatabaseMigrationPropertiesSqlMi properties;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Database Migration Resource properties for SQL Managed Instance.
+ *
+ * @return the properties value.
+ */
+ public DatabaseMigrationPropertiesSqlMi properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Database Migration Resource properties for SQL Managed Instance.
+ *
+ * @param properties the properties value to set.
+ * @return the DatabaseMigrationSqlMiInner object itself.
+ */
+ public DatabaseMigrationSqlMiInner withProperties(DatabaseMigrationPropertiesSqlMi 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/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlVmInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlVmInner.java
new file mode 100644
index 0000000000000..d808380ad2d5d
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DatabaseMigrationSqlVmInner.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlVm;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Database Migration Resource for SQL Virtual Machine. */
+@Fluent
+public final class DatabaseMigrationSqlVmInner extends ProxyResource {
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Database Migration Resource properties for SQL Virtual Machine.
+ */
+ @JsonProperty(value = "properties")
+ private DatabaseMigrationPropertiesSqlVm properties;
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the properties property: Database Migration Resource properties for SQL Virtual Machine.
+ *
+ * @return the properties value.
+ */
+ public DatabaseMigrationPropertiesSqlVm properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Database Migration Resource properties for SQL Virtual Machine.
+ *
+ * @param properties the properties value to set.
+ * @return the DatabaseMigrationSqlVmInner object itself.
+ */
+ public DatabaseMigrationSqlVmInner withProperties(DatabaseMigrationPropertiesSqlVm 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/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DeleteNodeInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DeleteNodeInner.java
new file mode 100644
index 0000000000000..64ad3d4dca92d
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/DeleteNodeInner.java
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Details of node to be deleted. */
+@Fluent
+public final class DeleteNodeInner {
+ /*
+ * The name of node to delete.
+ */
+ @JsonProperty(value = "nodeName")
+ private String nodeName;
+
+ /*
+ * The name of integration runtime.
+ */
+ @JsonProperty(value = "integrationRuntimeName")
+ private String integrationRuntimeName;
+
+ /**
+ * Get the nodeName property: The name of node to delete.
+ *
+ * @return the nodeName value.
+ */
+ public String nodeName() {
+ return this.nodeName;
+ }
+
+ /**
+ * Set the nodeName property: The name of node to delete.
+ *
+ * @param nodeName the nodeName value to set.
+ * @return the DeleteNodeInner object itself.
+ */
+ public DeleteNodeInner withNodeName(String nodeName) {
+ this.nodeName = nodeName;
+ return this;
+ }
+
+ /**
+ * Get the integrationRuntimeName property: The name of integration runtime.
+ *
+ * @return the integrationRuntimeName value.
+ */
+ public String integrationRuntimeName() {
+ return this.integrationRuntimeName;
+ }
+
+ /**
+ * Set the integrationRuntimeName property: The name of integration runtime.
+ *
+ * @param integrationRuntimeName the integrationRuntimeName value to set.
+ * @return the DeleteNodeInner object itself.
+ */
+ public DeleteNodeInner withIntegrationRuntimeName(String integrationRuntimeName) {
+ this.integrationRuntimeName = integrationRuntimeName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/FileStorageInfoInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/FileStorageInfoInner.java
new file mode 100644
index 0000000000000..c5b833459c95b
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/FileStorageInfoInner.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** File storage information. */
+@Fluent
+public final class FileStorageInfoInner {
+ /*
+ * A URI that can be used to access the file content.
+ */
+ @JsonProperty(value = "uri")
+ private String uri;
+
+ /*
+ * Dictionary of
+ */
+ @JsonProperty(value = "headers")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map headers;
+
+ /**
+ * Get the uri property: A URI that can be used to access the file content.
+ *
+ * @return the uri value.
+ */
+ public String uri() {
+ return this.uri;
+ }
+
+ /**
+ * Set the uri property: A URI that can be used to access the file content.
+ *
+ * @param uri the uri value to set.
+ * @return the FileStorageInfoInner object itself.
+ */
+ public FileStorageInfoInner withUri(String uri) {
+ this.uri = uri;
+ return this;
+ }
+
+ /**
+ * Get the headers property: Dictionary of <string>.
+ *
+ * @return the headers value.
+ */
+ public Map headers() {
+ return this.headers;
+ }
+
+ /**
+ * Set the headers property: Dictionary of <string>.
+ *
+ * @param headers the headers value to set.
+ * @return the FileStorageInfoInner object itself.
+ */
+ public FileStorageInfoInner withHeaders(Map headers) {
+ this.headers = headers;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/IntegrationRuntimeMonitoringDataInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/IntegrationRuntimeMonitoringDataInner.java
new file mode 100644
index 0000000000000..96e0c51f240b3
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/IntegrationRuntimeMonitoringDataInner.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.datamigration.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.resourcemanager.datamigration.models.NodeMonitoringData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Integration Runtime Monitoring Data. */
+@Immutable
+public final class IntegrationRuntimeMonitoringDataInner {
+ /*
+ * The name of Integration Runtime.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Integration Runtime node monitoring data.
+ */
+ @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY)
+ private List nodes;
+
+ /**
+ * Get the name property: The name of Integration Runtime.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the nodes property: Integration Runtime node monitoring data.
+ *
+ * @return the nodes value.
+ */
+ public List nodes() {
+ return this.nodes;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (nodes() != null) {
+ nodes().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java
index d80dbc0a2a7bd..dab839be3bcfa 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/NameAvailabilityResponseInner.java
@@ -4,35 +4,31 @@
package com.azure.resourcemanager.datamigration.fluent.models;
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.datamigration.models.NameCheckFailureReason;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Indicates whether a proposed resource name is available. */
-@Immutable
+@Fluent
public final class NameAvailabilityResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(NameAvailabilityResponseInner.class);
-
/*
* If true, the name is valid and available. If false, 'reason' describes
* why not.
*/
- @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "nameAvailable")
private Boolean nameAvailable;
/*
* The reason why the name is not available, if nameAvailable is false
*/
- @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "reason")
private NameCheckFailureReason reason;
/*
* The localized reason why the name is not available, if nameAvailable is
* false
*/
- @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "message")
private String message;
/**
@@ -44,6 +40,17 @@ public Boolean nameAvailable() {
return this.nameAvailable;
}
+ /**
+ * Set the nameAvailable property: If true, the name is valid and available. If false, 'reason' describes why not.
+ *
+ * @param nameAvailable the nameAvailable value to set.
+ * @return the NameAvailabilityResponseInner object itself.
+ */
+ public NameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
/**
* Get the reason property: The reason why the name is not available, if nameAvailable is false.
*
@@ -53,6 +60,17 @@ public NameCheckFailureReason reason() {
return this.reason;
}
+ /**
+ * Set the reason property: The reason why the name is not available, if nameAvailable is false.
+ *
+ * @param reason the reason value to set.
+ * @return the NameAvailabilityResponseInner object itself.
+ */
+ public NameAvailabilityResponseInner withReason(NameCheckFailureReason reason) {
+ this.reason = reason;
+ return this;
+ }
+
/**
* Get the message property: The localized reason why the name is not available, if nameAvailable is false.
*
@@ -62,6 +80,17 @@ public String message() {
return this.message;
}
+ /**
+ * Set the message property: The localized reason why the name is not available, if nameAvailable is false.
+ *
+ * @param message the message value to set.
+ * @return the NameAvailabilityResponseInner object itself.
+ */
+ public NameAvailabilityResponseInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/OperationsDefinitionInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/OperationsDefinitionInner.java
new file mode 100644
index 0000000000000..b440665eaeee6
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/OperationsDefinitionInner.java
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.datamigration.models.OperationOrigin;
+import com.azure.resourcemanager.datamigration.models.OperationsDisplayDefinition;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The OperationsDefinition model. */
+@Fluent
+public final class OperationsDefinitionInner {
+ /*
+ * The name property.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Indicates whether the operation is a data action
+ */
+ @JsonProperty(value = "isDataAction")
+ private Boolean isDataAction;
+
+ /*
+ * The display property.
+ */
+ @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationsDisplayDefinition display;
+
+ /*
+ * The origin property.
+ */
+ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationOrigin origin;
+
+ /*
+ * Dictionary of
+ */
+ @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map properties;
+
+ /**
+ * Get the name property: The name property.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Set the isDataAction property: Indicates whether the operation is a data action.
+ *
+ * @param isDataAction the isDataAction value to set.
+ * @return the OperationsDefinitionInner object itself.
+ */
+ public OperationsDefinitionInner withIsDataAction(Boolean isDataAction) {
+ this.isDataAction = isDataAction;
+ return this;
+ }
+
+ /**
+ * Get the display property: The display property.
+ *
+ * @return the display value.
+ */
+ public OperationsDisplayDefinition display() {
+ return this.display;
+ }
+
+ /**
+ * Get the origin property: The origin property.
+ *
+ * @return the origin value.
+ */
+ public OperationOrigin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the properties property: Dictionary of <AnyObject>.
+ *
+ * @return the properties value.
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectFileInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectFileInner.java
new file mode 100644
index 0000000000000..52b9ab65f64a8
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectFileInner.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.models.ProjectFileProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A file resource. */
+@Fluent
+public final class ProjectFileInner extends ProxyResource {
+ /*
+ * HTTP strong entity tag value. This is ignored if submitted.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /*
+ * Custom file properties
+ */
+ @JsonProperty(value = "properties")
+ private ProjectFileProperties properties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the etag property: HTTP strong entity tag value. This is ignored if submitted.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: HTTP strong entity tag value. This is ignored if submitted.
+ *
+ * @param etag the etag value to set.
+ * @return the ProjectFileInner object itself.
+ */
+ public ProjectFileInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the properties property: Custom file properties.
+ *
+ * @return the properties value.
+ */
+ public ProjectFileProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Custom file properties.
+ *
+ * @param properties the properties value to set.
+ * @return the ProjectFileInner object itself.
+ */
+ public ProjectFileInner withProperties(ProjectFileProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java
index 478836c6d79e2..27e08e768a3a3 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectInner.java
@@ -5,67 +5,91 @@
package com.azure.resourcemanager.datamigration.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.models.AzureActiveDirectoryApp;
import com.azure.resourcemanager.datamigration.models.ConnectionInfo;
import com.azure.resourcemanager.datamigration.models.DatabaseInfo;
import com.azure.resourcemanager.datamigration.models.ProjectProvisioningState;
import com.azure.resourcemanager.datamigration.models.ProjectSourcePlatform;
import com.azure.resourcemanager.datamigration.models.ProjectTargetPlatform;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
/** A project resource. */
-@JsonFlatten
@Fluent
-public class ProjectInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectInner.class);
-
+public final class ProjectInner extends Resource {
/*
- * Source platform for the project
+ * Project properties
*/
- @JsonProperty(value = "properties.sourcePlatform")
- private ProjectSourcePlatform sourcePlatform;
+ @JsonProperty(value = "properties")
+ private ProjectProperties innerProperties;
/*
- * Target platform for the project
+ * HTTP strong entity tag value. This is ignored if submitted.
*/
- @JsonProperty(value = "properties.targetPlatform")
- private ProjectTargetPlatform targetPlatform;
+ @JsonProperty(value = "etag")
+ private String etag;
/*
- * UTC Date and time when project was created
+ * The systemData property.
*/
- @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY)
- private OffsetDateTime creationTime;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
- /*
- * Information for connecting to source
+ /**
+ * Get the innerProperties property: Project properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.sourceConnectionInfo")
- private ConnectionInfo sourceConnectionInfo;
+ private ProjectProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Information for connecting to target
+ /**
+ * Get the etag property: HTTP strong entity tag value. This is ignored if submitted.
+ *
+ * @return the etag value.
*/
- @JsonProperty(value = "properties.targetConnectionInfo")
- private ConnectionInfo targetConnectionInfo;
+ public String etag() {
+ return this.etag;
+ }
- /*
- * List of DatabaseInfo
+ /**
+ * Set the etag property: HTTP strong entity tag value. This is ignored if submitted.
+ *
+ * @param etag the etag value to set.
+ * @return the ProjectInner object itself.
*/
- @JsonProperty(value = "properties.databasesInfo")
- private List databasesInfo;
+ public ProjectInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
- /*
- * The project's provisioning state
+ /**
+ * Get the systemData property: The systemData property.
+ *
+ * @return the systemData value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProjectProvisioningState provisioningState;
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ProjectInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ProjectInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
/**
* Get the sourcePlatform property: Source platform for the project.
@@ -73,7 +97,7 @@ public class ProjectInner extends Resource {
* @return the sourcePlatform value.
*/
public ProjectSourcePlatform sourcePlatform() {
- return this.sourcePlatform;
+ return this.innerProperties() == null ? null : this.innerProperties().sourcePlatform();
}
/**
@@ -83,7 +107,35 @@ public ProjectSourcePlatform sourcePlatform() {
* @return the ProjectInner object itself.
*/
public ProjectInner withSourcePlatform(ProjectSourcePlatform sourcePlatform) {
- this.sourcePlatform = sourcePlatform;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withSourcePlatform(sourcePlatform);
+ return this;
+ }
+
+ /**
+ * Get the azureAuthenticationInfo property: Field that defines the Azure active directory application info, used to
+ * connect to the target Azure resource.
+ *
+ * @return the azureAuthenticationInfo value.
+ */
+ public AzureActiveDirectoryApp azureAuthenticationInfo() {
+ return this.innerProperties() == null ? null : this.innerProperties().azureAuthenticationInfo();
+ }
+
+ /**
+ * Set the azureAuthenticationInfo property: Field that defines the Azure active directory application info, used to
+ * connect to the target Azure resource.
+ *
+ * @param azureAuthenticationInfo the azureAuthenticationInfo value to set.
+ * @return the ProjectInner object itself.
+ */
+ public ProjectInner withAzureAuthenticationInfo(AzureActiveDirectoryApp azureAuthenticationInfo) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withAzureAuthenticationInfo(azureAuthenticationInfo);
return this;
}
@@ -93,7 +145,7 @@ public ProjectInner withSourcePlatform(ProjectSourcePlatform sourcePlatform) {
* @return the targetPlatform value.
*/
public ProjectTargetPlatform targetPlatform() {
- return this.targetPlatform;
+ return this.innerProperties() == null ? null : this.innerProperties().targetPlatform();
}
/**
@@ -103,7 +155,10 @@ public ProjectTargetPlatform targetPlatform() {
* @return the ProjectInner object itself.
*/
public ProjectInner withTargetPlatform(ProjectTargetPlatform targetPlatform) {
- this.targetPlatform = targetPlatform;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withTargetPlatform(targetPlatform);
return this;
}
@@ -113,7 +168,7 @@ public ProjectInner withTargetPlatform(ProjectTargetPlatform targetPlatform) {
* @return the creationTime value.
*/
public OffsetDateTime creationTime() {
- return this.creationTime;
+ return this.innerProperties() == null ? null : this.innerProperties().creationTime();
}
/**
@@ -122,7 +177,7 @@ public OffsetDateTime creationTime() {
* @return the sourceConnectionInfo value.
*/
public ConnectionInfo sourceConnectionInfo() {
- return this.sourceConnectionInfo;
+ return this.innerProperties() == null ? null : this.innerProperties().sourceConnectionInfo();
}
/**
@@ -132,7 +187,10 @@ public ConnectionInfo sourceConnectionInfo() {
* @return the ProjectInner object itself.
*/
public ProjectInner withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) {
- this.sourceConnectionInfo = sourceConnectionInfo;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withSourceConnectionInfo(sourceConnectionInfo);
return this;
}
@@ -142,7 +200,7 @@ public ProjectInner withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo
* @return the targetConnectionInfo value.
*/
public ConnectionInfo targetConnectionInfo() {
- return this.targetConnectionInfo;
+ return this.innerProperties() == null ? null : this.innerProperties().targetConnectionInfo();
}
/**
@@ -152,7 +210,10 @@ public ConnectionInfo targetConnectionInfo() {
* @return the ProjectInner object itself.
*/
public ProjectInner withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) {
- this.targetConnectionInfo = targetConnectionInfo;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withTargetConnectionInfo(targetConnectionInfo);
return this;
}
@@ -162,7 +223,7 @@ public ProjectInner withTargetConnectionInfo(ConnectionInfo targetConnectionInfo
* @return the databasesInfo value.
*/
public List databasesInfo() {
- return this.databasesInfo;
+ return this.innerProperties() == null ? null : this.innerProperties().databasesInfo();
}
/**
@@ -172,7 +233,10 @@ public List databasesInfo() {
* @return the ProjectInner object itself.
*/
public ProjectInner withDatabasesInfo(List databasesInfo) {
- this.databasesInfo = databasesInfo;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ProjectProperties();
+ }
+ this.innerProperties().withDatabasesInfo(databasesInfo);
return this;
}
@@ -182,21 +246,7 @@ public ProjectInner withDatabasesInfo(List databasesInfo) {
* @return the provisioningState value.
*/
public ProjectProvisioningState provisioningState() {
- return this.provisioningState;
- }
-
- /** {@inheritDoc} */
- @Override
- public ProjectInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public ProjectInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -205,14 +255,8 @@ public ProjectInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (sourceConnectionInfo() != null) {
- sourceConnectionInfo().validate();
- }
- if (targetConnectionInfo() != null) {
- targetConnectionInfo().validate();
- }
- if (databasesInfo() != null) {
- databasesInfo().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectProperties.java
new file mode 100644
index 0000000000000..440c057e2c9a5
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectProperties.java
@@ -0,0 +1,244 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.datamigration.models.AzureActiveDirectoryApp;
+import com.azure.resourcemanager.datamigration.models.ConnectionInfo;
+import com.azure.resourcemanager.datamigration.models.DatabaseInfo;
+import com.azure.resourcemanager.datamigration.models.ProjectProvisioningState;
+import com.azure.resourcemanager.datamigration.models.ProjectSourcePlatform;
+import com.azure.resourcemanager.datamigration.models.ProjectTargetPlatform;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+import java.util.List;
+
+/** Project-specific properties. */
+@Fluent
+public final class ProjectProperties {
+ /*
+ * Source platform for the project
+ */
+ @JsonProperty(value = "sourcePlatform", required = true)
+ private ProjectSourcePlatform sourcePlatform;
+
+ /*
+ * Field that defines the Azure active directory application info, used to
+ * connect to the target Azure resource
+ */
+ @JsonProperty(value = "azureAuthenticationInfo")
+ private AzureActiveDirectoryApp azureAuthenticationInfo;
+
+ /*
+ * Target platform for the project
+ */
+ @JsonProperty(value = "targetPlatform", required = true)
+ private ProjectTargetPlatform targetPlatform;
+
+ /*
+ * UTC Date and time when project was created
+ */
+ @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime creationTime;
+
+ /*
+ * Information for connecting to source
+ */
+ @JsonProperty(value = "sourceConnectionInfo")
+ private ConnectionInfo sourceConnectionInfo;
+
+ /*
+ * Information for connecting to target
+ */
+ @JsonProperty(value = "targetConnectionInfo")
+ private ConnectionInfo targetConnectionInfo;
+
+ /*
+ * List of DatabaseInfo
+ */
+ @JsonProperty(value = "databasesInfo")
+ private List databasesInfo;
+
+ /*
+ * The project's provisioning state
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProjectProvisioningState provisioningState;
+
+ /**
+ * Get the sourcePlatform property: Source platform for the project.
+ *
+ * @return the sourcePlatform value.
+ */
+ public ProjectSourcePlatform sourcePlatform() {
+ return this.sourcePlatform;
+ }
+
+ /**
+ * Set the sourcePlatform property: Source platform for the project.
+ *
+ * @param sourcePlatform the sourcePlatform value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withSourcePlatform(ProjectSourcePlatform sourcePlatform) {
+ this.sourcePlatform = sourcePlatform;
+ return this;
+ }
+
+ /**
+ * Get the azureAuthenticationInfo property: Field that defines the Azure active directory application info, used to
+ * connect to the target Azure resource.
+ *
+ * @return the azureAuthenticationInfo value.
+ */
+ public AzureActiveDirectoryApp azureAuthenticationInfo() {
+ return this.azureAuthenticationInfo;
+ }
+
+ /**
+ * Set the azureAuthenticationInfo property: Field that defines the Azure active directory application info, used to
+ * connect to the target Azure resource.
+ *
+ * @param azureAuthenticationInfo the azureAuthenticationInfo value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withAzureAuthenticationInfo(AzureActiveDirectoryApp azureAuthenticationInfo) {
+ this.azureAuthenticationInfo = azureAuthenticationInfo;
+ return this;
+ }
+
+ /**
+ * Get the targetPlatform property: Target platform for the project.
+ *
+ * @return the targetPlatform value.
+ */
+ public ProjectTargetPlatform targetPlatform() {
+ return this.targetPlatform;
+ }
+
+ /**
+ * Set the targetPlatform property: Target platform for the project.
+ *
+ * @param targetPlatform the targetPlatform value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withTargetPlatform(ProjectTargetPlatform targetPlatform) {
+ this.targetPlatform = targetPlatform;
+ return this;
+ }
+
+ /**
+ * Get the creationTime property: UTC Date and time when project was created.
+ *
+ * @return the creationTime value.
+ */
+ public OffsetDateTime creationTime() {
+ return this.creationTime;
+ }
+
+ /**
+ * Get the sourceConnectionInfo property: Information for connecting to source.
+ *
+ * @return the sourceConnectionInfo value.
+ */
+ public ConnectionInfo sourceConnectionInfo() {
+ return this.sourceConnectionInfo;
+ }
+
+ /**
+ * Set the sourceConnectionInfo property: Information for connecting to source.
+ *
+ * @param sourceConnectionInfo the sourceConnectionInfo value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withSourceConnectionInfo(ConnectionInfo sourceConnectionInfo) {
+ this.sourceConnectionInfo = sourceConnectionInfo;
+ return this;
+ }
+
+ /**
+ * Get the targetConnectionInfo property: Information for connecting to target.
+ *
+ * @return the targetConnectionInfo value.
+ */
+ public ConnectionInfo targetConnectionInfo() {
+ return this.targetConnectionInfo;
+ }
+
+ /**
+ * Set the targetConnectionInfo property: Information for connecting to target.
+ *
+ * @param targetConnectionInfo the targetConnectionInfo value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withTargetConnectionInfo(ConnectionInfo targetConnectionInfo) {
+ this.targetConnectionInfo = targetConnectionInfo;
+ return this;
+ }
+
+ /**
+ * Get the databasesInfo property: List of DatabaseInfo.
+ *
+ * @return the databasesInfo value.
+ */
+ public List databasesInfo() {
+ return this.databasesInfo;
+ }
+
+ /**
+ * Set the databasesInfo property: List of DatabaseInfo.
+ *
+ * @param databasesInfo the databasesInfo value to set.
+ * @return the ProjectProperties object itself.
+ */
+ public ProjectProperties withDatabasesInfo(List databasesInfo) {
+ this.databasesInfo = databasesInfo;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The project's provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ProjectProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sourcePlatform() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property sourcePlatform in model ProjectProperties"));
+ }
+ if (azureAuthenticationInfo() != null) {
+ azureAuthenticationInfo().validate();
+ }
+ if (targetPlatform() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property targetPlatform in model ProjectProperties"));
+ }
+ if (sourceConnectionInfo() != null) {
+ sourceConnectionInfo().validate();
+ }
+ if (targetConnectionInfo() != null) {
+ targetConnectionInfo().validate();
+ }
+ if (databasesInfo() != null) {
+ databasesInfo().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ProjectProperties.class);
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java
index 7e38d4be1d3d4..8b8506a877c99 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ProjectTaskInner.java
@@ -6,16 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.management.SystemData;
import com.azure.resourcemanager.datamigration.models.ProjectTaskProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** A task resource. */
@Fluent
public final class ProjectTaskInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ProjectTaskInner.class);
-
/*
* HTTP strong entity tag value. This is ignored if submitted.
*/
@@ -28,6 +25,12 @@ public final class ProjectTaskInner extends ProxyResource {
@JsonProperty(value = "properties")
private ProjectTaskProperties properties;
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
/**
* Get the etag property: HTTP strong entity tag value. This is ignored if submitted.
*
@@ -68,6 +71,15 @@ public ProjectTaskInner withProperties(ProjectTaskProperties properties) {
return this;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java
index d5e768228b113..b2824f937de16 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/QuotaInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.datamigration.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datamigration.models.QuotaName;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Describes a quota for or usage details about a resource. */
@Fluent
public final class QuotaInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaInner.class);
-
/*
* The current value of the quota. If null or missing, the current value
* cannot be determined in the context of the request.
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/RegenAuthKeysInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/RegenAuthKeysInner.java
new file mode 100644
index 0000000000000..5f1731d2b4b7b
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/RegenAuthKeysInner.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An authentication key to regenerate. */
+@Fluent
+public final class RegenAuthKeysInner {
+ /*
+ * The name of authentication key to generate.
+ */
+ @JsonProperty(value = "keyName")
+ private String keyName;
+
+ /*
+ * The first authentication key.
+ */
+ @JsonProperty(value = "authKey1")
+ private String authKey1;
+
+ /*
+ * The second authentication key.
+ */
+ @JsonProperty(value = "authKey2")
+ private String authKey2;
+
+ /**
+ * Get the keyName property: The name of authentication key to generate.
+ *
+ * @return the keyName value.
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set the keyName property: The name of authentication key to generate.
+ *
+ * @param keyName the keyName value to set.
+ * @return the RegenAuthKeysInner object itself.
+ */
+ public RegenAuthKeysInner withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+ /**
+ * Get the authKey1 property: The first authentication key.
+ *
+ * @return the authKey1 value.
+ */
+ public String authKey1() {
+ return this.authKey1;
+ }
+
+ /**
+ * Set the authKey1 property: The first authentication key.
+ *
+ * @param authKey1 the authKey1 value to set.
+ * @return the RegenAuthKeysInner object itself.
+ */
+ public RegenAuthKeysInner withAuthKey1(String authKey1) {
+ this.authKey1 = authKey1;
+ return this;
+ }
+
+ /**
+ * Get the authKey2 property: The second authentication key.
+ *
+ * @return the authKey2 value.
+ */
+ public String authKey2() {
+ return this.authKey2;
+ }
+
+ /**
+ * Set the authKey2 property: The second authentication key.
+ *
+ * @param authKey2 the authKey2 value to set.
+ * @return the RegenAuthKeysInner object itself.
+ */
+ public RegenAuthKeysInner withAuthKey2(String authKey2) {
+ this.authKey2 = authKey2;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java
index 2fbc5472bd095..924dcce6554f0 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ResourceSkuInner.java
@@ -5,20 +5,16 @@
package com.azure.resourcemanager.datamigration.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.datamigration.models.ResourceSkuCapabilities;
import com.azure.resourcemanager.datamigration.models.ResourceSkuCapacity;
import com.azure.resourcemanager.datamigration.models.ResourceSkuCosts;
import com.azure.resourcemanager.datamigration.models.ResourceSkuRestrictions;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Describes an available DMS SKU. */
@Immutable
public final class ResourceSkuInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuInner.class);
-
/*
* The type of resource the SKU applies to.
*/
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java
deleted file mode 100644
index 0809e0e4d86f0..0000000000000
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/ServiceOperationInner.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.datamigration.fluent.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.datamigration.models.ServiceOperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** Description of an action supported by the Database Migration Service. */
-@Fluent
-public final class ServiceOperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceOperationInner.class);
-
- /*
- * The fully qualified action name, e.g.
- * Microsoft.DataMigration/services/read
- */
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * Localized display text
- */
- @JsonProperty(value = "display")
- private ServiceOperationDisplay display;
-
- /**
- * Get the name property: The fully qualified action name, e.g. Microsoft.DataMigration/services/read.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The fully qualified action name, e.g. Microsoft.DataMigration/services/read.
- *
- * @param name the name value to set.
- * @return the ServiceOperationInner object itself.
- */
- public ServiceOperationInner withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the display property: Localized display text.
- *
- * @return the display value.
- */
- public ServiceOperationDisplay display() {
- return this.display;
- }
-
- /**
- * Set the display property: Localized display text.
- *
- * @param display the display value to set.
- * @return the ServiceOperationInner object itself.
- */
- public ServiceOperationInner withDisplay(ServiceOperationDisplay display) {
- this.display = display;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (display() != null) {
- display().validate();
- }
- }
-}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceInner.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceInner.java
new file mode 100644
index 0000000000000..4e5a775944a24
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceInner.java
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** A SQL Migration Service. */
+@Fluent
+public final class SqlMigrationServiceInner extends Resource {
+ /*
+ * The SQL Migration Service properties.
+ */
+ @JsonProperty(value = "properties")
+ private SqlMigrationServiceProperties innerProperties;
+
+ /*
+ * The systemData property.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: The SQL Migration Service properties.
+ *
+ * @return the innerProperties value.
+ */
+ private SqlMigrationServiceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: The systemData property.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SqlMigrationServiceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SqlMigrationServiceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state to track the async operation status.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the integrationRuntimeState property: Current state of the Integration runtime.
+ *
+ * @return the integrationRuntimeState value.
+ */
+ public String integrationRuntimeState() {
+ return this.innerProperties() == null ? null : this.innerProperties().integrationRuntimeState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceProperties.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceProperties.java
new file mode 100644
index 0000000000000..358a1f5789dde
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/fluent/models/SqlMigrationServiceProperties.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The SQL Migration Service properties. */
+@Immutable
+public final class SqlMigrationServiceProperties {
+ /*
+ * Provisioning state to track the async operation status.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * Current state of the Integration runtime.
+ */
+ @JsonProperty(value = "integrationRuntimeState", access = JsonProperty.Access.WRITE_ONLY)
+ private String integrationRuntimeState;
+
+ /**
+ * Get the provisioningState property: Provisioning state to track the async operation status.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the integrationRuntimeState property: Current state of the Integration runtime.
+ *
+ * @return the integrationRuntimeState value.
+ */
+ public String integrationRuntimeState() {
+ return this.integrationRuntimeState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AuthenticationKeysImpl.java
similarity index 52%
rename from sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java
rename to sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AuthenticationKeysImpl.java
index 67bb7306fa126..073693b4db501 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/ServiceOperationImpl.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AuthenticationKeysImpl.java
@@ -4,31 +4,30 @@
package com.azure.resourcemanager.datamigration.implementation;
-import com.azure.resourcemanager.datamigration.fluent.models.ServiceOperationInner;
-import com.azure.resourcemanager.datamigration.models.ServiceOperation;
-import com.azure.resourcemanager.datamigration.models.ServiceOperationDisplay;
+import com.azure.resourcemanager.datamigration.fluent.models.AuthenticationKeysInner;
+import com.azure.resourcemanager.datamigration.models.AuthenticationKeys;
-public final class ServiceOperationImpl implements ServiceOperation {
- private ServiceOperationInner innerObject;
+public final class AuthenticationKeysImpl implements AuthenticationKeys {
+ private AuthenticationKeysInner innerObject;
private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
- ServiceOperationImpl(
- ServiceOperationInner innerObject,
+ AuthenticationKeysImpl(
+ AuthenticationKeysInner innerObject,
com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
- public String name() {
- return this.innerModel().name();
+ public String authKey1() {
+ return this.innerModel().authKey1();
}
- public ServiceOperationDisplay display() {
- return this.innerModel().display();
+ public String authKey2() {
+ return this.innerModel().authKey2();
}
- public ServiceOperationInner innerModel() {
+ public AuthenticationKeysInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java
index e9c35aa62436e..13ab64ec02fcb 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/AvailableServiceSkuImpl.java
@@ -6,8 +6,8 @@
import com.azure.resourcemanager.datamigration.fluent.models.AvailableServiceSkuInner;
import com.azure.resourcemanager.datamigration.models.AvailableServiceSku;
-import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuAutoGenerated;
import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuCapacity;
+import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuSku;
public final class AvailableServiceSkuImpl implements AvailableServiceSku {
private AvailableServiceSkuInner innerObject;
@@ -25,7 +25,7 @@ public String resourceType() {
return this.innerModel().resourceType();
}
- public AvailableServiceSkuAutoGenerated sku() {
+ public AvailableServiceSkuSku sku() {
return this.innerModel().sku();
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/CommandPropertiesImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/CommandPropertiesImpl.java
new file mode 100644
index 0000000000000..5ae5c74ee66ba
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/CommandPropertiesImpl.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.implementation;
+
+import com.azure.core.management.exception.ManagementError;
+import com.azure.resourcemanager.datamigration.fluent.models.CommandPropertiesInner;
+import com.azure.resourcemanager.datamigration.models.CommandProperties;
+import com.azure.resourcemanager.datamigration.models.CommandState;
+import java.util.Collections;
+import java.util.List;
+
+public final class CommandPropertiesImpl implements CommandProperties {
+ private CommandPropertiesInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ CommandPropertiesImpl(
+ CommandPropertiesInner innerObject,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List errors() {
+ List inner = this.innerModel().errors();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public CommandState state() {
+ return this.innerModel().state();
+ }
+
+ public CommandPropertiesInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java
index d28dc06eb2a3a..9515832621634 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -19,12 +18,12 @@
@ServiceClientBuilder(serviceClients = {DataMigrationManagementClientImpl.class})
public final class DataMigrationManagementClientBuilder {
/*
- * Identifier of the subscription
+ * Subscription ID that identifies an Azure subscription.
*/
private String subscriptionId;
/**
- * Sets Identifier of the subscription.
+ * Sets Subscription ID that identifies an Azure subscription.
*
* @param subscriptionId the subscriptionId value.
* @return the DataMigrationManagementClientBuilder.
@@ -67,34 +66,34 @@ public DataMigrationManagementClientBuilder environment(AzureEnvironment environ
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the DataMigrationManagementClientBuilder.
*/
- public DataMigrationManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public DataMigrationManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the DataMigrationManagementClientBuilder.
*/
- public DataMigrationManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public DataMigrationManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,21 +119,21 @@ public DataMigrationManagementClientBuilder serializerAdapter(SerializerAdapter
* @return an instance of DataMigrationManagementClientImpl.
*/
public DataMigrationManagementClientImpl buildClient() {
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (endpoint == null) {
this.endpoint = "https://management.azure.com";
}
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java
index d8cb91cfe406e..007fe88480d78 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationManagementClientImpl.java
@@ -22,10 +22,16 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.datamigration.fluent.DataMigrationManagementClient;
+import com.azure.resourcemanager.datamigration.fluent.DatabaseMigrationsSqlDbsClient;
+import com.azure.resourcemanager.datamigration.fluent.DatabaseMigrationsSqlMisClient;
+import com.azure.resourcemanager.datamigration.fluent.DatabaseMigrationsSqlVmsClient;
+import com.azure.resourcemanager.datamigration.fluent.FilesClient;
import com.azure.resourcemanager.datamigration.fluent.OperationsClient;
import com.azure.resourcemanager.datamigration.fluent.ProjectsClient;
import com.azure.resourcemanager.datamigration.fluent.ResourceSkusClient;
+import com.azure.resourcemanager.datamigration.fluent.ServiceTasksClient;
import com.azure.resourcemanager.datamigration.fluent.ServicesClient;
+import com.azure.resourcemanager.datamigration.fluent.SqlMigrationServicesClient;
import com.azure.resourcemanager.datamigration.fluent.TasksClient;
import com.azure.resourcemanager.datamigration.fluent.UsagesClient;
import java.io.IOException;
@@ -41,13 +47,11 @@
/** Initializes a new instance of the DataMigrationManagementClientImpl type. */
@ServiceClient(builder = DataMigrationManagementClientBuilder.class)
public final class DataMigrationManagementClientImpl implements DataMigrationManagementClient {
- private final ClientLogger logger = new ClientLogger(DataMigrationManagementClientImpl.class);
-
- /** Identifier of the subscription. */
+ /** Subscription ID that identifies an Azure subscription. */
private final String subscriptionId;
/**
- * Gets Identifier of the subscription.
+ * Gets Subscription ID that identifies an Azure subscription.
*
* @return the subscriptionId value.
*/
@@ -115,6 +119,66 @@ public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
+ /** The DatabaseMigrationsSqlDbsClient object to access its operations. */
+ private final DatabaseMigrationsSqlDbsClient databaseMigrationsSqlDbs;
+
+ /**
+ * Gets the DatabaseMigrationsSqlDbsClient object to access its operations.
+ *
+ * @return the DatabaseMigrationsSqlDbsClient object.
+ */
+ public DatabaseMigrationsSqlDbsClient getDatabaseMigrationsSqlDbs() {
+ return this.databaseMigrationsSqlDbs;
+ }
+
+ /** The DatabaseMigrationsSqlMisClient object to access its operations. */
+ private final DatabaseMigrationsSqlMisClient databaseMigrationsSqlMis;
+
+ /**
+ * Gets the DatabaseMigrationsSqlMisClient object to access its operations.
+ *
+ * @return the DatabaseMigrationsSqlMisClient object.
+ */
+ public DatabaseMigrationsSqlMisClient getDatabaseMigrationsSqlMis() {
+ return this.databaseMigrationsSqlMis;
+ }
+
+ /** The DatabaseMigrationsSqlVmsClient object to access its operations. */
+ private final DatabaseMigrationsSqlVmsClient databaseMigrationsSqlVms;
+
+ /**
+ * Gets the DatabaseMigrationsSqlVmsClient object to access its operations.
+ *
+ * @return the DatabaseMigrationsSqlVmsClient object.
+ */
+ public DatabaseMigrationsSqlVmsClient getDatabaseMigrationsSqlVms() {
+ return this.databaseMigrationsSqlVms;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The SqlMigrationServicesClient object to access its operations. */
+ private final SqlMigrationServicesClient sqlMigrationServices;
+
+ /**
+ * Gets the SqlMigrationServicesClient object to access its operations.
+ *
+ * @return the SqlMigrationServicesClient object.
+ */
+ public SqlMigrationServicesClient getSqlMigrationServices() {
+ return this.sqlMigrationServices;
+ }
+
/** The ResourceSkusClient object to access its operations. */
private final ResourceSkusClient resourceSkus;
@@ -151,6 +215,18 @@ public TasksClient getTasks() {
return this.tasks;
}
+ /** The ServiceTasksClient object to access its operations. */
+ private final ServiceTasksClient serviceTasks;
+
+ /**
+ * Gets the ServiceTasksClient object to access its operations.
+ *
+ * @return the ServiceTasksClient object.
+ */
+ public ServiceTasksClient getServiceTasks() {
+ return this.serviceTasks;
+ }
+
/** The ProjectsClient object to access its operations. */
private final ProjectsClient projects;
@@ -175,16 +251,16 @@ public UsagesClient getUsages() {
return this.usages;
}
- /** The OperationsClient object to access its operations. */
- private final OperationsClient operations;
+ /** The FilesClient object to access its operations. */
+ private final FilesClient files;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the FilesClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the FilesClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public FilesClient getFiles() {
+ return this.files;
}
/**
@@ -194,7 +270,7 @@ public OperationsClient getOperations() {
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId Identifier of the subscription.
+ * @param subscriptionId Subscription ID that identifies an Azure subscription.
* @param endpoint server parameter.
*/
DataMigrationManagementClientImpl(
@@ -209,13 +285,19 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2018-04-19";
+ this.apiVersion = "2022-03-30-preview";
+ this.databaseMigrationsSqlDbs = new DatabaseMigrationsSqlDbsClientImpl(this);
+ this.databaseMigrationsSqlMis = new DatabaseMigrationsSqlMisClientImpl(this);
+ this.databaseMigrationsSqlVms = new DatabaseMigrationsSqlVmsClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.sqlMigrationServices = new SqlMigrationServicesClientImpl(this);
this.resourceSkus = new ResourceSkusClientImpl(this);
this.services = new ServicesClientImpl(this);
this.tasks = new TasksClientImpl(this);
+ this.serviceTasks = new ServiceTasksClientImpl(this);
this.projects = new ProjectsClientImpl(this);
this.usages = new UsagesClientImpl(this);
- this.operations = new OperationsClientImpl(this);
+ this.files = new FilesClientImpl(this);
}
/**
@@ -301,7 +383,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
managementError = null;
}
} catch (IOException | RuntimeException ioe) {
- logger.logThrowableAsWarning(ioe);
+ LOGGER.logThrowableAsWarning(ioe);
}
}
} else {
@@ -360,4 +442,6 @@ public Mono getBodyAsString(Charset charset) {
return Mono.just(new String(responseBody, charset));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DataMigrationManagementClientImpl.class);
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java
index 1161977596375..081d63d5f0d05 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceImpl.java
@@ -6,6 +6,7 @@
import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.datamigration.fluent.models.DataMigrationServiceInner;
import com.azure.resourcemanager.datamigration.models.DataMigrationService;
@@ -60,6 +61,10 @@ public ServiceSku sku() {
return this.innerModel().sku();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public ServiceProvisioningState provisioningState() {
return this.innerModel().provisioningState();
}
@@ -72,6 +77,18 @@ public String virtualSubnetId() {
return this.innerModel().virtualSubnetId();
}
+ public String virtualNicId() {
+ return this.innerModel().virtualNicId();
+ }
+
+ public String autoStopDelay() {
+ return this.innerModel().autoStopDelay();
+ }
+
+ public Boolean deleteResourcesOnStop() {
+ return this.innerModel().deleteResourcesOnStop();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -193,15 +210,15 @@ public void stop(Context context) {
serviceManager.services().stop(groupName, serviceName, context);
}
- public NameAvailabilityResponse nestedCheckNameAvailability(NameAvailabilityRequest parameters) {
- return serviceManager.services().nestedCheckNameAvailability(groupName, serviceName, parameters);
+ public NameAvailabilityResponse checkChildrenNameAvailability(NameAvailabilityRequest parameters) {
+ return serviceManager.services().checkChildrenNameAvailability(groupName, serviceName, parameters);
}
- public Response nestedCheckNameAvailabilityWithResponse(
+ public Response checkChildrenNameAvailabilityWithResponse(
NameAvailabilityRequest parameters, Context context) {
return serviceManager
.services()
- .nestedCheckNameAvailabilityWithResponse(groupName, serviceName, parameters, context);
+ .checkChildrenNameAvailabilityWithResponse(groupName, serviceName, parameters, context);
}
public DataMigrationServiceImpl withRegion(Region location) {
@@ -243,4 +260,19 @@ public DataMigrationServiceImpl withVirtualSubnetId(String virtualSubnetId) {
this.innerModel().withVirtualSubnetId(virtualSubnetId);
return this;
}
+
+ public DataMigrationServiceImpl withVirtualNicId(String virtualNicId) {
+ this.innerModel().withVirtualNicId(virtualNicId);
+ return this;
+ }
+
+ public DataMigrationServiceImpl withAutoStopDelay(String autoStopDelay) {
+ this.innerModel().withAutoStopDelay(autoStopDelay);
+ return this;
+ }
+
+ public DataMigrationServiceImpl withDeleteResourcesOnStop(Boolean deleteResourcesOnStop) {
+ this.innerModel().withDeleteResourcesOnStop(deleteResourcesOnStop);
+ return this;
+ }
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java
index b1bb0a6723cd4..ada676133a568 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DataMigrationServiceStatusResponseImpl.java
@@ -25,6 +25,10 @@ public String agentVersion() {
return this.innerModel().agentVersion();
}
+ public Object agentConfiguration() {
+ return this.innerModel().agentConfiguration();
+ }
+
public String status() {
return this.innerModel().status();
}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationImpl.java
new file mode 100644
index 0000000000000..419968b714c8b
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigration;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationProperties;
+
+public final class DatabaseMigrationImpl implements DatabaseMigration {
+ private DatabaseMigrationInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ DatabaseMigrationImpl(
+ DatabaseMigrationInner innerObject,
+ com.azure.resourcemanager.datamigration.DataMigrationManager 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 SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public DatabaseMigrationProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public DatabaseMigrationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlDbImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlDbImpl.java
new file mode 100644
index 0000000000000..8f5eef1a8f60c
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlDbImpl.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlDbInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlDb;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationSqlDb;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+public final class DatabaseMigrationSqlDbImpl
+ implements DatabaseMigrationSqlDb, DatabaseMigrationSqlDb.Definition, DatabaseMigrationSqlDb.Update {
+ private DatabaseMigrationSqlDbInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public DatabaseMigrationPropertiesSqlDb properties() {
+ return this.innerModel().properties();
+ }
+
+ public DatabaseMigrationSqlDbInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String sqlDbInstanceName;
+
+ private String targetDbName;
+
+ public DatabaseMigrationSqlDbImpl withExistingServer(String resourceGroupName, String sqlDbInstanceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.sqlDbInstanceName = sqlDbInstanceName;
+ return this;
+ }
+
+ public DatabaseMigrationSqlDb create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlDbs()
+ .createOrUpdate(resourceGroupName, sqlDbInstanceName, targetDbName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DatabaseMigrationSqlDb create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlDbs()
+ .createOrUpdate(resourceGroupName, sqlDbInstanceName, targetDbName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseMigrationSqlDbImpl(
+ String name, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = new DatabaseMigrationSqlDbInner();
+ this.serviceManager = serviceManager;
+ this.targetDbName = name;
+ }
+
+ public DatabaseMigrationSqlDbImpl update() {
+ return this;
+ }
+
+ public DatabaseMigrationSqlDb apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlDbs()
+ .createOrUpdate(resourceGroupName, sqlDbInstanceName, targetDbName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DatabaseMigrationSqlDb apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlDbs()
+ .createOrUpdate(resourceGroupName, sqlDbInstanceName, targetDbName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseMigrationSqlDbImpl(
+ DatabaseMigrationSqlDbInner innerObject,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.sqlDbInstanceName = Utils.getValueFromIdByName(innerObject.id(), "servers");
+ this.targetDbName = Utils.getValueFromIdByName(innerObject.id(), "databaseMigrations");
+ }
+
+ public DatabaseMigrationSqlDb refresh() {
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlDbs()
+ .getWithResponse(
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ localMigrationOperationId,
+ localExpand,
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DatabaseMigrationSqlDb refresh(Context context) {
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlDbs()
+ .getWithResponse(
+ resourceGroupName, sqlDbInstanceName, targetDbName, localMigrationOperationId, localExpand, context)
+ .getValue();
+ return this;
+ }
+
+ public void cancel(MigrationOperationInput parameters) {
+ serviceManager
+ .databaseMigrationsSqlDbs()
+ .cancel(resourceGroupName, sqlDbInstanceName, targetDbName, parameters);
+ }
+
+ public void cancel(MigrationOperationInput parameters, Context context) {
+ serviceManager
+ .databaseMigrationsSqlDbs()
+ .cancel(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context);
+ }
+
+ public DatabaseMigrationSqlDbImpl withProperties(DatabaseMigrationPropertiesSqlDb properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlMiImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlMiImpl.java
new file mode 100644
index 0000000000000..128a7fea27b26
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlMiImpl.java
@@ -0,0 +1,183 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlMiInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlMi;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationSqlMi;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+public final class DatabaseMigrationSqlMiImpl
+ implements DatabaseMigrationSqlMi, DatabaseMigrationSqlMi.Definition, DatabaseMigrationSqlMi.Update {
+ private DatabaseMigrationSqlMiInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public DatabaseMigrationPropertiesSqlMi properties() {
+ return this.innerModel().properties();
+ }
+
+ public DatabaseMigrationSqlMiInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String managedInstanceName;
+
+ private String targetDbName;
+
+ public DatabaseMigrationSqlMiImpl withExistingManagedInstance(
+ String resourceGroupName, String managedInstanceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.managedInstanceName = managedInstanceName;
+ return this;
+ }
+
+ public DatabaseMigrationSqlMi create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlMis()
+ .createOrUpdate(resourceGroupName, managedInstanceName, targetDbName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DatabaseMigrationSqlMi create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlMis()
+ .createOrUpdate(resourceGroupName, managedInstanceName, targetDbName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseMigrationSqlMiImpl(
+ String name, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = new DatabaseMigrationSqlMiInner();
+ this.serviceManager = serviceManager;
+ this.targetDbName = name;
+ }
+
+ public DatabaseMigrationSqlMiImpl update() {
+ return this;
+ }
+
+ public DatabaseMigrationSqlMi apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlMis()
+ .createOrUpdate(resourceGroupName, managedInstanceName, targetDbName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DatabaseMigrationSqlMi apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlMis()
+ .createOrUpdate(resourceGroupName, managedInstanceName, targetDbName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseMigrationSqlMiImpl(
+ DatabaseMigrationSqlMiInner innerObject,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.managedInstanceName = Utils.getValueFromIdByName(innerObject.id(), "managedInstances");
+ this.targetDbName = Utils.getValueFromIdByName(innerObject.id(), "databaseMigrations");
+ }
+
+ public DatabaseMigrationSqlMi refresh() {
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlMis()
+ .getWithResponse(
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ localMigrationOperationId,
+ localExpand,
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DatabaseMigrationSqlMi refresh(Context context) {
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlMis()
+ .getWithResponse(
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ localMigrationOperationId,
+ localExpand,
+ context)
+ .getValue();
+ return this;
+ }
+
+ public void cancel(MigrationOperationInput parameters) {
+ serviceManager
+ .databaseMigrationsSqlMis()
+ .cancel(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ }
+
+ public void cancel(MigrationOperationInput parameters, Context context) {
+ serviceManager
+ .databaseMigrationsSqlMis()
+ .cancel(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ }
+
+ public void cutover(MigrationOperationInput parameters) {
+ serviceManager
+ .databaseMigrationsSqlMis()
+ .cutover(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ }
+
+ public void cutover(MigrationOperationInput parameters, Context context) {
+ serviceManager
+ .databaseMigrationsSqlMis()
+ .cutover(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ }
+
+ public DatabaseMigrationSqlMiImpl withProperties(DatabaseMigrationPropertiesSqlMi properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlVmImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlVmImpl.java
new file mode 100644
index 0000000000000..fb88ab6fd138a
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationSqlVmImpl.java
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlVmInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationPropertiesSqlVm;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationSqlVm;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+public final class DatabaseMigrationSqlVmImpl
+ implements DatabaseMigrationSqlVm, DatabaseMigrationSqlVm.Definition, DatabaseMigrationSqlVm.Update {
+ private DatabaseMigrationSqlVmInner innerObject;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public DatabaseMigrationPropertiesSqlVm properties() {
+ return this.innerModel().properties();
+ }
+
+ public DatabaseMigrationSqlVmInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String sqlVirtualMachineName;
+
+ private String targetDbName;
+
+ public DatabaseMigrationSqlVmImpl withExistingSqlVirtualMachine(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ this.resourceGroupName = resourceGroupName;
+ this.sqlVirtualMachineName = sqlVirtualMachineName;
+ return this;
+ }
+
+ public DatabaseMigrationSqlVm create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlVms()
+ .createOrUpdate(
+ resourceGroupName, sqlVirtualMachineName, targetDbName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DatabaseMigrationSqlVm create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlVms()
+ .createOrUpdate(resourceGroupName, sqlVirtualMachineName, targetDbName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseMigrationSqlVmImpl(
+ String name, com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = new DatabaseMigrationSqlVmInner();
+ this.serviceManager = serviceManager;
+ this.targetDbName = name;
+ }
+
+ public DatabaseMigrationSqlVmImpl update() {
+ return this;
+ }
+
+ public DatabaseMigrationSqlVm apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlVms()
+ .createOrUpdate(
+ resourceGroupName, sqlVirtualMachineName, targetDbName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public DatabaseMigrationSqlVm apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlVms()
+ .createOrUpdate(resourceGroupName, sqlVirtualMachineName, targetDbName, this.innerModel(), context);
+ return this;
+ }
+
+ DatabaseMigrationSqlVmImpl(
+ DatabaseMigrationSqlVmInner innerObject,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.sqlVirtualMachineName = Utils.getValueFromIdByName(innerObject.id(), "sqlVirtualMachines");
+ this.targetDbName = Utils.getValueFromIdByName(innerObject.id(), "databaseMigrations");
+ }
+
+ public DatabaseMigrationSqlVm refresh() {
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlVms()
+ .getWithResponse(
+ resourceGroupName,
+ sqlVirtualMachineName,
+ targetDbName,
+ localMigrationOperationId,
+ localExpand,
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DatabaseMigrationSqlVm refresh(Context context) {
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDatabaseMigrationsSqlVms()
+ .getWithResponse(
+ resourceGroupName,
+ sqlVirtualMachineName,
+ targetDbName,
+ localMigrationOperationId,
+ localExpand,
+ context)
+ .getValue();
+ return this;
+ }
+
+ public void cancel(MigrationOperationInput parameters) {
+ serviceManager
+ .databaseMigrationsSqlVms()
+ .cancel(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters);
+ }
+
+ public void cancel(MigrationOperationInput parameters, Context context) {
+ serviceManager
+ .databaseMigrationsSqlVms()
+ .cancel(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ }
+
+ public void cutover(MigrationOperationInput parameters) {
+ serviceManager
+ .databaseMigrationsSqlVms()
+ .cutover(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters);
+ }
+
+ public void cutover(MigrationOperationInput parameters, Context context) {
+ serviceManager
+ .databaseMigrationsSqlVms()
+ .cutover(resourceGroupName, sqlVirtualMachineName, targetDbName, parameters, context);
+ }
+
+ public DatabaseMigrationSqlVmImpl withProperties(DatabaseMigrationPropertiesSqlVm properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlDbsClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlDbsClientImpl.java
new file mode 100644
index 0000000000000..75dff80cb4aae
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlDbsClientImpl.java
@@ -0,0 +1,1343 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.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.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.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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.datamigration.fluent.DatabaseMigrationsSqlDbsClient;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlDbInner;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.nio.ByteBuffer;
+import java.util.UUID;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DatabaseMigrationsSqlDbsClient. */
+public final class DatabaseMigrationsSqlDbsClientImpl implements DatabaseMigrationsSqlDbsClient {
+ /** The proxy service used to perform REST calls. */
+ private final DatabaseMigrationsSqlDbsService service;
+
+ /** The service client containing this operation class. */
+ private final DataMigrationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabaseMigrationsSqlDbsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DatabaseMigrationsSqlDbsClientImpl(DataMigrationManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(DatabaseMigrationsSqlDbsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataMigrationManagementClientDatabaseMigrationsSqlDbs to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataMigrationManagem")
+ private interface DatabaseMigrationsSqlDbsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers"
+ + "/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlDbInstanceName") String sqlDbInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @QueryParam("migrationOperationId") UUID migrationOperationId,
+ @QueryParam("$expand") String expand,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers"
+ + "/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlDbInstanceName") String sqlDbInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DatabaseMigrationSqlDbInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers"
+ + "/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlDbInstanceName") String sqlDbInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @QueryParam("force") Boolean force,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers"
+ + "/{sqlDbInstanceName}/providers/Microsoft.DataMigration/databaseMigrations/{targetDbName}/cancel")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cancel(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlDbInstanceName") String sqlDbInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MigrationOperationInput parameters,
+ Context context);
+ }
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Database along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ migrationOperationId,
+ expand,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Database along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ migrationOperationId,
+ expand,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand) {
+ return getWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationId, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName) {
+ final UUID migrationOperationId = null;
+ final String expand = null;
+ return getWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationId, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseMigrationSqlDbInner get(String resourceGroupName, String sqlDbInstanceName, String targetDbName) {
+ final UUID migrationOperationId = null;
+ final String expand = null;
+ return getAsync(resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationId, expand).block();
+ }
+
+ /**
+ * Retrieve the Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Database along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ return getWithResponseAsync(
+ resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationId, expand, context)
+ .block();
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 the {@link PollerFlux} for polling of database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DatabaseMigrationSqlDbInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseMigrationSqlDbInner.class,
+ DatabaseMigrationSqlDbInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 the {@link PollerFlux} for polling of database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DatabaseMigrationSqlDbInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseMigrationSqlDbInner.class,
+ DatabaseMigrationSqlDbInner.class,
+ context);
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DatabaseMigrationSqlDbInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DatabaseMigrationSqlDbInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseMigrationSqlDbInner createOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters).block();
+ }
+
+ /**
+ * Create or Update Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of Sql Db migration 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 database Migration Resource for SQL Database.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseMigrationSqlDbInner createOrUpdate(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlDbInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context).block();
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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."));
+ }
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ force,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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."));
+ }
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ force,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ context);
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force) {
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force) {
+ return beginDeleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force).getSyncPoller();
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context) {
+ return beginDeleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force, context).getSyncPoller();
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force) {
+ return beginDeleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String sqlDbInstanceName, String targetDbName) {
+ final Boolean force = null;
+ return beginDeleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context) {
+ return beginDeleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force) {
+ deleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force).block();
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String sqlDbInstanceName, String targetDbName) {
+ final Boolean force = null;
+ deleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force).block();
+ }
+
+ /**
+ * Delete Database Migration resource.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param force Optional force delete boolean. If this is provided as true, migration will be deleted even if
+ * active.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context) {
+ deleteAsync(resourceGroupName, sqlDbInstanceName, targetDbName, force, context).block();
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cancelWithResponseAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cancel(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cancelWithResponseAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (sqlDbInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlDbInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ context = this.client.mergeContext(context);
+ return service
+ .cancel(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ context);
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ Mono>> mono =
+ cancelWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ cancelWithResponseAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ return beginCancelAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCancelAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ return beginCancelAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCancelAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ cancelAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters).block();
+ }
+
+ /**
+ * Stop on going migration for the database.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlDbInstanceName The sqlDbInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ cancelAsync(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context).block();
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlDbsImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlDbsImpl.java
new file mode 100644
index 0000000000000..8dddc24bb3efe
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlDbsImpl.java
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.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.datamigration.fluent.DatabaseMigrationsSqlDbsClient;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlDbInner;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationSqlDb;
+import com.azure.resourcemanager.datamigration.models.DatabaseMigrationsSqlDbs;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.util.UUID;
+
+public final class DatabaseMigrationsSqlDbsImpl implements DatabaseMigrationsSqlDbs {
+ private static final ClientLogger LOGGER = new ClientLogger(DatabaseMigrationsSqlDbsImpl.class);
+
+ private final DatabaseMigrationsSqlDbsClient innerClient;
+
+ private final com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager;
+
+ public DatabaseMigrationsSqlDbsImpl(
+ DatabaseMigrationsSqlDbsClient innerClient,
+ com.azure.resourcemanager.datamigration.DataMigrationManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public DatabaseMigrationSqlDb get(String resourceGroupName, String sqlDbInstanceName, String targetDbName) {
+ DatabaseMigrationSqlDbInner inner =
+ this.serviceClient().get(resourceGroupName, sqlDbInstanceName, targetDbName);
+ if (inner != null) {
+ return new DatabaseMigrationSqlDbImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(
+ resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationId, expand, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DatabaseMigrationSqlDbImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force) {
+ this.serviceClient().delete(resourceGroupName, sqlDbInstanceName, targetDbName, force);
+ }
+
+ public void delete(String resourceGroupName, String sqlDbInstanceName, String targetDbName) {
+ this.serviceClient().delete(resourceGroupName, sqlDbInstanceName, targetDbName);
+ }
+
+ public void delete(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, Boolean force, Context context) {
+ this.serviceClient().delete(resourceGroupName, sqlDbInstanceName, targetDbName, force, context);
+ }
+
+ public void cancel(
+ String resourceGroupName, String sqlDbInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ this.serviceClient().cancel(resourceGroupName, sqlDbInstanceName, targetDbName, parameters);
+ }
+
+ public void cancel(
+ String resourceGroupName,
+ String sqlDbInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ this.serviceClient().cancel(resourceGroupName, sqlDbInstanceName, targetDbName, parameters, context);
+ }
+
+ public DatabaseMigrationSqlDb 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 sqlDbInstanceName = Utils.getValueFromIdByName(id, "servers");
+ if (sqlDbInstanceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String targetDbName = Utils.getValueFromIdByName(id, "databaseMigrations");
+ if (targetDbName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'databaseMigrations'.", id)));
+ }
+ UUID localMigrationOperationId = null;
+ String localExpand = null;
+ return this
+ .getWithResponse(
+ resourceGroupName,
+ sqlDbInstanceName,
+ targetDbName,
+ localMigrationOperationId,
+ localExpand,
+ Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(
+ String id, UUID migrationOperationId, String expand, 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 sqlDbInstanceName = Utils.getValueFromIdByName(id, "servers");
+ if (sqlDbInstanceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String targetDbName = Utils.getValueFromIdByName(id, "databaseMigrations");
+ if (targetDbName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'databaseMigrations'.", id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, sqlDbInstanceName, targetDbName, migrationOperationId, expand, context);
+ }
+
+ public void 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 sqlDbInstanceName = Utils.getValueFromIdByName(id, "servers");
+ if (sqlDbInstanceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String targetDbName = Utils.getValueFromIdByName(id, "databaseMigrations");
+ if (targetDbName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'databaseMigrations'.", id)));
+ }
+ Boolean localForce = null;
+ this.delete(resourceGroupName, sqlDbInstanceName, targetDbName, localForce, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Boolean force, 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 sqlDbInstanceName = Utils.getValueFromIdByName(id, "servers");
+ if (sqlDbInstanceName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'servers'.", id)));
+ }
+ String targetDbName = Utils.getValueFromIdByName(id, "databaseMigrations");
+ if (targetDbName == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'databaseMigrations'.", id)));
+ }
+ this.delete(resourceGroupName, sqlDbInstanceName, targetDbName, force, context);
+ }
+
+ private DatabaseMigrationsSqlDbsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.datamigration.DataMigrationManager manager() {
+ return this.serviceManager;
+ }
+
+ public DatabaseMigrationSqlDbImpl define(String name) {
+ return new DatabaseMigrationSqlDbImpl(name, this.manager());
+ }
+}
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisClientImpl.java b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisClientImpl.java
new file mode 100644
index 0000000000000..cd7cfef0eead7
--- /dev/null
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/src/main/java/com/azure/resourcemanager/datamigration/implementation/DatabaseMigrationsSqlMisClientImpl.java
@@ -0,0 +1,1332 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.datamigration.implementation;
+
+import com.azure.core.annotation.BodyParam;
+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.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.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.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.datamigration.fluent.DatabaseMigrationsSqlMisClient;
+import com.azure.resourcemanager.datamigration.fluent.models.DatabaseMigrationSqlMiInner;
+import com.azure.resourcemanager.datamigration.models.MigrationOperationInput;
+import java.nio.ByteBuffer;
+import java.util.UUID;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DatabaseMigrationsSqlMisClient. */
+public final class DatabaseMigrationsSqlMisClientImpl implements DatabaseMigrationsSqlMisClient {
+ /** The proxy service used to perform REST calls. */
+ private final DatabaseMigrationsSqlMisService service;
+
+ /** The service client containing this operation class. */
+ private final DataMigrationManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabaseMigrationsSqlMisClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DatabaseMigrationsSqlMisClientImpl(DataMigrationManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(DatabaseMigrationsSqlMisService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DataMigrationManagementClientDatabaseMigrationsSqlMis to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "DataMigrationManagem")
+ private interface DatabaseMigrationsSqlMisService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql"
+ + "/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("managedInstanceName") String managedInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @QueryParam("migrationOperationId") UUID migrationOperationId,
+ @QueryParam("$expand") String expand,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql"
+ + "/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("managedInstanceName") String managedInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DatabaseMigrationSqlMiInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql"
+ + "/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}/cancel")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cancel(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("managedInstanceName") String managedInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MigrationOperationInput parameters,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql"
+ + "/managedInstances/{managedInstanceName}/providers/Microsoft.DataMigration/databaseMigrations"
+ + "/{targetDbName}/cutover")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> cutover(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("managedInstanceName") String managedInstanceName,
+ @PathParam("targetDbName") String targetDbName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") MigrationOperationInput parameters,
+ Context context);
+ }
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ migrationOperationId,
+ expand,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ migrationOperationId,
+ expand,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Managed Instance on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand) {
+ return getWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, migrationOperationId, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Managed Instance on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName) {
+ final UUID migrationOperationId = null;
+ final String expand = null;
+ return getWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, migrationOperationId, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @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 database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseMigrationSqlMiInner get(String resourceGroupName, String managedInstanceName, String targetDbName) {
+ final UUID migrationOperationId = null;
+ final String expand = null;
+ return getAsync(resourceGroupName, managedInstanceName, targetDbName, migrationOperationId, expand).block();
+ }
+
+ /**
+ * Retrieve the specified database migration for a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param migrationOperationId Optional migration operation ID. If this is provided, then details of migration
+ * operation for that ID are retrieved. If not provided (default), then details related to most recent or
+ * current operation are retrieved.
+ * @param expand Complete migration details be included in the response.
+ * @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 database Migration Resource for SQL Managed Instance along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ UUID migrationOperationId,
+ String expand,
+ Context context) {
+ return getWithResponseAsync(
+ resourceGroupName, managedInstanceName, targetDbName, migrationOperationId, expand, context)
+ .block();
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance along with {@link Response} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link PollerFlux} for polling of database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DatabaseMigrationSqlMiInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseMigrationSqlMiInner.class,
+ DatabaseMigrationSqlMiInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link PollerFlux} for polling of database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DatabaseMigrationSqlMiInner> beginCreateOrUpdateAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseMigrationSqlMiInner.class,
+ DatabaseMigrationSqlMiInner.class,
+ context);
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DatabaseMigrationSqlMiInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, targetDbName, parameters)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 the {@link SyncPoller} for polling of database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DatabaseMigrationSqlMiInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseMigrationSqlMiInner createOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, managedInstanceName, targetDbName, parameters).block();
+ }
+
+ /**
+ * Create a new database migration to a given SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Details of SqlMigrationService 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 database Migration Resource for SQL Managed Instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DatabaseMigrationSqlMiInner createOrUpdate(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ DatabaseMigrationSqlMiInner parameters,
+ Context context) {
+ return createOrUpdateAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context).block();
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cancelWithResponseAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cancel(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cancelWithResponseAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ context = this.client.mergeContext(context);
+ return service
+ .cancel(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ context);
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ Mono>> mono =
+ cancelWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCancelAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ cancelWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ return beginCancelAsync(resourceGroupName, managedInstanceName, targetDbName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginCancel(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCancelAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ return beginCancelAsync(resourceGroupName, managedInstanceName, targetDbName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono cancelAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ return beginCancelAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ cancelAsync(resourceGroupName, managedInstanceName, targetDbName, parameters).block();
+ }
+
+ /**
+ * Stop in-progress database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cancel will be initiated.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void cancel(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ cancelAsync(resourceGroupName, managedInstanceName, targetDbName, parameters, context).block();
+ }
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cutoverWithResponseAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .cutover(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> cutoverWithResponseAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (managedInstanceName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null."));
+ }
+ if (targetDbName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter targetDbName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ context = this.client.mergeContext(context);
+ return service
+ .cutover(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ managedInstanceName,
+ targetDbName,
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ parameters,
+ context);
+ }
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCutoverAsync(
+ String resourceGroupName, String managedInstanceName, String targetDbName, MigrationOperationInput parameters) {
+ Mono>> mono =
+ cutoverWithResponseAsync(resourceGroupName, managedInstanceName, targetDbName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Initiate cutover for in-progress online database migration to SQL Managed Instance.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The managedInstanceName parameter.
+ * @param targetDbName The name of the target database.
+ * @param parameters Required migration operation ID for which cutover will be initiated.
+ * @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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginCutoverAsync(
+ String resourceGroupName,
+ String managedInstanceName,
+ String targetDbName,
+ MigrationOperationInput parameters,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono